list method

Future<ChannelResponse> list({
  1. String part = 'contentDetails,id,localizations,player,snippet,status',
  2. List<String> partList = const [],
  3. String? categoryId,
  4. String? forUsername,
  5. String? id,
  6. bool? managedByMe,
  7. bool? mine,
  8. String? hl,
  9. int? maxResults,
  10. String? onBehalfOfContentOwner,
  11. String? pageToken,
})

Implementation

Future<ChannelResponse> list(
    {String part = 'contentDetails,id,localizations,player,snippet,status',
    List<String> partList = const [],
    String? categoryId,
    String? forUsername,
    String? id,
    bool? managedByMe,
    bool? mine,
    String? hl,
    int? maxResults,
    String? onBehalfOfContentOwner,
    String? pageToken}) async {
  if (apiKey == null)
    return _rest.authList('Bearer $token', accept, buildParts(partList, part),
        categoryId: categoryId,
        forUsername: forUsername,
        id: id,
        managedByMe: managedByMe,
        mine: mine,
        hl: hl,
        maxResults: maxResults,
        onBehalfOfContentOwner: onBehalfOfContentOwner,
        pageToken: pageToken);
  else
    return _rest.apiKeyList(apiKey!, accept, buildParts(partList, part),
        categoryId: categoryId,
        forUsername: forUsername,
        id: id,
        managedByMe: managedByMe,
        mine: mine,
        hl: hl,
        maxResults: maxResults,
        onBehalfOfContentOwner: onBehalfOfContentOwner,
        pageToken: pageToken);
}