1.0.0 • Published 7 years ago

trackmelk_api v1.0.0

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

trackmelk_api

TrackmelkApi - JavaScript client for trackmelk_api No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: v1
  • 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 trackmelk_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/trackmelk_api then install it via:

    npm install YOUR_USERNAME/trackmelk_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 TrackmelkApi = require('trackmelk_api');

var defaultClient = TrackmelkApi.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 TrackmelkApi.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
TrackmelkApi.DevicesApideviceDeleteDELETE /devices
TrackmelkApi.DevicesApidevicePostPOST /devices
TrackmelkApi.DevicesApidevicePutPUT /devices
TrackmelkApi.DevicesApideviceSharePOST /devices/{deviceId}/share
TrackmelkApi.DevicesApideviceStopSharingDELETE /devices/{deviceId}/share
TrackmelkApi.DevicesApidevicesGetGET /devices
TrackmelkApi.LoginApiusersPostPOST /login
TrackmelkApi.PositionsApidevicePositionsGetGET /positions/{deviceId}
TrackmelkApi.PositionsApihistoryPositionsGetGET /positions/history/{deviceId}
TrackmelkApi.PositionsApipositionsGetGET /positions
TrackmelkApi.Recover_passwordApirecoveryPasswordPOST /recover_password
TrackmelkApi.Recover_passwordApiusersPutPUT /recover_password
TrackmelkApi.UsersApigetCurrentUserGET /users/me
TrackmelkApi.UsersApiregisterNewUserPOST /users
TrackmelkApi.UsersApiupdateCurrentUserPUT /users/me

Documentation for Models

Documentation for Authorization

TrackMe-Api-Key

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