jambtc/thingsboard-php-sdk
Composer 安装命令:
composer require jambtc/thingsboard-php-sdk
包简介
SDK PHP per ThingsBoard
README 文档
README
PHP SDK for communicating with the ThingsBoard REST API
How to use
/// Inizializza AuthService con il base URL $authService = new AuthService('https://thingsboard.example.com'); // Autenticazione $authService->authenticate('username', 'password'); // Inizializza il controller dei dispositivi $deviceController = new DeviceController($authService); // Ottieni un dispositivo $device = $deviceController->getDevice('deviceId'); // Ottieni la Lista dei Dispositivi; $devices = $deviceController->getAllDevices(); // crea un tenant $tenantController = new TenantController($authService); $tenantData = [ "title" => "title", "name" => "description", "region" => "default", "tenantProfileId" => [ "id" => "tenant_profile_uuid", "entityType" => "TENANT_PROFILE" ], ]; $tenant = $tenantController->createTenant($tenantData); // crea un utente $userController = new UserController($authService); $userData = [ "tenantId" => [ "id" => "tenant_uuid", "entityType" => "TENANT" ], "email" => "example@mail.com", "name" => "example@mail.com", "authority" => "TENANT_ADMIN", "firstName" => "first Name", "lastName" => "last Name", ]; $user = $userController->createTenant($userData);
统计信息
- 总下载量: 1.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-06-07