vhx-promise
v0.1.2
Published
Async/promisified Vimeo OTT Node.js API Client.
Downloads
4
Readme
Async/promisified Vimeo OTT Node.js API Client
Use the Vimeo OTT (vhx) API client with async/await or promises.
Installation
npm install vhx-promise
Getting Started
The first step is setting up your instance of the Client:
const vhxPromise = require('vhx-promise');
const vhx = new vhxPromise('YOUR_API_KEY_HERE');
Async/await:
async () => {
// Customer creation example
const customer = await vhx.customers.create({
email: '[email protected]',
name: 'First Last'
});
console.log(customer);
return customer;
};
Promises:
() => {
// Customer creation example
return vhx.customers.create({
email: '[email protected]',
name: 'First Last'
})
.then((customer) => {
console.log(customer);
return customer;
});
};