Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jirwin/node-cloudfeeds

A simple library to follow a Cloud Feed.
https://github.com/jirwin/node-cloudfeeds

Last synced: 21 days ago
JSON representation

A simple library to follow a Cloud Feed.

Awesome Lists containing this project

README

        

node-cloudfeeds
===============

A simple library to stream a Cloud Feed.

Example:
```javascript
var CloudFeeds = require('./index.js').CloudFeeds;
var through = require('through');

var cf = new CloudFeeds(
'https://ord.feeds.api.rackspacecloud.com/usagesummary/ssl/events/8492382', // The URL of the feed to stream
{
headers: {
'X-Auth-Token': 'Not Really An Auth Token' // Rackspace auth token
},
limit: 1000 //Number of articles to pull at once
});

cf.pipe(through(function(data) {
var content;

if (data['atom:content']['#']) {
content = JSON.stringify(JSON.parse(data['atom:content']['#']), null, 4);
}
}));
```