Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

izatop/majorexpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    // }
});

About

NodeJS API for MajorExpress Web Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published