1.7.0 ā€¢ Published 6 months ago

opensensemap-client v1.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

openSenseMap Client

Based on API version: v11.2.0

NPM

Install

yarn add opensensemap-client

Usage

Usage in TypeScript (with ES Modules):

import * as client from 'opensensemap-client';

async function start() {
  // Get information about a senseBox
  const r = await client.getBox('57000b8745fd40c8196ad04c').catch((e) => console.error(e));

  console.log(JSON.stringify(r));

  // Post new sensor data
  const data: client.PostNewMeasurementsParamData = [];
  const authToken = 'Your senseBox token';

  data.push({
    sensor: 'Your sensorId',
    value: 'Your data'
  });

  client.postNewMeasurements('Your senseBoxId', data, authToken).catch(console.error);
}

start();

Listed functions according to API documentation of openSenseMap

You can find more information in the full documentation šŸ“–.

OpenSenseMap API documentation

This library was created with a lot of work, reading the code from the OpenSenseMap-API by hand. In addition, this library provides an Insomnia file for debugging purposes.

šŸ“„ Insomnia file

Import this file into Insomnia, install the plugins customtimestamp and save-variables and configure the environments if you needed. You are ready!


Author

šŸ‘¤ KillerJulian info@killerjulian.de

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.

1.7.0

6 months ago

1.6.0

10 months ago

1.5.1

11 months ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago