mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 09:19:40 +00:00
updated project hardcoded values
This commit is contained in:
@ -219,13 +219,14 @@ class DevicesAPI {
|
||||
required String communityUuid,
|
||||
required String spaceUuid,
|
||||
required String roomId,
|
||||
required String projectId,
|
||||
}) async {
|
||||
try {
|
||||
final String path = ApiEndpoints.deviceByRoom
|
||||
.replaceAll('{communityUuid}', communityUuid)
|
||||
.replaceAll('{spaceUuid}', spaceUuid)
|
||||
.replaceAll('{subSpaceUuid}', roomId)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev);
|
||||
.replaceAll('{projectUuid}', projectId);
|
||||
|
||||
final response = await _httpService.get(
|
||||
path: path,
|
||||
@ -564,12 +565,13 @@ class DevicesAPI {
|
||||
static Future<List<DeviceModel>> getAllDevices({
|
||||
required String communityUuid,
|
||||
required String spaceUuid,
|
||||
required String projectId,
|
||||
}) async {
|
||||
try {
|
||||
final String path = ApiEndpoints.getAllDevices
|
||||
.replaceAll('{communityUuid}', communityUuid)
|
||||
.replaceAll('{spaceUuid}', spaceUuid)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev);
|
||||
.replaceAll('{projectUuid}', projectId);
|
||||
|
||||
final response = await _httpService.get(
|
||||
path: path,
|
||||
|
@ -145,12 +145,13 @@ class HomeCreation {
|
||||
required String communityId,
|
||||
required String spaceId,
|
||||
required Map<String, String> body,
|
||||
required String projectId
|
||||
}) async {
|
||||
try {
|
||||
final fullPath = ApiEndpoints.addSubSpace
|
||||
.replaceAll('{communityUuid}', communityId)
|
||||
.replaceAll('{spaceUuid}', spaceId)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev);
|
||||
.replaceAll('{projectUuid}', projectId);
|
||||
final response = await _httpService.post(
|
||||
path: fullPath,
|
||||
body: body,
|
||||
|
@ -27,7 +27,7 @@ class HomeManagementAPI {
|
||||
return list;
|
||||
}
|
||||
|
||||
static Future<List<DeviceModel>> fetchDevicesByUnitId() async {
|
||||
static Future<List<DeviceModel>> fetchDevicesByUnitId(String projectUuid) async {
|
||||
List<DeviceModel> list = [];
|
||||
|
||||
try {
|
||||
@ -40,7 +40,7 @@ class HomeManagementAPI {
|
||||
final path = ApiEndpoints.spaceDevices
|
||||
.replaceAll('{communityUuid}', communityUuid)
|
||||
.replaceAll('{spaceUuid}', spaceUuid)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev);
|
||||
.replaceAll('{projectUuid}', projectUuid);
|
||||
|
||||
await _httpService.get(
|
||||
path: path,
|
||||
@ -63,11 +63,11 @@ class HomeManagementAPI {
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> assignDeviceToRoom(String communityId,
|
||||
String spaceId, String subSpaceId, String deviceId) async {
|
||||
String spaceId, String subSpaceId, String deviceId, String projectId) async {
|
||||
try {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.assignDeviceToRoom
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev)
|
||||
.replaceAll('{projectUuid}', projectId)
|
||||
.replaceAll('{communityUuid}', communityId)
|
||||
.replaceAll('{spaceUuid}', spaceId)
|
||||
.replaceAll('{subSpaceUuid}', subSpaceId)
|
||||
@ -83,7 +83,7 @@ class HomeManagementAPI {
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> unAssignDeviceToRoom(String communityId,
|
||||
String spaceId, String subSpaceId, String deviceId) async {
|
||||
String spaceId, String subSpaceId, String deviceId, String projectId) async {
|
||||
try {
|
||||
final response = await _httpService.delete(
|
||||
path: ApiEndpoints.assignDeviceToRoom
|
||||
@ -91,7 +91,7 @@ class HomeManagementAPI {
|
||||
.replaceAll('{spaceUuid}', spaceId)
|
||||
.replaceAll('{subSpaceUuid}', subSpaceId)
|
||||
.replaceAll('{deviceUuid}', deviceId)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev),
|
||||
.replaceAll('{projectUuid}', projectId),
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
|
@ -50,14 +50,14 @@ class SceneApi {
|
||||
//get scene by unit id
|
||||
|
||||
static Future<List<ScenesModel>> getScenesByUnitId(
|
||||
String unitId, String communityId,
|
||||
String unitId, String communityId, String projectId,
|
||||
{showInDevice = false}) async {
|
||||
try {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.getUnitScenes
|
||||
.replaceAll('{spaceUuid}', unitId)
|
||||
.replaceAll('{communityUuid}', communityId)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev),
|
||||
.replaceAll('{projectUuid}', projectId),
|
||||
queryParameters: {'showInHomePage': showInDevice},
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
|
@ -32,13 +32,13 @@ class SpacesAPI {
|
||||
}
|
||||
|
||||
static Future<List<SubSpaceModel>> getSubSpaceBySpaceId(
|
||||
String communityId, String spaceId) async {
|
||||
String communityId, String spaceId, String projectId) async {
|
||||
try {
|
||||
// Construct the API path
|
||||
final path = ApiEndpoints.listSubspace
|
||||
.replaceFirst('{communityUuid}', communityId)
|
||||
.replaceFirst('{spaceUuid}', spaceId)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev);
|
||||
.replaceAll('{projectUuid}', projectId);
|
||||
|
||||
final response = await _httpService.get(
|
||||
path: path,
|
||||
@ -66,12 +66,12 @@ class SpacesAPI {
|
||||
//factory/reset/{deviceUuid}
|
||||
|
||||
static Future<String> generateInvitationCode(
|
||||
String unitId, String communityId) async {
|
||||
String unitId, String communityId, String projectId) async {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.invitationCode
|
||||
.replaceAll('{unitUuid}', unitId)
|
||||
.replaceAll('{communityUuid}', communityId)
|
||||
.replaceAll('{projectUuid}', TempConst.projectIdDev),
|
||||
.replaceAll('{projectUuid}', projectId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
if (json != null && json['data'] != null) {
|
||||
|
Reference in New Issue
Block a user