https://github.com/thingsboard/dart_thingsboard_client
ThingsBoard API client library for Dart developers.
https://github.com/thingsboard/dart_thingsboard_client
Last synced: 4 months ago
JSON representation
ThingsBoard API client library for Dart developers.
- Host: GitHub
- URL: https://github.com/thingsboard/dart_thingsboard_client
- Owner: thingsboard
- License: bsd-3-clause
- Created: 2021-04-20T10:20:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-10-08T13:10:13.000Z (8 months ago)
- Last Synced: 2025-10-08T15:12:44.950Z (8 months ago)
- Language: Dart
- Size: 299 KB
- Stars: 62
- Watchers: 6
- Forks: 33
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ThingsBoard API client library for Dart developers. Provides model objects and services to communicate with ThingsBoard platform using RESTful APIs and WebSocket protocol.
Current client version is compatible with ThingsBoard starting from version 3.6.3.
## Usage
A simple usage example:
```dart
import 'package:thingsboard_client/thingsboard_client.dart';
main() async {
try {
var tbClient = ThingsboardClient('https://demo.thingsboard.io');
await tbClient.login(LoginRequest('tenant@thingsboard.org', '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');
}
}
```
## Features and bugs
Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/thingsboard/dart_thingsboard_client/issues