npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

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

install

npm i bvckup2

Downloadsweekly downloads

0

version

0.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability