1.0.2 • Published 4 years ago

ro.boze.inoreader.proxy v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

InoReaderProxy

Provides a simple Javascript API over the Rest API that InoReader is offering.

Handling tokens

The module needs at least a valid refresh token (not expired). This will be used to retrieve a new access token if that one is expired (on first use, one can simply send a dummy access token and it will be refreshed). The module keeps access and refresh tokens in memory so you need a way to store this persistently for continuous use. You can reister a callback which is invoked when refresh token endpoint is called. This gives the chance to store the tokens for future use. See usage below on how to use the callback registration.

#Example usage

Initialize proxy object

var inoReader = new InoReaderFacade({ accessToken: "b0e653b680d6fasdsfsdfsdfasd", refreshToken: "as87tsd97sg87dfg9dfg98df8", clientId: "sd9f87sdf87", clientSecret : "asdsdgdhjjC" });

Retrieving profile information about the current user

response = await inoReader.getProfile();

Retrieving the list with subscriptions

response = await inoReader.getSubscritionList();

Retrieving items from a given subscription

response = await inoReader.getArticlesForSubscription( "feed/http://feeds.feedburner.com/StudyHacks" );

Retrieving a list with tags / folders

response = await inoReader.getTagsList();

Mark all items in a given subscription as read.

response = await inoReader.markAllAsRead("feed/http://feeds.feedburner.com/StudyHacks");

Registering a refresh token callback

inoReader.registerRefreshCallback( function(tokenData){ let accessToken = tokenData.access_token; //Do something with tokens. } );

#Inoreader API documentation Developer documentation

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago