open-index/open-npm huggingface dataset:
npm package: @infinite-automation/mango-client
Description: Mango Automation REST API client
Author: Jared Wiltshire
Latest version: 1.2.1
Deprecated: This package is no longer supported (used by Mango 4.x only), please use @radixiot/mango-client instead.

# Node.js Mango API Client

Mango Automation REST API client for Node.js written in ES6.

## Usage
**Run "npm install mango-client" first**

```
const MangoClient = require('@infinite-automation/mango-client');

const client = new MangoClient({
    protocol: 'https',
    host: 'localhost',
    port: 8443,
    rejectUnauthorized: false
});

const DataPoint = client.DataPoint;
const User = client.User;

User.login('admin', 'admin').then(data => {
    console.log(`Logged in as '${data.username}'.`);
    return DataPoint.getValue('internal_mango_num_data_points');
}).then(data => {
    console.log(`There are ${data.value} data points.`);

    // you can perform any arbitrary rest request like this
    return client.restRequest({
        path: '/rest/v1/data-points/internal_mango_num_data_points',
        method: 'GET',
        //data: {object}
    });
}).then(response => {
    console.log(`The data point's name is '${response.data.name}'`);
});
```
npm package: @infinite-automation/mango-module-tools
Description: Tools used for building and testing Mango Automation modules
Author: Jared Wiltshire
Latest version: 2.7.2
Deprecated: This package is no longer supported (used by Mango 4.x only), please use @radixiot/mango-module-tools instead.

# mango-module-tools
Tools used for building and testing Mango Automation modules

To upgrade the version of this tool in all modules run this command from the maven parent:
```
mvn generate-resources -Pyarn-run -DyarnRunArgs="upgrade @infinite-automation/mango-module-tools"
```