list method

Future<I18nRegionListResponse> list(
  1. List<String> part, {
  2. String? hl,
  3. String? $fields,
})

Retrieves a list of resources, possibly filtered.

Request parameters:

part - The part parameter specifies the i18nRegion resource properties that the API response will include. Set the parameter value to snippet.

hl - null

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

Completes with a I18nRegionListResponse.

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<I18nRegionListResponse> 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/i18nRegions';

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