A client-side library that work like a Feed Reader, returning all datas of a post - title, text, link, etc
The library calls Google's Feed API internally.
Feed is compatible with the following browsers/versions:
- Google Chrome
- Firefox
- Safari
- IOS Safari
- Opera
- IE 6+
To install Feed, execute:
npm install feed-js
Or Bower too:
bower install feed
Or simply pick up the file from src directory.
- context
Object
(window
by default) - url
String
(undefined
by default) - number
Number
(it's the total of posts10
by default) - callback
Function
(Function
by default)
Example
var render = function(posts) {
posts.feed.entries.forEach(function (element, index) {
console.log(element.title);
console.log(element.content);
console.log(element.link);
});
};
window.Feed({
url: 'http://rss1.smashingmagazine.com/feed/',
number: 3,
callback: render
});