shipit
Advanced tools
Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "shipit", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "This module allows you to connect to many shipping carriers like UPS and FedEx and download tracking data for your packages in a common schema", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -13,2 +13,3 @@ ## What is this? | ||
* OnTrac | ||
* Amazon | ||
@@ -50,2 +51,4 @@ ## Usage | ||
upsmi = new UpsMiClient() | ||
amazonClient = new AmazonClient() | ||
``` | ||
@@ -60,2 +63,11 @@ | ||
You can use the Amazon client to query status of an item by its order ID and shipment ID (packageId defaults to 1 - shipit does not yet support multiple shipments per order). | ||
```coffeescript | ||
orderID = '106-9151392-7203433' | ||
orderingShipmentId = '2759102494123' | ||
amazonClient.requestData {orderID, orderingShipmentId}, (err, result) -> | ||
console.log "[ERROR] error retrieving tracking data #{err}" if err? | ||
console.log "[DEBUG] new tracking data received #{JSON.stringify(result)}" if result? | ||
``` | ||
Example response returned: | ||
@@ -85,3 +97,6 @@ ``` | ||
"eta": "2014-02-17T15:30:00.000Z", | ||
"destination": "US" | ||
"destination": "US", | ||
"request": { | ||
"trackingNumber": "9400110200881269505160" | ||
} | ||
} | ||
@@ -88,0 +103,0 @@ ``` |
80347
145