esp_rainmaker 1.0.0-nullsafety.1 copy "esp_rainmaker: ^1.0.0-nullsafety.1" to clipboard
esp_rainmaker: ^1.0.0-nullsafety.1 copied to clipboard

outdated

A wrapper of the ESP Rainmaker REST API for client-cloud communication.

Introduction #

A wrapper of the ESP Rainmaker REST API for client-cloud communication.

Uses the 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.

Usage #

A simple usage example:

import 'package:esp_rainmaker/esp_rainmaker.dart';

Future<void> main() async {
  final user = User();

  //Create new user
  await user.createUser('email@email.com', 'password12345');

  //Login and extend session
  final login = await user.login('email@email.com', 'password12345');
  await user.extendSession('email@email.com', 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.

5
likes
0
pub points
10%
popularity

Publisher

unverified uploader

A wrapper of the ESP Rainmaker REST API for client-cloud communication.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, isolate_json, meta

More

Packages that depend on esp_rainmaker