Feedr
Feedr takes in a remote feed (regardless of format type) and converts it into JSON data
Install
- Use:
require('feedr')
- Install:
npm install --save feedr
Usage
var Feedr, feedr, feeds;
Feedr = require('feedr').Feedr;
feedr = new Feedr();
feeds = {
github: "https://github.com/bevry/feedr/commits/master.atom",
twitter: "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=balupton&count=20&include_entities=true&include_rts=true"
};
feedr.readFeed(feeds.github, {}, function(err, data, headers){
console.log(err, data, headers);
});
feedr.readFeeds(feeds, {}, function(err, result){
console.log(err, result.github, result.twitter);
});
Configuration
Global configuration properties are:
log
defaults to null
, log function to usetmpPath
defaults to system tmp path, the tempory path to cache our feedr results tocache
defaults to true
, whether or not we should use the cache if it is validxml2jsOptions
defaults to null
, the options to send to xml2jsrequestOptions
defaults to null
, the options to send to request
Feed configuration properties are:
url
required, the url to fetchhash
defaults to hash of the url, the hashed url for cachingname
defaults to hash, the name of the feed for use in debuggingpath
defaults to tmp feed path, the path to save the file toparse
defaults to auto detection based on the extension of the url, whether or not to parse the data into a javascript object, can be set to false
, true
, "xml"
, "json"
, "cson"
, "yaml"
checkResponse
defaults to null
, a function accepting response
, data
, and next
to check the response for errorsxml2jsOptions
defaults to global value, the options to send to xml2jsrequestOptions
defaults to global value, the options to send to request
History
Discover the change history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Become a contributor!
License
Licensed under the incredibly permissive MIT license
Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)