0.0.2 • Published 9 years ago
node-superfeedr v0.0.2
Installation
npm install node-superfeedr
Testing
npm test
API Reference
node-superfeedr
Install:
npm install node-superfeedr
Example:
var superfeedr = require('node-superfeedr');
Testing out this
superfeedr
node-superfeedr
Install:
npm install node-superfeedr
Example:
var superfeedr = require('node-superfeedr');
Helper
superfeedr
node-superfeedr
Install:
npm install node-superfeedr
Example:
var superfeedr = require('node-superfeedr');
superfeedr/subscribers/http
Superfeedr Subscribers Http Client
Example:
var superfeedr = require('node-superfeedr');
var options = {
username: process.env.SUPERFEEDR_USERNAME || 'username',
token: process.env.SUPERFEEDR_TOKEN || 'token'
};
var client = new superfeedr.Subscribers.HttpClient(options);
Submodule: http
Param | Type | Description | |
---|---|---|---|
options | Object | override default options | |
options.username | string | Superfeedr username | default: process.env.SUPERFEEDR_USERNAME |
options.token | string | Superfeedr token value | default: process.env.SUPERFEEDR_TOKEN |
options.endpoint | url | Superfeedr Push Api Endpoint | default: https://push.superfeedr.com |
superfeedr/subscribers/http~addFeed(topic, callback, secret, options) ⇒ Promise
Kind: inner method of superfeedr/subscribers/http
Param | Type | Description | |
---|---|---|---|
topic | url | The URL of the HTTP resource to which you want to subscribe. It cannot be more than 2048 characters long. | |
callback | url | The webhook: it's the URL to which notifications will be sent. Make sure you it's web-accessible, ie not behind a firewall. Its size is currently limited to 250 characters. | |
secret | string | Recommended. A unique secret string which will be used by us to compute a signature. You should check this signature when getting notifications. | |
options | Object | Less used options | |
options.verify | string | Will perform a PubSubHubbub verification of intent synschronously or asynschronously | async | sync. |
options.format | string | If you want to receive notifications as json format (for feeds only!). You can also use an Accept HTTP header like this: Accept: application/json. If you explicitly want to receive notification as Atom. This is used by default for any resource that's either Atom or RSS. If you don't specify any, we will send you the data pulled from the HTTP resource, (excluding feeds). | json | atom. |
options.retrieve | string | If set to true, the response will include the current representation of the feed as stored in Superfeedr, in the format desired. Please check our Schema for more details. | true | false |
superfeedr/subscribers/http~removeFeed(topic, callback, options) ⇒ Promise
Kind: inner method of superfeedr/subscribers/http
Param | Type | Description | |
---|---|---|---|
topic | url | The URL of the HTTP resource to which you want to unsubscribe. | |
callback | url | The URL to which notifications will be sent. It is optional if you are only subscribed to the feed 'once', with a single hub.callback. If you have multiple subscriptions, you will need to supply the hub.callback parameter. It is also required if you use the hub.verify param. | |
options | Object | Less used options | |
options.verify | string | We will perform a PubSubHubbub verification of intent synschronously or asynschronously. | async | sync |