list method

Future<SuperChatEventListResponse> list(
  1. List<String> part, {
  2. String? hl,
  3. int? maxResults,
  4. String? pageToken,
  5. String? $fields,
})

Retrieves a list of resources, possibly filtered.

Request parameters:

part - The part parameter specifies the superChatEvent resource parts that the API response will include. This parameter is currently not supported.

hl - Return rendered funding amounts in specified language.

maxResults - The maxResults parameter specifies the maximum number of items that should be returned in the result set. Value must be between "1" and "50".

pageToken - The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.

$fields - Selector specifying which fields to include in a partial response.

Completes with a SuperChatEventListResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<SuperChatEventListResponse> list(
  core.List<core.String> part, {
  core.String? hl,
  core.int? maxResults,
  core.String? pageToken,
  core.String? $fields,
}) async {
  if (part.isEmpty) {
    throw core.ArgumentError('Parameter part cannot be empty.');
  }
  final queryParams_ = <core.String, core.List<core.String>>{
    'part': part,
    if (hl != null) 'hl': [hl],
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'youtube/v3/superChatEvents';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return SuperChatEventListResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}