1.0.0 • Published 10 years ago
ht-sdk v1.0.0
ht-node-sdk
Instalation
npm install ht-sdk --save
Geting Started
Import installed package and instantiate it using your secret key
var ht = require('ht-sdk')(<secret key>)
API Overview
ht object provided folowing sub-objects
ht.couriersht.customersht.tripsht.ordersht.places
Each sub-object has following methods
get(objectId)(get object with particular objectId)index()(get list of a particular item)create(obj)(create new item)update(objectId, obj)(update item of particular objectId with given obj)
###Example To fetch a courier with id 3
ht.couriers.get(3).then(function(data){
// data is the customer with id 3
})To get all customers
ht.customers.index().then(function(customers){
//customers is the list of all customers
})1.0.0
10 years ago