antinvestor_api_device 1.51.12
antinvestor_api_device: ^1.51.12 copied to clipboard
Dart client library for Ant Investor Device Service - Device management, registration, and tracking
Ant Investor Device API - Dart Client #
Dart client library for the Ant Investor Device Service. Device management, registration, and tracking
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
antinvestor_device: ^1.0.0
Then run:
dart pub get
Usage #
import 'package:antinvestor_device/antinvestor_device.dart';
import 'package:connectrpc/connect.dart';
void main() async {
final channel = ClientChannel('https://api.example.com');
final client = DeviceServiceClient(channel);
// Use the client...
await channel.shutdown();
}
Authentication #
All API calls require JWT authentication:
final channel = ClientChannel(
'https://api.example.com',
options: ChannelOptions(
credentials: ChannelCredentials.secure(),
),
);
final client = DeviceServiceClient(
channel,
interceptors: [
(options) => options.mergedWith(
CallOptions(metadata: {
'authorization': 'Bearer your-jwt-token',
}),
),
],
);
API Reference #
For detailed API documentation, see the generated documentation.
Contributing #
Contributions are welcome! Please see the main repository for guidelines.
License #
Copyright 2023-2024 Ant Investor Ltd
Licensed under the Apache License, Version 2.0. See LICENSE for details.