testLedWithHttpInfo method

Future<Response> testLedWithHttpInfo({
  1. String? uuidToken,
  2. LedTest? ledTest,
})

Led test

Test the specified led by turning it on. Two modes are available: 'fixed' and 'blink'. When 'fixed' mode is selected, the led stays on for 5 seconds. When 'blink' mode is selected, the led blinks 5 times in the specified interval (ms). The interval must be between 500 ms and 5000 ms. If not specified, the default value will be 1000 ms.

Note: This method returns the HTTP Response.

Parameters:

  • String uuidToken: Used for remote connections to device

  • LedTest ledTest:

Implementation

Future<Response> testLedWithHttpInfo({
  String? uuidToken,
  LedTest? ledTest,
}) async {
  // ignore: prefer_const_declarations
  final path = uuidToken != null
      ? '${LbSetupEnvironment.getApiEndpoint(iotUuid: uuidToken)}/device/led/test'
      : '/device/led/test';
  // ignore: prefer_final_locals
  Object? postBody = ledTest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}