NodeJS wrapper for Diaspora v1.0 API
To install node-diaspora, you can do it using NPM
$ npm install node-diaspora
Starter application
var Diaspora = require('node-diaspora');
var diasp = new Diaspora({
user : 'USER',
password: 'PASSWORD',
pod : 'https://examplepod.com'
});
diasp.connect(function(err, suc){
// CODE HERE
});
diasp.get('/stream', function(call){
console.log(call);
});
Replace :aspect with a aspect of Diaspora: Example: Work, public, all_aspects
diasp.postStatusMessage('Testing this new library', ':aspect', function(err, res){
});
You can also post an image with your status message. Replace :image with the image file path.
diasp.postStatusMessage('Testing this new library', ':aspect', ':image', function(err, res){
});
diasp.get('/activity', function(call){
console.log(call);
});
diasp.get('/people/:profileid/photos', function(call){
console.log(call);
});
diasp.get('/contacts', function(call){
console.log(call);
});
diasp.get('/posts/:postid', function(call){
console.log(call);
});
diasp.get('/tags/:tag', function(call){
console.log(call);
});
diasp.delete('/posts/:postid', function(call){
console.log(call);
});
- https://github.com/rainbowintheshell/node-diaspora/issues
- rainbowtupperware at openmailbox dot org