@singletonar/intellidrone-api-client-js

This Intellidrone API client javascript library designed by [Singleton](http://singleton.com.ar). You can find out more about Swagger at [Singleton Web Page](http://singleton.com.ar) or on [Intellidrone Web Page](http://robotagro.com).


Keywords
js, library, npm, swagger
License
Sendmail
Install
npm install @singletonar/intellidrone-api-client-js@1.0.2

Documentation

@singletonar/intellidrone-api-client-js

The main repository is hosted in gitlab.com/intellidrone/api-js-client but it is automaticaly mirrored to github.com and to gitlab.com/intellidrone/apis/latest. If you are in the Github page it may occur that is not updated to the last version.

JavaScript client for Intellidrone API designed by Singleton. You can find out more about Swagger at Singleton Web Page or on Intellidrone Web Page. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.1

For more information, please visit http://singleton.com.ar/soporte

Installation

For Node.js

npm

If the library was published, then install it via:

npm install @singletonar/intellidrone-api-client-js --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your @singletonar/intellidrone-api-client-js from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('@singletonar/intellidrone-api-client-js') in javascript files from the directory you ran the last command above from.

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, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var intellidrone_api_client_js = require('@singletonar/intellidrone-api-client-js');

var defaultClient = intellidrone_api_client_js.ApiClient.instance;

// Configure API key authorization: appToken
var appToken = defaultClient.authentications['appToken'];
appToken.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//appToken.apiKeyPrefix['x_app_id'] = "Token"

// Configure API key authorization: userToken
var userToken = defaultClient.authentications['userToken'];
userToken.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//userToken.apiKeyPrefix['x_user_key'] = "Token"

var api = new intellidrone_api_client_js.ActividadesApi()

var actividad = new intellidrone_api_client_js.Actividades(); // {Actividades}

api.addActividad(actividad).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


Documentation for API Endpoints

All URIs are relative to http://web.robotagro.com/api/latest

Class Method HTTP request Description
intellidrone_api_client_js.ActividadesApi addActividad POST /Actividades Add one Actividad.
intellidrone_api_client_js.ActividadesApi addActividades POST /Actividades/upload Add actividades from a file.
intellidrone_api_client_js.ActividadesApi deleteActividad DELETE /Actividades/{id} Delete one Actividad.
intellidrone_api_client_js.ActividadesApi editActividad PUT /Actividades Edit one Actividad.
intellidrone_api_client_js.ActividadesApi getActividadById GET /Actividades/{id} Get one Actividad.
intellidrone_api_client_js.ActividadesApi getActividades GET /Actividades Get all Actividades.
intellidrone_api_client_js.LotesApi addLote POST /Lotes Add one lote.
intellidrone_api_client_js.LotesApi deleteLote DELETE /Lotes/{id} Delete one lote.
intellidrone_api_client_js.LotesApi editLote PUT /Lotes Edit one lote.
intellidrone_api_client_js.LotesApi getLoteById GET /Lotes/{id} Get one lote.
intellidrone_api_client_js.LotesApi getLotes GET /Lotes Get all lotes.
intellidrone_api_client_js.UsersApi addUser POST /Users Add one User.
intellidrone_api_client_js.UsersApi deleteUsers DELETE /Users/{id} Delete one Users.
intellidrone_api_client_js.UsersApi editUser PUT /Users Edit one User.
intellidrone_api_client_js.UsersApi getUserById GET /Users/{id} Get one User.
intellidrone_api_client_js.UsersApi getUsers GET /Users Get all Users.
intellidrone_api_client_js.UsersApi login GET /Users/Login Logs user into the system
intellidrone_api_client_js.UsersApi logout GET /Users/Logout Logs out current logged in user session
intellidrone_api_client_js.VacasApi addVaca POST /Vacas Add one vaca.
intellidrone_api_client_js.VacasApi deleteVaca DELETE /Vacas/{id} Delete one vaca.
intellidrone_api_client_js.VacasApi editVaca PUT /Vacas Edit one vaca.
intellidrone_api_client_js.VacasApi getVacas GET /Vacas Get all vacas.
intellidrone_api_client_js.VacasApi getVacasById GET /Vacas/{id} Get one vaca.

Documentation for Models

Documentation for Authorization

appToken

  • Type: API key
  • API key parameter name: x_app_id
  • Location: HTTP header

userToken

  • Type: API key
  • API key parameter name: x_user_key
  • Location: HTTP header