0.1.5 • Published 8 years ago

majorexpress v0.1.5

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

majorexpress

NodeJS API for MajorExpress Web Services

Install

npm install --save majorexpress

Usage

var MajorExpress = require('majorexpress');
var api = new MajorExpress('username', 'password');

// get cities
api.getCities().then(result => {
    // do something with array of
    // Location {
    //    code:number,
    //    city:string, // city name
    //    parent:string, // a region or a capital city
    //    agent: {
    //       code:number,
    //       name:string
    //    }
    // }
});

// calculate a delivery
api.calculate(
    originCityCode, 
    destinationCityCode, 
    weight, 
    cargoCost
).then(result => {
    // do something with 
    // Calculation {
    //    city:string;
    //    parent:string;
    //    cost:number;
    //    insurance:number;
    //    time:number; // delivery time in days
    // }
});
0.1.5

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago