mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-14 17:25:47 +00:00
19 lines
578 B
Dart
19 lines
578 B
Dart
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
|
import 'package:syncrow_app/services/api/api_links_endpoints.dart';
|
|
import 'package:syncrow_app/services/api/http_service.dart';
|
|
|
|
class DevicesAPI {
|
|
static Future<Map<String, dynamic>> controlDevice(
|
|
DeviceControlModel controlModel) async {
|
|
final response = await HTTPService().post(
|
|
path: ApiEndpoints.control,
|
|
body: controlModel.toJson(),
|
|
showServerMessage: false,
|
|
expectedResponseModel: (json) {
|
|
return json;
|
|
},
|
|
);
|
|
return response;
|
|
}
|
|
}
|