Socket
Socket
Sign inDemoInstall

hook.io-feedsub

Package Overview
Dependencies
113
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

examples/config.json

9

package.json

@@ -5,3 +5,3 @@ {

"keywords": ["hook.io", "feed", "rss", "atom", "subscribe"],
"version": "0.1.1",
"version": "0.1.2",
"repository": {

@@ -13,2 +13,5 @@ "type": "git",

"main": "./lib/feed.js",
"scripts": {
"test": "vows test/test.js --spec"
},
"bin": {

@@ -24,2 +27,6 @@ "hookio-feed": "./bin/feed"

},
"devDependencies": {
"vows": "0.5.x",
"nock": "0.3.x"
},
"licenses": [ {

@@ -26,0 +33,0 @@ "type": "MIT",

53

README.md

@@ -1,24 +0,55 @@

Install
------------
Will "subscribe" to a web RSS/Atom feed and emit any new items it reads from it. The events are in the form of
npm -g install hook.io-feedsub
`*::name::item`
Where `name` is the name of the feed. So if you are using the example [`config.json`](/fent/hook.io-feedsub/tree/master/examples/config.json) that looks like this
Usage
------------------
```javascript
{
"feeds": [
{
"name": "cnn",
"url": "http://rss.cnn.com/rss/cnn_latest.rss",
"interval": 10,
"emitOnStart": false
}
]
}
```
hookio-feedsub
Will "subscribe" to a web feed and emit any new items it reads from it. Take a look at the `config.json` file to see how to structure it. The events emitted will be in the form of
Programatically, this is how you would listen for new feed items..
`*::name::item`
Where `name` is the name of the feed. So if you are using the example `config.json` file and waiting for the latest news from CNN, programatically, you would want to do..
```javascript
hook.on('*::cnn:item', function(item) {
console.log('New Story!:', item.title);
}
});
```
It uses [feedsub](https://github.com/fent/node-feedsub) to read feeds. Take a look at its constructor API for all the options that can be passed to it.
Usage
------------------
```bash
hookio-feedsub
```
Install
------------
```bash
npm -g install hook.io-feedsub
```
Tests
---------
The single test is written with [vows](http://vowsjs.org/)
```bash
npm test
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc