enableCloudStorage method

Future<Map<String, dynamic>> enableCloudStorage(
  1. String deviceSerial,
  2. String cardPassword, {
  3. String? phone,
  4. int? channelNo,
  5. int? isImmediately,
})

Implementation

Future<Map<String, dynamic>> enableCloudStorage(
  String deviceSerial,
  String cardPassword, {
  String? phone,
  int? channelNo, // Defaults to 1 if not specified by API behavior
  int? isImmediately, // 0-No (Default), 1-Yes
}) async {
  final body = <String, dynamic>{
    'deviceSerial': deviceSerial,
    'cardPassword': cardPassword,
  };
  if (phone != null) body['phone'] = phone;
  if (channelNo != null) body['channelNo'] = channelNo;
  if (isImmediately != null) body['isImmediately'] = isImmediately;

  return _client.post('/api/lapp/cloud/storage/open', body);
}