getWarningById method

Future<Warning> getWarningById(
  1. String id
)

Gets the warning that matches an id.

Implementation

Future<Warning> getWarningById(String id) async {
  final response = await _context.client.get(
    Uri.https(authority, '$path/warnings/$id'),
  );

  ClientException.checkIsSuccessStatusCode(response);

  return Warning.fromJson(json.decode(response.body));
}