get static method

Future<ChannelPage> get(
  1. YoutubeHttpClient httpClient,
  2. String id
)

Implementation

static Future<ChannelPage> get(YoutubeHttpClient httpClient, String id) {
  final url = 'https://www.youtube.com/channel/$id?hl=en';

  return retry(httpClient, () async {
    final raw = await httpClient.getString(url);
    final result = ChannelPage.parse(raw);

    if (!result.isOk) {
      throw TransientFailureException('Channel page is broken');
    }
    return result;
  });
}