{"repo":"fent/node-feedsub","free":true,"listed":false,"github":"https://github.com/fent/node-feedsub","clone":"git clone https://github.com/fent/node-feedsub.git","description":"Subscribes to RSS/Atom/JSON feeds and notifies on new items.","language":"TypeScript","stars":198,"topics":["node","feed-reader","rss","atom"],"license":"MIT","category":"productivity","readme_excerpt":"FeedSub FeedSub subscribes to a remote RSS/Atom/JSON feed and notifies you of any new items it reads. It works by checking the feed every once in a while, comparing the date of the document via a conditional GET if supported. Otherwise it looks for a date tag in the feed. If it's the same as the last date, it stops downloading it and parsing the xml/json. If it's an updated document, then it looks through it top to bottom taking note of all the new items. Once it finds something it has already read, it stops downloading and parsing the document. Usage API new FeedSub(feed, [options]) Creates a new instance of FeedSub. options defaults to. FeedSub#read([callback(err, items)]) Reads the feed. Calls callback with possible error or new items discovered if provided. Causes reader to emit new item events. FeedSub#start(readOnStart) Starts checking the feed for any new items every options.interval minutes. If readOnStart is true, it checks right away. FeedSub#options Options that were passed to the constructor along with any defaults are kept here. FeedSub#stop() Stops the reader from automatically reading the feed. Event: item Object - Item. Emitted whenever there is a new item. Event: items Array. - List of items. Emits all new items from one request in one array. Event: error Error Emitted when there is an error downloading or parsing the feed. Not emitted if callback is given for read or readInterval . Install npm install feedsub Tests Tests are written with mocha","default_branch":null,"files":null,"tree":[],"storefront":"/r/fent","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fent/node-feedsub/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}