rbtv-got

3.1.0 • Public • Published

rbtv-got Build Status

Convenience wrapper for got to interact with the RBTV API

Install

$ npm install rbtv-got

Usage

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);
  //=> [...]
});

API

Same as got (including the stream API and aliases), but with some additional options below.

key

Type: string

RBTV access key.

Can be set globally with the RBTV_KEY environment variable.

secret

Type: string

RBTV access secret.

Can be set globally with the RBTV_SECRET environment variable.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.1.0
    0
    • latest

Version History

Package Sidebar

Install

npm i rbtv-got

Weekly Downloads

0

Version

3.1.0

License

MIT

Unpacked Size

4.42 kB

Total Files

4

Last publish

Collaborators

  • dertieran