mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
connect reports to main door
This commit is contained in:
@ -65,7 +65,8 @@ class DevicesManagementApi {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<List<DeviceModel>> getDevicesByGatewayId(String gatewayId) async {
|
||||
static Future<List<DeviceModel>> getDevicesByGatewayId(
|
||||
String gatewayId) async {
|
||||
final response = await HTTPService().get(
|
||||
path: ApiEndpoints.gatewayApi.replaceAll('{gatewayUuid}', gatewayId),
|
||||
showServerMessage: false,
|
||||
@ -94,9 +95,14 @@ class DevicesManagementApi {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<DeviceReport> getDeviceReports(String uuid, String code) async {
|
||||
static Future<DeviceReport> getDeviceReports(String uuid, String code,
|
||||
[String? from, String? to]) async {
|
||||
final response = await HTTPService().get(
|
||||
path: ApiEndpoints.getDeviceLogs.replaceAll('{uuid}', uuid).replaceAll('{code}', code),
|
||||
path: ApiEndpoints.getDeviceLogsByDate
|
||||
.replaceAll('{uuid}', uuid)
|
||||
.replaceAll('{code}', code)
|
||||
.replaceAll('{startTime}', from ?? '')
|
||||
.replaceAll('{endTime}', to ?? ''),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return DeviceReport.fromJson(json);
|
||||
|
Reference in New Issue
Block a user