{"id":19096022,"url":"https://github.com/JulianWowra/opensensemap-client","last_synced_at":"2025-04-18T15:33:31.234Z","repository":{"id":47150859,"uuid":"404804099","full_name":"KillerJulian/opensensemap-client","owner":"KillerJulian","description":"The library allows and improves type-bassed working with the openSenseMap API","archived":false,"fork":false,"pushed_at":"2023-11-26T12:39:46.000Z","size":256,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-28T13:28:57.890Z","etag":null,"topics":["opensensemap","opensensemap-api","opensensemap-api-models","typescript"],"latest_commit_sha":null,"homepage":"https://killerjulian.github.io/opensensemap-client/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KillerJulian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-09T17:01:39.000Z","updated_at":"2023-08-05T11:27:59.000Z","dependencies_parsed_at":"2023-02-09T20:35:14.026Z","dependency_job_id":null,"html_url":"https://github.com/KillerJulian/opensensemap-client","commit_stats":null,"previous_names":[],"tags_count":15,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KillerJulian%2Fopensensemap-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KillerJulian%2Fopensensemap-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KillerJulian%2Fopensensemap-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KillerJulian%2Fopensensemap-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KillerJulian","download_url":"https://codeload.github.com/KillerJulian/opensensemap-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783236,"owners_count":17201897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opensensemap","opensensemap-api","opensensemap-api-models","typescript"],"created_at":"2024-11-09T03:35:38.213Z","updated_at":"2025-04-18T15:33:25.872Z","avatar_url":"https://github.com/KillerJulian.png","language":"TypeScript","readme":"# openSenseMap Client\n\nBased on API version: `v11.2.0`\n\n[![NPM](https://nodei.co/npm/opensensemap-client.png)](https://npmjs.org/package/opensensemap-client)\n\n## Install\n\n```\nyarn add opensensemap-client\n```\n\n## Usage\n\nUsage in TypeScript (with ES Modules):\n\n```typescript\nimport * as client from 'opensensemap-client';\n\nasync function start() {\n  // Get information about a senseBox\n  const r = await client.getBox('57000b8745fd40c8196ad04c').catch((e) =\u003e console.error(e));\n\n  console.log(JSON.stringify(r));\n\n  // Post new sensor data\n  const data: client.PostNewMeasurementsParamData = [];\n  const authToken = 'Your senseBox token';\n\n  data.push({\n    sensor: 'Your sensorId',\n    value: 'Your data'\n  });\n\n  client.postNewMeasurements('Your senseBoxId', data, authToken).catch(console.error);\n}\n\nstart();\n```\n\n---\n\n## Listed functions according to API documentation of openSenseMap\n\n- **Introduction**\n- **Boxes**\n  - [Get one senseBox](https://docs.opensensemap.org/#api-Boxes-getBox)\n    - _Function:_ [`getBox()`](https://killerjulian.github.io/opensensemap-client/functions/getBox.html)\n  - [Get all senseBoxes](https://docs.opensensemap.org/#api-Boxes-getBoxes)\n    - _Function:_ [`getBoxes()`](https://killerjulian.github.io/opensensemap-client/functions/getBoxes.html)\n  - [Post new senseBox](https://docs.opensensemap.org/#api-Boxes-postNewBox)\n    - _Function:_ [`postNewBox()`](https://killerjulian.github.io/opensensemap-client/functions/postNewBox.html)\n  - [Update a senseBox](https://docs.opensensemap.org/#api-Boxes-updateBox)\n    - _Function:_ [`updateBox()`](https://killerjulian.github.io/opensensemap-client/functions/updateBox.html)\n  - [Mark a senseBox and its measurements for deletion](https://docs.opensensemap.org/#api-Boxes-deleteBox)\n    - _Function:_ [`deleteBox()`](https://killerjulian.github.io/opensensemap-client/functions/deleteBox.html)\n  - [Claim a senseBox marked for transfer](https://docs.opensensemap.org/#api-Boxes-claimBox)\n    - _Function:_ [`claimBox()`](https://killerjulian.github.io/opensensemap-client/functions/claimBox.html)\n  - [Download the Arduino script for your senseBox](https://docs.opensensemap.org/#api-Boxes-getSketch)\n    - _Function:_ [`getSketch()`](https://killerjulian.github.io/opensensemap-client/functions/getSketch.html)\n  - [Get locations of a senseBox](https://docs.opensensemap.org/#api-Boxes-getBoxLocations)\n    - _Function:_ [`getBoxLocations()`](https://killerjulian.github.io/opensensemap-client/functions/getBoxLocations.html)\n  - [Get transfer information for a senseBox](https://docs.opensensemap.org/#api-Boxes-getTransfer)\n    - _Function:_ [`getTransfer()`](https://killerjulian.github.io/opensensemap-client/functions/getTransfer.html)\n  - [Mark a senseBox for transferring to a different user](https://docs.opensensemap.org/#api-Boxes-createTransfer)\n    - _Function:_ [`createTransfer()`](https://killerjulian.github.io/opensensemap-client/functions/createTransfer.html)\n  - [Revoke transfer token and remove senseBox from transfer](https://docs.opensensemap.org/#api-Boxes-removeTransfer)\n    - _Function:_ [`removeTransfer()`](https://killerjulian.github.io/opensensemap-client/functions/removeTransfer.html)\n  - [Update a transfer token](https://docs.opensensemap.org/#api-Boxes-updateTransfer)\n    - _Function:_ [`updateTransfer()`](https://killerjulian.github.io/opensensemap-client/functions/updateTransfer.html)\n- **Interpolation**\n  - [Get a Inverse Distance Weighting Interpolation as FeatureCollection](https://docs.opensensemap.org/#api-Interpolation-calculateIdw)\n    - _Function:_ [`calculateIdw()`](https://killerjulian.github.io/opensensemap-client/functions/calculateIdw.html)\n- **Measurements**\n  - [Post new measurement](https://docs.opensensemap.org/#api-Measurements-postNewMeasurement)\n    - _Function:_ [`postNewMeasurement()`](https://killerjulian.github.io/opensensemap-client/functions/postNewMeasurement.html)\n  - [Get the 10000 latest measurements for a sensor](https://docs.opensensemap.org/#api-Measurements-getData)\n    - _Function:_ [`getData()`](https://killerjulian.github.io/opensensemap-client/functions/getData.html)\n  - [Delete measurements of a sensor](https://docs.opensensemap.org/#api-Measurements-deleteMeasurements)\n    - _Function:_ [`deleteMeasurements()`](https://killerjulian.github.io/opensensemap-client/functions/deleteMeasurements.html)\n  - [Get latest measurements for a grouptag as JSON](https://docs.opensensemap.org/#api-Measurements-getDataByGroupTag)\n    - _Function:_ [`getDataByGroupTag()`](https://killerjulian.github.io/opensensemap-client/functions/getDataByGroupTag.html)\n  - [Get latest measurements for a phenomenon as CSV](https://docs.opensensemap.org/#api-Measurements-getDataMulti)\n    - _Function:_ [`getDataMulti()`](https://killerjulian.github.io/opensensemap-client/functions/getDataMulti.html)\n  - [Get latest measurements of a senseBox](https://docs.opensensemap.org/#api-Measurements-getLatestMeasurements)\n    - _Function:_ [`getLatestMeasurements()`](https://killerjulian.github.io/opensensemap-client/functions/getLatestMeasurements.html)\n  - [Get latest measurements of a sensor](https://docs.opensensemap.org/#api-Measurements-getLatestMeasurementOfSensor)\n    - _Function:_ [`getLatestMeasurementOfSensor()`](https://killerjulian.github.io/opensensemap-client/functions/getLatestMeasurementOfSensor.html)\n  - [Post multiple new measurements](https://docs.opensensemap.org/#api-Measurements-postNewMeasurements)\n    - _Function:_ [`postNewMeasurements()`](https://killerjulian.github.io/opensensemap-client/functions/postNewMeasurements.html)\n- **Misc**\n  - [Get some statistics about the database](https://docs.opensensemap.org/#api-Misc-getStatistics)\n    - _Function:_ [`getStatistics()`](https://killerjulian.github.io/opensensemap-client/functions/getStatistics.html)\n  - [print all routes](https://docs.opensensemap.org/#api-Misc-printRoutes)\n    - _Function:_ [`printRoutes()`](https://killerjulian.github.io/opensensemap-client/functions/printRoutes.html)\n- **Statistics**\n  - [Compute basic descriptive statistics over specified time windows](https://docs.opensensemap.org/#api-Statistics-descriptive)\n    - _Function:_ [`descriptive()`](https://killerjulian.github.io/opensensemap-client/functions/descriptive.html)\n- **Users**\n  - [Register new](https://docs.opensensemap.org/#api-Users-register)\n    - _Function:_ [`register()`](https://killerjulian.github.io/opensensemap-client/functions/register.html)\n  - [Delete user, all of its boxes and all of its boxes measurements](https://docs.opensensemap.org/#api-Users-deleteUser)\n    - _Function:_ [`deleteUser()`](https://killerjulian.github.io/opensensemap-client/functions/deleteUser.html)\n  - [Get details](https://docs.opensensemap.org/#api-Users-getUser)\n    - _Function:_ [`getUser()`](https://killerjulian.github.io/opensensemap-client/functions/getUser.html)\n  - [Refresh Authorization](https://docs.opensensemap.org/#api-Users-refresh_auth)\n    - _Function:_ [`refreshAuth()`](https://killerjulian.github.io/opensensemap-client/functions/refreshAuth.html)\n  - [Sign in](https://docs.opensensemap.org/#api-Users-sign_in)\n    - _Function:_ [`signIn()`](https://killerjulian.github.io/opensensemap-client/functions/signIn.html)\n  - [Sign out](https://docs.opensensemap.org/#api-Users-sign_out)\n    - _Function:_ [`signOut()`](https://killerjulian.github.io/opensensemap-client/functions/signOut.html)\n  - [Update user details](https://docs.opensensemap.org/#api-Users-updateUser)\n    - _Function:_ [`updateUser()`](https://killerjulian.github.io/opensensemap-client/functions/updateUser.html)\n  - [confirm email address](https://docs.opensensemap.org/#api-Users-confirm_email)\n    - _Function:_ [`confirmEmail()`](https://killerjulian.github.io/opensensemap-client/functions/confirmEmail.html)\n  - [get specific box of the signed in user](https://docs.opensensemap.org/#api-Users-getUserBox)\n    - _Function:_ [`getUserBox()`](https://killerjulian.github.io/opensensemap-client/functions/getUserBox.html)\n  - [list all boxes and sharedBoxes of the signed in user](https://docs.opensensemap.org/#api-Users-getUserBoxes)\n    - _Function:_ [`getUserBoxes()`](https://killerjulian.github.io/opensensemap-client/functions/getUserBoxes.html)\n  - [request a resend of the email confirmation](https://docs.opensensemap.org/#api-Users-resend_email_confirmation)\n    - _Function:_ [`resendEmailConfirmation()`](https://killerjulian.github.io/opensensemap-client/functions/resendEmailConfirmation.html)\n  - [request password reset](https://docs.opensensemap.org/#api-Users-request_password_reset)\n    - _Function:_ [`requestPasswordReset()`](https://killerjulian.github.io/opensensemap-client/functions/requestPasswordReset.html)\n  - [reset password with passwordResetToken](https://docs.opensensemap.org/#api-Users-password_reset)\n    - _Function:_ [`passwordReset()`](https://killerjulian.github.io/opensensemap-client/functions/passwordReset.html)\n\nYou can find more information in the [full documentation 📖](https://killerjulian.github.io/opensensemap-client/).\n\n## OpenSenseMap API documentation\n\nThis library was created with a lot of work, reading the code from the [OpenSenseMap-API](https://github.com/sensebox/openSenseMap-API) by hand. In addition, this library provides an [Insomnia](https://insomnia.rest/) file for debugging purposes.\n\n**[📄 Insomnia file](https://github.com/KillerJulian/opensensemap-client/blob/master/insomnia.yml)**\n\nImport this file into Insomnia, install the plugins [`customtimestamp`](https://insomnia.rest/plugins/insomnia-plugin-customtimestamp) and [`save-variables`](https://insomnia.rest/plugins/insomnia-plugin-save-variables) and configure the environments if you needed. You are ready!\n\n---\n\n## Author\n\n👤 **KillerJulian \u003cinfo@killerjulian.de\u003e**\n\n- Github: [@KillerJulian](https://github.com/KillerJulian)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/KillerJulian/opensensemap-client/issues). You can also take a look at the [contributing guide](https://github.com/KillerJulian/opensensemap-client/blob/master/CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJulianWowra%2Fopensensemap-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJulianWowra%2Fopensensemap-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJulianWowra%2Fopensensemap-client/lists"}