timerOperation method

Future<bool> timerOperation(
  1. String id,
  2. String operation
)
inherited

timerOperation -> /v1/timer/{id}/{operation}

Performs the requested operation on the specified timer (start, stop, reset).

PARAMETERS

id : The ID of the timer, either name, index or UUID.

  • Example (by_name): Timer Name
  • Example (by_index): 3
  • Example (by_uuid): 3C39C433-5C18-4F51-B357-55BB870227C4

operation : The operation to perform on the timer

  • Should be one of: start, stop, reset

RESPONSE 204:

The request was processed successfully. There is no response body.

content-type: NONE

Implementation

Future<bool> timerOperation(String id, String operation) async {
  String url = '/v1/timer/$id/$operation';

  return await call('get', url, httpAccept: 'application/json');
}