getByUsername static method

Future<ChannelAboutPage> getByUsername(
  1. YoutubeHttpClient httpClient,
  2. String username
)

Implementation

static Future<ChannelAboutPage> getByUsername(
  YoutubeHttpClient httpClient,
  String username,
) {
  final url = 'https://www.youtube.com/user/$username/about?hl=en';

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

    return result;
  });
}