Giter Club home page Giter Club logo

feedr's Introduction

Feedr

Build Status NPM version Flattr this project

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

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 to it here if we wanted
feedr = new Feedr();

// Prepare our feeds that we want read
feeds = {
	github: {
		url: "https://github.com/bevry/feedr/commits/master.atom"
	},
	twitter: {
		url: "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=balupton&count=20&include_entities=true&include_rts=true"
	}
};

// Read our feeds and return the result
feedr.readFeeds(feeds, function(err,result){
	console.log(err,result.github,result.twitter);
});

Configuration

  • log: null our log function to use
  • logError: null our error log function to use
  • tmpPath: null the tempory path to cache our feedr results to (will autodetect if null)
  • cache: true whether or not we should cache the results
  • cacheTime: 1000*60*5 how long should the cache stay active in milliseconds
  • timeout: 10*1000 how long should we wait before aborting the request in milliseconds
  • xmljsOptions: null what options should we pass to xml2js (can be a string which will reference to xml2js.defaults)

History

You can discover the history inside the History.md file

License

Licensed under the MIT License
Copyright © 2012+ Bevry Pty Ltd

feedr's People

Contributors

balupton avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.