mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 09:04:55 +00:00
one gang wizard &two Gang wizard & wh wizard
This commit is contained in:
@ -189,5 +189,7 @@ abstract class ApiEndpoints {
|
||||
'/schedule/{deviceUuid}?category={category}';
|
||||
static const String changeSchedule = '/schedule/enable/{deviceUuid}';
|
||||
static const String deleteSchedule = '/schedule/{deviceUuid}/{scheduleId}';
|
||||
static const String reportLogs = '/device/report-logs/{deviceUuid}?code={code}&startTime={startTime}&endTime={endTime}';
|
||||
static const String reportLogs =
|
||||
'/device/report-logs/{deviceUuid}?code={code}&startTime={startTime}&endTime={endTime}';
|
||||
static const String controlBatch = '/device/control/batch';
|
||||
}
|
||||
|
||||
@ -378,4 +378,29 @@ class DevicesAPI {
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
static Future deviceController({
|
||||
List<String>? devicesUuid,
|
||||
String? code,
|
||||
bool? value,
|
||||
}) async {
|
||||
try {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.controlBatch,
|
||||
body: {"devicesUuid": devicesUuid, "code": code, "value": value},
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
print('json-=-=-=-=-=--=${json}');
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user