four_scene

This commit is contained in:
mohammad
2024-11-19 11:31:17 +03:00
parent f1bb454429
commit 1be6d71e89
7 changed files with 151 additions and 10 deletions

View File

@ -31,6 +31,22 @@ class DevicesAPI {
}
}
static Future<Map<String, dynamic>> putDeviceName(
{required String deviceId, required String deviceName}) async {
try {
final response = await _httpService.put(
path: ApiEndpoints.deviceByUuid.replaceAll('{deviceUuid}', deviceId),
body: {"deviceName": deviceName},
expectedResponseModel: (json) {
return json;
},
);
return response;
} catch (e) {
rethrow;
}
}
static Future<Map<String, dynamic>> controlDevice(
DeviceControlModel controlModel, String deviceId) async {
try {