getChannelById method

Future<Channel> getChannelById(
  1. int id
)

Gets the channel that matches an id.

Implementation

Future<Channel> getChannelById(int id) async {
  final response = await _context.client.get(
    Uri.https(authority, '$path/channels/$id'),
  );

  ClientException.checkIsSuccessStatusCode(response);

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