1.0.8 • Published 5 years ago

itwo40 v1.0.8

Weekly downloads
2
License
Apache-2.0
Repository
-
Last release
5 years ago

NodeJS SDK

SDK includes ready-made data structures and takes care of all the gritty.

If you want to access our APIs (other than the Download API) from a NodeJS application, the NodeJS SDK can make it a lot easier. Our NodeJS SDK includes ready-made data structures and takes care of all the gritty, low-level HTTP intricacies for you.

Installation

npm

Then install it via:

npm install itwo40.sdk --save

Getting Started

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

Configuration

  var ITwo40Api = require('itwo40');
  var apiV = new ITwo40Api.BasicsapivApi();
  var configration = {
    "basePath": "https:/basePath",
        "username": "username",
        "password": "password",
        "dataLanguageId": "1",
        "language": "en",
        "culture": "en-gb",
        "comanyCode": "001",
        "roleId": ""
    }
    const readFilePromise = () => {
        return new Promise((resolve, reject) => {
            apiV.initialize(configration, function (data) {
                resolve(data)
        });
    })
}

Implementation

    var apiV = new ITwo40Api.DefectpublicapivApi();
    var filter = { "top": 100 }
    const readFilePromise = () => {
        return new Promise((resolve, reject) => {
            apiV.getDefectV20(filter, function (error, data, response) {
                if (error) {
                    reject(error)
                } else {
                    resolve(response["body"])
                }
            });
        })
    }
    var apiV = new ITwo40Api.DefectpublicapivApi();
    var a = { "top": 100 }
    const readFilePromise = () => {
        return new Promise((resolve, reject) => {
            apiV.deleteDefectidV20(1000004, function (error, data, response) {
                if (error) {
                    reject(error)
                } else {
                    resolve(response)
                }
            });
        })
    }
    var apiV = new ITwo40Api.ResourcepublicapivApi();
    var a = { "top": 100 }
    const readFilePromise = () => {
        return new Promise((resolve, reject) => {
            apiV.getPlantMeterreadingV10(a, function (error, data, response) {
                if (error) {
                    reject(error)
                } else {
                    resolve(response["body"])
                }
            });
        })
    }
1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago