@vonage/voice
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "@vonage/voice", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Vonage Voice API", | ||
@@ -34,5 +34,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@vonage/auth": "^1.2.0", | ||
"@vonage/server-client": "^1.3.0", | ||
"@vonage/vetch": "^1.2.0" | ||
"@vonage/auth": "^1.3.0", | ||
"@vonage/server-client": "^1.4.0", | ||
"@vonage/vetch": "^1.3.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "devDependencies": { |
# Vonage Voice SDK for Node.js | ||
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/vonage/vonage-node-sdk/Vonage/3.x?logo=github&style=flat-square&label=Workflow%20Build) | ||
[![Codecov](https://img.shields.io/codecov/c/github/vonage/vonage-node-sdk?label=Codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/Vonage/vonage-server-sdk) | ||
![Latest Release](https://img.shields.io/npm/v/@vonage/voice) | ||
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](../../CODE_OF_CONDUCT.md) | ||
[![License](https://img.shields.io/npm/l/@vonage/voice?label=License&style=flat-square)][license] | ||
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vonage/vonage-node-sdk/ci.yml?branch=3.x) [![Codecov](https://img.shields.io/codecov/c/github/vonage/vonage-node-sdk?label=Codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/Vonage/vonage-server-sdk) ![Latest Release](https://img.shields.io/npm/v/@vonage/voice?label=%40vonage%2Fvoice&style=flat-square) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](../../CODE_OF_CONDUCT.md) [![License](https://img.shields.io/npm/l/@vonage/accounts?label=License&style=flat-square)][license] | ||
<img src="https://developer.nexmo.com/images/logos/vbc-logo.svg" height="48px" alt="Vonage" /> | ||
This is the Vonage Voice SDK for Node.js for use with | ||
[Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage | ||
account. Sign up [for free at vonage.com][signup]. | ||
This is the Vonage Voice SDK for Node.js for use with [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free at vonage.com][signup]. | ||
We recommend using this package as part of the overall | ||
[`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). | ||
For full API documentation refer to [developer.vonage.com](https://developer.vonage.com/). | ||
For full API documentation refer to | ||
[developer.vonage.com](https://developer.vonage.com/). | ||
* [Installation](#installation) | ||
* [Usage](#using-the-vonage-voice-sdk) | ||
* [Usage](#usage) | ||
* [Promises](#promises) | ||
@@ -28,8 +20,5 @@ * [Testing](#testing) | ||
We recommend using this SDK as part of the overall | ||
[`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). | ||
Please see the main package for installation. | ||
We recommend using this SDK as part of the overall [`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). Please see the main package for installation. | ||
You can also use this SDK standalone if you only need access to just the Voice | ||
API. | ||
You can also use this SDK standalone if you only need access to just the Voice API. | ||
@@ -48,8 +37,7 @@ ### With NPM | ||
## Using the Vonage Voice SDK | ||
## Usage | ||
### As part of the Vonage Server SDK | ||
If you are using this SDK as part of the Vonage Server SDK, you can access it | ||
as the `voice` property off of the client that you instantiate. | ||
If you are using this SDK as part of the Vonage Server SDK, you can access it as the `voice` property off of the client that you instantiate. | ||
@@ -60,4 +48,4 @@ ```js | ||
const credentials = { | ||
applicationId: APP_ID, | ||
privateKey: PRIVATE_KEY_PATH, | ||
applicationId: APP_ID, | ||
privateKey: PRIVATE_KEY_PATH, | ||
}; | ||
@@ -74,7 +62,3 @@ const options = {}; | ||
The SDK can be used standalone from the main | ||
[Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk) if | ||
you only need to use the Voice API. All you need to do is | ||
`require('@vonage/voice')`, and use the returned object to create your own | ||
client. | ||
The SDK can be used standalone from the main [Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk) if you only need to use the Voice API. All you need to do is `require('@vonage/voice')`, and use the returned object to create your own client. | ||
@@ -86,4 +70,4 @@ ```js | ||
const credentials = new Auth({ | ||
applicationId: APP_ID, | ||
privateKey: PRIVATE_KEY_PATH, | ||
applicationId: APP_ID, | ||
privateKey: PRIVATE_KEY_PATH, | ||
}); | ||
@@ -94,9 +78,7 @@ const options = {}; | ||
Where `credentials` is any option from [`@vonage/auth`](https://github.com/Vonage/vonage-node-sdk/tree/3.x/readme/packages/auth#options), | ||
and `options` is any option from [`@vonage/server-client`](https://github.com/Vonage/vonage-node-sdk/tree/3.x/readme/packages/server-client#options) | ||
Where `credentials` is any option from [`@vonage/auth`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md#options), and `options` is any option from [`@vonage/server-client`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/README.md#options) | ||
## Promises | ||
Most methods that interact with the Vonage API uses Promises. You can either | ||
resolve these yourself, or use `await` to wait for a response. | ||
Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use `await` to wait for a response. | ||
@@ -107,4 +89,4 @@ ```js | ||
vonage.voice.getCall(CALL_UUID) | ||
.then(resp => console.log(resp)) | ||
.catch(err => console.error(err)); | ||
.then(resp => console.log(resp)) | ||
.catch(err => console.error(err)); | ||
``` | ||
@@ -111,0 +93,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73782
97
Updated@vonage/auth@^1.3.0
Updated@vonage/server-client@^1.4.0
Updated@vonage/vetch@^1.3.0