This runs a batch of API services together and returns the end result.
var RevisitTether = require('revisit-tether');
var rt = new RevisitTether({
db: './db-tether'
});
var service = {
url: 'http://localhost:8000',
token: '12345abc',
content: {
type: 'image/png',
data: 'some content for an API'
},
meta: {
audio: {
type: false,
data: false
}
}
};
rt.add(service, function (err, svc) {
console.log(svc);
});
rt.getAll('12345abc', function (err, services) {
console.log(services);
});
rt.play('12345abc', function (err, result) {
console.log(result);
});