list method

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

Lists custom emojis visible to the authenticated user.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions. Requires user authentication with one of the following authorization scopes:

  • https://www.googleapis.com/auth/chat.customemojis.readonly - https://www.googleapis.com/auth/chat.customemojis

Request parameters:

filter - Optional. A query filter. Supports filtering by creator. To filter by creator, you must specify a valid value. Currently only creator("users/me") and NOT creator("users/me") are accepted to filter custom emojis by whether they were created by the calling user or not. For example, the following query returns custom emojis created by the caller: creator("users/me") Invalid queries are rejected with an INVALID_ARGUMENT error.

pageSize - Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.

pageToken - Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.

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

Completes with a ListCustomEmojisResponse.

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

  const url_ = 'v1/customEmojis';

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