list method

Retrieves a list of resources, possibly filtered.

Request parameters:

part - The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.

hl - null

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

Completes with a VideoAbuseReportReasonListResponse.

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<VideoAbuseReportReasonListResponse> list(
  core.List<core.String> part, {
  core.String? hl,
  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 ($fields != null) 'fields': [$fields],
  };

  const url_ = 'youtube/v3/videoAbuseReportReasons';

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