Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

feedr

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feedr

Feedr takes in a remote feed (regardless of format type) and converts it into JSON data

  • 2.8.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Feedr

Build Status NPM version Dependency Status Development Dependency Status
Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Feedr takes in a remote feed (regardless of format type) and converts it into JSON data

Install

NPM

  • Use: require('feedr')
  • Install: npm install --save feedr

Usage

// Prepare
var Feedr, feedr, feeds;

// Include the Feedr Class
Feedr = require('feedr').Feedr;

// Create our Feedr instance, we can pass optional configuration if we wanted
feedr = new Feedr();

// Prepare our feeds that we want read
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"
};

// Read a single feed
feedr.readFeed(feeds.github, {/* optional configuration*/}, function(err, data, headers){
	console.log(err, data, headers);
});

// Read all the feeds together
feedr.readFeeds(feeds, {/* optional configuration*/}, function(err, result){
	console.log(err, result.github, result.twitter);
});

Configuration

Feed configuration defaults / global configuration properties are:

  • log defaults to null, log function to use
  • tmpPath defaults to system tmp path, the tempory path to cache our feedr results to
  • cache defaults to true, whether or not we should use the cache if it is valid, use preferred to always use cache if it exists, use milliseconds to specify a max age
  • xml2jsOptions defaults to null, the options to send to xml2js
  • requestOptions defaults to null, the options to send to request

Feed configuration properties are:

  • url required, the url to fetch
  • hash defaults to hash of the url, the hashed url for caching
  • name defaults to hash, the name of the feed for use in debugging
  • path defaults to tmp feed path, the path to save the file to
  • parse 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", "yaml", "json", "cson" (note, CSON is an unsafe but secure format)
  • checkResponse defaults to null, a function accepting response, data, and next to check the response for errors
  • xml2jsOptions defaults to global value, the options to send to xml2js
  • requestOptions 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:

Sponsors

No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

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)

Keywords

FAQs

Package last updated on 03 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc