thingsboard_pe_client 1.0.7 copy "thingsboard_pe_client: ^1.0.7" to clipboard
thingsboard_pe_client: ^1.0.7 copied to clipboard

outdated

Dart implementation of ThingsBoard PE API client. Provides model objects and services to communicate with ThingsBoard PE platform using RESTful APIs and WebSocket protocol.

example/thingsboard_pe_client.dart

import 'package:thingsboard_pe_client/thingsboard_client.dart';

const thingsBoardApiEndpoint = 'http://localhost:8080';

void main() async {
  try {
    var tbClient = ThingsboardClient(thingsBoardApiEndpoint);
    await tbClient.login(LoginRequest('[email protected]', 'tenant'));

    print('isAuthenticated=${tbClient.isAuthenticated()}');

    print('authUser: ${tbClient.getAuthUser()}');

    var currentUserDetails = await tbClient.getUserService().getUser();
    print('currentUserDetails: $currentUserDetails');

    await tbClient.logout();
  } catch (e, s) {
    print('Error: $e');
    print('Stack: $s');
  }
}
4
likes
0
points
544
downloads

Publisher

verified publisherthingsboard.io

Weekly Downloads

Dart implementation of ThingsBoard PE API client. Provides model objects and services to communicate with ThingsBoard PE platform using RESTful APIs and WebSocket protocol.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, dio, jwt_decoder, web_socket_channel

More

Packages that depend on thingsboard_pe_client