0.0.2 • Published 9 years ago

node-superfeedr v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

Build Status Coverage Status

Dependency status devDependency Status optionalDependency peerDependency

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

ParamTypeDescription
optionsObjectoverride default options
options.usernamestringSuperfeedr usernamedefault: process.env.SUPERFEEDR_USERNAME
options.tokenstringSuperfeedr token valuedefault: process.env.SUPERFEEDR_TOKEN
options.endpointurlSuperfeedr Push Api Endpointdefault: https://push.superfeedr.com

superfeedr/subscribers/http~addFeed(topic, callback, secret, options) ⇒ Promise

Kind: inner method of superfeedr/subscribers/http

ParamTypeDescription
topicurlThe URL of the HTTP resource to which you want to subscribe. It cannot be more than 2048 characters long.
callbackurlThe 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.
secretstringRecommended. A unique secret string which will be used by us to compute a signature. You should check this signature when getting notifications.
optionsObjectLess used options
options.verifystringWill perform a PubSubHubbub verification of intent synschronously or asynschronouslyasync | sync.
options.formatstringIf 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.retrievestringIf 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

ParamTypeDescription
topicurlThe URL of the HTTP resource to which you want to unsubscribe.
callbackurlThe 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.
optionsObjectLess used options
options.verifystringWe will perform a PubSubHubbub verification of intent synschronously or asynschronously.async | sync