2.1.0 • Published 5 years ago
fullrss v2.1.0
fullrss
Generator full rss feed.
THIS PACKAGE IS NO LONGER MAINTAINED
Install
$ npm install --save fullrss
Usage
const fullrss = require('fullrss');
(async () => {
const feed = await fullrss({
url: 'http://domain.com/feed',
token: 'token',
max: 5,
});
// ...
})();
API
fullrss(options)
options
url
Type: string
Address feed
token
Type: string
Token to obtain the full text via Mercury.
max
Type: number
Default: 0
The maximum number of feed items. If 0
is specified, all items will be processed.
cache
Type: object
Default: { get(key) {}, set(key, value) {} }
To avoid unnecessary queries to mercury
, you can use the cache. Methods can return a promise. The key
is calculated based on the modified date and id. For example:
const store = require('...');
class Cache {
get(key) {
return store.get(key);
}
set(key, value) {
store.set(key, value);
}
}