Stack Overflow RSS
Install
npm install stack-overflow-rss
Use
var stackOverflowRss = ; // get the latest javascript questionsvar consumer = ;consumer;consumer; // poll the most voted json and node.js questions feedvar anotherConsumer = ;anotherConsumer;
Requiring 'stack-overflow-rss' returns a function used to consume question feeds. The following options are allowed:
tag
ortags
- The question tags.sort
- Default is'newest'
. Can also be'unanswered'
,'active'
,'votes'
or'faq'
.pollInterval
- Default is1000 * 60 * 2
(2 minutes).lazy
- Defer polling until the first subscription to'new'
. Default istrue
. You can useconsumer.update()
to trigger a single update.
Upon registering, an EventEmitter is returned. The events to mind are:
'update'
- triggered every time the questions are fetched.'new'
- triggered only when new questions exist. At leat two updates must be done to trigger this event.
License
MIT