myadmin-geotab-api
Unofficial nodejs client for myadmin.geotab.com https://myadmin.geotab.com/sdk#/api-reference
Installation
Using npm:
$ npm i myadmin-geotab-api
Note: add --save if you are using npm < 5.0.0
Getting Started
In Node.js:
Examples:
Using Async/Await Promises
const MyAdminAPI = ; { const username = 'user@domain.com'; const password = '12345678'; const api = username password ; // Call authenticate method:<Promise> const authData = await api; // get user contacts const userContacts = await api; console;};
const MyAdminAPI = ; { const username = 'user@domain.com'; //use apiKey and sessionId valids instead of password const apiKey = '0ff000ff-0000-0ff0-f00f-fff00f00000f'; const sessionId = '00f0000f-0000-0fff-00f0-0fff0f00000f'; //Use Test Environment //https://myadmin.geotab.com/sdk#/getting-started const uri = 'https://myadminapitest.geotab.com/v2/MyAdminApi.ashx'; const api = username apiKey sessionId uri ; // get user contacts const userContacts = await api; console;};
Using Promises then catch
const MyAdminAPI = ; { const username = 'user@domain.com'; const password = '12345678'; const api = username password ; // Call authenticate method:<Promise> api ;};