$ npm install rbtv-got
Instead of:
const got = require('got');
const wsse = require('unicorn-wsse');
got('http://api.rocketmgmt.de/podcast', {
json: true,
headers: {
authorization: 'WSSE profile="UsernameToken"',
'x-wsse': wsse({ key: 'foo', secret: 'bar' }),
},
}).then(res => {
console.log(res.body.podcasts);
//=> [...]
});
You can do:
const rbtvGot = require('rbtv-got');
rbtvGot('podcast', { key: 'foo', secret: 'bar' }).then(res => {
console.log(res.body.podcasts);
//=> [...]
});
Same as got
(including the stream API and aliases), but with some additional options below.
Type: string
RBTV access key.
Can be set globally with the RBTV_KEY
environment variable.
Type: string
RBTV access secret.
Can be set globally with the RBTV_SECRET
environment variable.