mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 01:35:23 +00:00
4scene
This commit is contained in:
@ -140,7 +140,7 @@ class DevicesAPI {
|
||||
|
||||
static Future getFourSceneInfo(String deviceId) async {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.getFourScene.replaceAll('{deviceUuid}', deviceId),
|
||||
path: ApiEndpoints.fourScene.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
@ -148,6 +148,42 @@ class DevicesAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future getSceneBySwitchName(
|
||||
{String? deviceId, String? switchName}) async {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.fourSceneByName
|
||||
.replaceAll('{deviceUuid}', deviceId!)
|
||||
.replaceAll('{switchName}', switchName!),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future postFourSceneInfo({
|
||||
String? switchName,
|
||||
String? sceneUuid,
|
||||
String? deviceId,
|
||||
String? spaceUuid,
|
||||
}) async {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.fourScene.replaceAll('{deviceUuid}', deviceId!),
|
||||
body: jsonEncode(
|
||||
{
|
||||
"switchName": switchName,
|
||||
"sceneUuid": sceneUuid,
|
||||
"spaceUuid": spaceUuid
|
||||
},
|
||||
),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print('postFourSceneInfo=$json');
|
||||
return json;
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future getDeviceInfo(String deviceId) async {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.deviceByUuid.replaceAll('{deviceUuid}', deviceId),
|
||||
|
Reference in New Issue
Block a user