npm.io
1.13.0 • Published 1 week ago

@vonage/vetch

Licence
Apache-2.0
Version
1.13.0
Deps
0
Size
39 kB
Vulns
0
Weekly
0
Stars
397

Vonage Vetch SDK for Node.js

GitHub Workflow Status Codecov Latest Release Contributor Covenant License

Vonage

This is the Vonage Vetcher SDK for Node.js used to wrap a request using node-fetch to call Vonage APIs. To use it you will need a Vonage account. Sign up for free at vonage.com.

For full API documentation refer to developer.vonage.com.

Installation

With NPM

npm install @vonage/vetch
With Yarn
yarn add @vonage/vetch

Using the Vonage Vetch SDK

Vetch will return a VetchResponse

const { request } = require('@vonage/vetch');

const response = await request({
  url: 'https://rest.nexmo.com/account/numbers'
})

console.log(response.data);
// Will output the json data from the API response
Options

options are a superset from the request package. See VetchOptions for more detail

Testing

Run:

npm run test