Skip to content

Superfeedr extensions for stanza.io

Notifications You must be signed in to change notification settings

superfeedr/stanza.io-superfeedr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stanza.io-superfeedr

Requirements

Requires stanza.io version 6.6.x or greater.

Setting up

var client = require('stanza.io').createClient({
    jid: '[email protected]',
    password: 'hunter2'
});

client.use(require('stanza.io-superfeedr'));

client.connect();
// ...

Methods

// 1. Add feed
client.superfeedrAddFeed('http://domain.tld/feed1.xml');

client.superfeedrAddFeed({
    feed: 'http://domain.tld/feed1.xml',
    jid: '[email protected]',
    format: 'json'
}, function (err, res) {
    // do stuff
});


// 2. Remove feed
client.superfeedrRemoveFeed('http://domain.tld/oldfeed.xml');

client.superfeedrRemoveFeed({
    feed: 'http://domain.tld/oldfeed.xml',
    jid: '[email protected]'
}, function (err, res) {
    // do stuff
});


// 3. List feeds
client.superfeedrListFeeds(client.jid, 2, function (err, res) {
    if (err) {
        console.log(err.error);
        return;
    }

    console.log(res.pubsub.subscriptions.list);
});


// 4. Retrieve entries

client.superfeedrRetrieveEntries('http://domain.tld/feed1.xml', function (err, res) {
    if (err) {
        console.log(err.error);
        return;
    }

    console.log(res.pubsub.retrieve.items);
});

About

Superfeedr extensions for stanza.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published