1.515.2 • Published 9 years ago

boxc v1.515.2

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

BoxC

An Unofficial NodeJS Library for BoxC API

Compatibility: Node.js version 5+

Install with npm:

npm install boxc

Official Documentation HERE

API

Create access token

Generates authorization URL

const BoxC = require('boxc');

// Get authorization url
var authorizationURL = BoxC.getAuthorizationURL(APPLICATION_ID, returnURI);

//... after user got authorized, you get nonce

BoxC.createAccessToken(APPLICATION_ID, APPLICATION_SECRET, nonce)
  .then(accessToken => new BoxC(accessToken));

// if last argument will be true, you don't need invoke "new BoxC(accessToken)"

BoxC.createAccessToken(APPLICATION_ID, APPLICATION_SECRET, nonce, true)
  .then(api => {
    // work with boxc api
  });
    
// or create using (/static?) constructor
(new BoxC(token)) instanceof BoxC
BoxC.create(token) instanceof BoxC

Entry Points

Estimate

Invoices

Labels

Manifests

Overpacks

Shipments

Users

Examples

estimate

api.estimate({
  country: 'US', // not required, now - default & only US
  postal_code: '94041', // destination postal code
  entry_point: 'HKCN', // https://api.boxc.com/site/entry-points
  height: 10, // cm
  width: 10, // cm
  length: 10, // cm
  weight: 0.9 // kg
}).then(estimate => console.log(estimate));
1.515.2

9 years ago

1.515.1

9 years ago

1.515.0

9 years ago

1.154.10

10 years ago

1.154.5

10 years ago

1.154.3

10 years ago

1.154.2

10 years ago

1.154.1

10 years ago

1.154.0

10 years ago

1.15.4

10 years ago

1.5.4-b

10 years ago