track_me_api v1.0.0
track_me_api
TrackMeApi - JavaScript client for track_me_api TrackMe GPS Server API This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install track_me_api --save
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/track_me_api then install it via:
npm install YOUR_USERNAME/track_me_api --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Getting Started
Please follow the installation instruction and execute the following JS code:
var TrackMeApi = require('track_me_api');
var defaultClient = TrackMeApi.ApiClient.instance;
// Configure API key authorization: TrackMe-Api-Key
var TrackMe-Api-Key = defaultClient.authentications['TrackMe-Api-Key'];
TrackMe-Api-Key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TrackMe-Api-Key.apiKeyPrefix['TrackMe-Api-Key'] = "Token"
var api = new TrackMeApi.DevicesApi()
var opts = {
'id': 789, // {Number} identifier of device to be deleted
'uniqueId': "uniqueId_example" // {String} IMEI of device to be deleted
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.deviceDelete(opts, callback);
Documentation for API Endpoints
All URIs are relative to https://trackme.lk/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
TrackMeApi.DevicesApi | deviceDelete | DELETE /devices | |
TrackMeApi.DevicesApi | devicePost | POST /devices | |
TrackMeApi.DevicesApi | devicePut | PUT /devices | |
TrackMeApi.DevicesApi | deviceShare | POST /devices/{deviceId}/share | |
TrackMeApi.DevicesApi | deviceStopSharing | DELETE /devices/{deviceId}/share | |
TrackMeApi.DevicesApi | devicesGet | GET /devices | |
TrackMeApi.LoginApi | usersPost | POST /login | |
TrackMeApi.PositionsApi | devicePositionsGet | GET /positions/{deviceId} | |
TrackMeApi.PositionsApi | positionsGet | GET /positions | |
TrackMeApi.Recover_passwordApi | recoverPassword | POST /recover_password | |
TrackMeApi.Recover_passwordApi | usersPut | PUT /recover_password | |
TrackMeApi.UsersApi | getCurrentUser | GET /users/me | |
TrackMeApi.UsersApi | registerUsers | POST /users |
Documentation for Models
- TrackMeApi.Device
- TrackMeApi.Error
- TrackMeApi.LoginInfo
- TrackMeApi.Position
- TrackMeApi.User
- TrackMeApi.UserSettings
Documentation for Authorization
TrackMe-Api-Key
- Type: API key
- API key parameter name: TrackMe-Api-Key
- Location: HTTP header
7 years ago