1.11.0 • Published 5 months ago

@vonage/users v1.11.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Vonage Users SDK for Node.js

GitHub Workflow Status (branch) Codecov Latest Release Contributor Covenant License

This is the Vonage Users SDK for Node.js for use with 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.nexmo.com.

Installation

With NPM

npm install @vonage/users

With Yarn

yarn add @vonage/users

Usage

The SDK can be used standalone from the main Vonage Server SDK for Node.js if you only need to use the Users API. All you need to do is require('@vonage/users'), and use the returned object to create your own client.

const {Auth} = require('@vonage/auth');
const {User} = require('@vonage/user');

const usersClient = new User(new Auth({
  apiKey: API_KEY,
  apiSecret: API_SECRET,
  applicationId: APP_ID,
  privateKey: PRIVATE_KEY_PATH,
}), 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.

const resp = await usersClient.getUser(USER_ID);

usersClient.getUser(USER_ID)
  .then(resp => console.log(resp))
  .catch(err => console.error(err));

Testing

Run:

npm run test
1.11.0

5 months ago

1.10.1

8 months ago

1.10.0

9 months ago

1.9.0

10 months ago

1.8.0

11 months ago

1.7.0

12 months ago

1.6.1

12 months ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago