angarum
A library which helps you focus on your delivery.
Last updated 3 years ago by ppsreejith .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install angarum 
SYNC missed versions from official npm registry.

This Library attempts to unify the API of different delivery providers in India.

##Installation npm install angarum

##Instructions

To add a new partner, use

./generate partner_name

To generate a new partner as partner_name.js . Preferably use lower case letters and underscore.

##Usage

var ang = require("angarum");

//To access a partner (case insensitive), we use:
var partner = ang.Partner("delhivery");

//To Create a new order, we use:
var newOrder = new ang.Order({}); //Checkout Schemas/order_schema.js for information on what to pass to ang.Order.
partner.order(newOrder, function(res, body) {
    console.log(res); //Network response object
    console.log(body); // Checkout Schemas/order_schema.js for output json object
})

//Similarly, for tracking url, tracking status and cancellation respectively,
var track = new a.Track();
var tracking_status = new a.TrackingStatus({"awb_number" : "some_awb_no:"});
var cancel = new a.Cancel({});
partner.track(track, (res, body) => {console.log(res, body);});
partner.tracking_status(tracking_status, (res, body) => {console.log(res, body);});
partner.cancel(cancel, (res, body) => {console.log(res, body);});

//See their schemas inside Schemas/ for more information

Current Tags

  • 1.2.15                                ...           latest (3 years ago)

35 Versions

  • 1.2.15                                ...           3 years ago
  • 1.2.14                                ...           3 years ago
  • 1.2.13                                ...           3 years ago
  • 1.2.12                                ...           3 years ago
  • 1.2.11                                ...           3 years ago
  • 1.2.10                                ...           3 years ago
  • 1.2.9                                ...           3 years ago
  • 1.2.8                                ...           3 years ago
  • 1.2.7                                ...           3 years ago
  • 1.2.6                                ...           3 years ago
  • 1.2.5                                ...           3 years ago
  • 1.2.4                                ...           3 years ago
  • 1.2.3                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.32                                ...           3 years ago
  • 1.1.31                                ...           3 years ago
  • 1.1.30                                ...           3 years ago
  • 1.1.22                                ...           3 years ago
  • 1.1.21                                ...           3 years ago
  • 1.1.20                                ...           3 years ago
  • 1.1.11                                ...           3 years ago
  • 1.1.10                                ...           3 years ago
  • 1.1.9                                ...           3 years ago
  • 1.1.8                                ...           3 years ago
  • 1.1.6                                ...           3 years ago
  • 1.1.4                                ...           3 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 72
Dependencies (8)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |