superagent-ovh

1.0.1 • Public • Published

superagent-ovh

This module provides the signature required for ovh.com's public API, as a plugin for superagent.

npm install --save superagent superagent-prefix superagent-ovh
const ovh = require('superagent-ovh')

const ovh_sign = ovh.sign({
  appKey: ,
  appSecret: ,
  consumerKey: 
})

const request = require('superagent').agent()
  .use(require('superagent-prefix')('https://eu.api.ovh.com/1.0'))
  .accept('json')

// Just make sure `.use(ovh_sign)` is last in the chain.

request
  .get('/me')
  .use(ovh_sign)
  .end( (err,{body}) => {
    // Do something
  })

request
  .put('/me')
  .send(data)
  .use(ovh_sign)
  .end( (err,{body}) => {  } )

Readme

Keywords

none

Package Sidebar

Install

npm i superagent-ovh

Weekly Downloads

2

Version

1.0.1

License

Unlicense

Unpacked Size

6.03 kB

Total Files

5

Last publish

Collaborators

  • shimaore