trak
node.js module for the trak by addy delivery management api https://trak.addy.co/api/docs/
====
install
npm install trak
==== get your api key
- first you need to get your API key from trak.
- do this by running the createApiKey.js script in the following manner, which will create a file called trakKeys.js with your key.
node createApiKey.js email password nameForThisKey
- copy paste this key into trak-addy.js where it says process.env.TRAK_KEY, or better yet -- populate that field from a private file instead of exposing it
====
require trak in your code
var trak = require('trak');
====
method(parameters)
-
trak.jobs.list();
-
trak.jobs.create(recipients, address, destination, scheduledTime, pickupAddress);
-
trak.jobs.find(jobID);
-
trak.jobs.update(jobID, paramsToUpdate);
-
trak.jobs.delete(jobID);
-
trak.drivers.list();
-
trak.createKey(email,password,keyname,callback);
====
to run tests:
mocha
(2014) built by james b. pollack for thistle http://drinkthistle.com