opensensemap-client
TypeScript icon, indicating that this package has built-in type declarations

1.7.0 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.7.03latest

Version History

VersionDownloads (Last 7 Days)Published
1.7.03
1.6.01
1.5.10
1.5.00
1.4.00
1.3.10
1.3.01
1.2.20
1.2.10
1.2.00
1.1.21
1.1.10
1.1.00
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i opensensemap-client

Weekly Downloads

4

Version

1.7.0

License

MIT

Unpacked Size

83.7 kB

Total Files

162

Last publish

Collaborators

  • killerjulian