@joakimbeng/rss-feed-emitter
Super RSS News Feed aggregator written in Node.js and ES6
Last updated 4 years ago by joakimbeng .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @joakimbeng/rss-feed-emitter 
SYNC missed versions from official npm registry.

RSS Feed Emitter

Track tons of feeds and receive events for every new item published with this super RSS News Feed aggregator.

Tutorial

This is a fully functional module, but its source code and repository are also a super complete tutorial, covering:

  1. What to do first when creating a module from scratch
  2. How to manage your module in Github and npm
  3. How to transpile your ES6 code into ES5
  4. How to create automated unit and integration tests
  5. How to integrate them with Travis CI and make the build break if tests didn't pass
  6. How to automatically test your module against various versions of Node.js
  7. How to setup a code coverage tool and keep 100% coverage
  8. How to integrate the coverage results with Code Climate
  9. How to configure linting tools to make your code base consistent
  10. How to deploy to Github and npm with tags and releases

If you're afraid to read the source code of the modules you use or to create your first module, this is the best chance you have to break this barrier :)

Start here

Features

  • Supports Node.js 0.10.x, 0.12.x, 4.x, 5.x, and @stable
  • 100% code coverage with unit and integration tests
  • Simple interface
  • Automatically manages feed history memory
  • Written in ES6

Usage

Install

$ npm install rss-feed-emitter

Creating an instance

let RssFeedEmitter = require('rss-feed-emitter');
let feeder = new RssFeedEmitter();

Changing the user agent for requests

let feeder = new RssFeedEmitter({ userAgent: 'Your UA string' });

The default user agent is this package's repository url

Adding feeds

feeder.add({
  url: 'http://www.nintendolife.com/feeds/news',
  refresh: 2000
});

Default refresh value is 60 seconds

Listening to new items

feeder.on('new-item', function(item) {
  console.log(item);
})

Listing all feeds in the instance

feeder.list();

Removing a single feed

feeder.remove('http://www.nintendolife.com/feeds/news');

Destroying feed instance

feeder.destroy();

This will remove all feeds from the instance

Current Tags

  • 1.0.4                                ...           latest (4 years ago)

1 Versions

  • 1.0.4                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (5)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |