bvckup2

0.0.2 • Public • Published

node-bvckup2

NPM Package

A simple module for using the Bvckup2 Dashboard API.

Install using npm install --save bvckup2 or clone the repo

Examples

Init the object

const Bvckup2 = require('bvckup2');
 
// You should change this to your real API key
// or use environment variable BVCKUP2_API_KEY
const apiKey = 'api_secret_000011112222';
const bvckup2 = new Bvckup2(process.env.BVCKUP2_API_KEY || apiKey);

List all licenses

bvckup2.listAllLicenses({}, (err, licenses) => {
  if (err) return console.error('Error',err);
  console.log('Found',licenses.length,'licenses!');
  console.log(licenses);
});

Get a specific license

const licenseId = 'ABCD-1234-5678-9123';
bvckup2.getLicense(licenseId, (err, licenseInfo) => {
  if (err) return console.error('Error',err);
  console.log('Got License Info', licenseInfo);
});

Also supports promises!

const licenseId = 'ABCD-1234-5678-9123';
bvckup2.getLicenseAsync(licenseId).then((licenseInfo) => {
  console.log('Got License Info', licenseInfo);
}).error((err) => {
  console.error('Error',err);
});

License MIT

Readme

Keywords

Package Sidebar

Install

npm i bvckup2

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • hongkongkiwi