node-readability-api
This is a Node client for the Readability API. It supports the Reader API, Parser API and Shortener API.
Installation
npm install --save readability-api
Usage
Initialize the client
var readability = ; readability;
Authentication
Retrieve an OAuth access token and access token secret for a user
readability
Reader API
To use the Reader API, create a Reader object using an OAuth token and token secret
var reader = access_token: 'some_access_token' access_token_secret: 'some_access_token_secret';
User information
// Get information about the current userreader;
Bookmarks
// Get all bookmarks - response contains both metadata (pagination etc.) and an array of bookmarksreader; // Get a bookmark by its idreader; // Add a bookmark - returns the created bookmarkreader; // Remove a bookmark - success is a booleanreader; // Archive a bookmark - returns the archived bookmarkreader; // Unarchive a bookmark - returns the bookmarkreader; // Favourite a bookmark - returns the favourited bookmarkreader; // Unavourite a bookmark - returns the bookmarkreader;
Tags
// Get all of the current user's tags - returns an array of tagsreader; // Get all of the tags for a bookmark - returns an array of tagsreadertags'some_bookmark_id' { //...}; // Add tags to a bookmark - returns an array of tagsreader; // Remove a tag from a bookmark - returns the bookmarkreader;
Articles
// Get a single articlereader;
Parser API
// Create a parser objectvar parser = ; // Parse an articleparser; // Get the Parser confidence level - returns a number between 0 and 1parser;
Shortener API
// Create a shortener objectvar shortener = // Create a short URL - returns the short URL as a string and additional URL datashortener; // Get information about a short URLshortener;