list method

Future<ListPlaceActionTypeMetadataResponse> list({
  1. String? filter,
  2. String? languageCode,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

Returns the list of available place action types for a location or country.

Request parameters:

filter - Optional. A filter constraining the place action types to return metadata for. The response includes entries that match the filter. We support only the following filters: 1. location=XYZ where XYZ is a string indicating the resource name of a location, in the format locations/{location_id}. 2. region_code=XYZ where XYZ is a Unicode CLDR region code to find available action types. If no filter is provided, all place action types are returned.

languageCode - Optional. The IETF BCP-47 code of language to get display names in. If this language is not available, they will be provided in English.

pageSize - Optional. How many action types to include per page. Default is 10, minimum is 1.

pageToken - Optional. If specified, the next page of place action type metadata is retrieved. The pageToken is returned when a call to placeActionTypeMetadata.list returns more results than can fit into the requested page size.

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

Completes with a ListPlaceActionTypeMetadataResponse.

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<ListPlaceActionTypeMetadataResponse> list({
  core.String? filter,
  core.String? languageCode,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (languageCode != null) 'languageCode': [languageCode],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/placeActionTypeMetadata';

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