new Client(optionsopt)
An API client.
All the module functions can be accessed using a client
Parameters:
Name |
Type |
Attributes |
Description |
options |
Object
|
<optional>
|
Properties
Name |
Type |
Description |
key |
String
|
API key |
secret |
String
|
API secret |
proxy |
String
|
a valid URL to use as proxy |
|
- Source:
Example
// create a new client
var client = new sdk.Client({ key: "SoM3C0mP1exKey", secret: "pSu3d0rAnD0mS3CrEt" });
// retrieive a single traffic update
client.trafficUpdates.getOne(1, function(err, items) {
console.log(err, items);
});