ht-sdk

1.0.0 • Public • Published

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.couriers
  • ht.customers
  • ht.trips
  • ht.orders
  • ht.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
})

Readme

Keywords

Package Sidebar

Install

npm i ht-sdk

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gaurav.mk