1.0.0 • Published 7 years ago

track_me_api v1.0.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
7 years ago

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

ClassMethodHTTP requestDescription
TrackMeApi.DevicesApideviceDeleteDELETE /devices
TrackMeApi.DevicesApidevicePostPOST /devices
TrackMeApi.DevicesApidevicePutPUT /devices
TrackMeApi.DevicesApideviceSharePOST /devices/{deviceId}/share
TrackMeApi.DevicesApideviceStopSharingDELETE /devices/{deviceId}/share
TrackMeApi.DevicesApidevicesGetGET /devices
TrackMeApi.LoginApiusersPostPOST /login
TrackMeApi.PositionsApidevicePositionsGetGET /positions/{deviceId}
TrackMeApi.PositionsApipositionsGetGET /positions
TrackMeApi.Recover_passwordApirecoverPasswordPOST /recover_password
TrackMeApi.Recover_passwordApiusersPutPUT /recover_password
TrackMeApi.UsersApigetCurrentUserGET /users/me
TrackMeApi.UsersApiregisterUsersPOST /users

Documentation for Models

Documentation for Authorization

TrackMe-Api-Key

  • Type: API key
  • API key parameter name: TrackMe-Api-Key
  • Location: HTTP header