https://github.com/chmoore889/esp_rainmaker
A wrapper of the ESP Rainmaker REST API for client-cloud communication.
https://github.com/chmoore889/esp_rainmaker
esp-rainmaker esp32 espressif
Last synced: about 1 month ago
JSON representation
A wrapper of the ESP Rainmaker REST API for client-cloud communication.
- Host: GitHub
- URL: https://github.com/chmoore889/esp_rainmaker
- Owner: chmoore889
- License: gpl-3.0
- Created: 2020-12-20T00:33:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-23T23:01:20.000Z (over 3 years ago)
- Last Synced: 2025-03-24T10:38:53.303Z (about 2 months ago)
- Topics: esp-rainmaker, esp32, espressif
- Language: Dart
- Homepage: https://pub.dev/packages/esp_rainmaker
- Size: 115 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction
A wrapper of the ESP Rainmaker REST API for client-cloud communication.Uses the [isolate_json](https://pub.dev/packages/isolate_json) package for decoding/encoding JSONs. This allows this package to use the same isolate for decoding/encoding as this package's complement, [esp_rainmaker_local_control](https://pub.dev/packages/esp_rainmaker_local_control).
## Usage
A simple usage example:
```dart
import 'package:esp_rainmaker/esp_rainmaker.dart';Future main() async {
final user = User();//Create new user
await user.createUser('[email protected]', 'password12345');//Login and extend session
final login = await user.login('[email protected]', 'password12345');
await user.extendSession('[email protected]', login.refreshToken);//Add node mapping and check status
final nodeAssociation = NodeAssociation(login.accessToken);
final reqId = await nodeAssociation.addNodeMapping('nodeid1234', 'very_secret_key');
await nodeAssociation.getMappingStatus(reqId);
}
```## Features and bugs
Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/chmoore889/esp_rainmaker/issues