getEmojiListWithHttpInfo method

Future<Response> getEmojiListWithHttpInfo({
  1. int? page,
  2. int? perPage,
  3. String? sort,
})

Get a list of custom emoji

Get a page of metadata for custom emoji on the system. Since server version 4.7, sort using the sort query parameter. ##### Permissions Must be authenticated.

Note: This method returns the HTTP Response.

Parameters:

  • int page: The page to select.

  • int perPage: The number of emojis per page.

  • String sort: Either blank for no sorting or "name" to sort by emoji names. Minimum server version for sorting is 4.7.

Implementation

Future<Response> getEmojiListWithHttpInfo({
  int? page,
  int? perPage,
  String? sort,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/emoji';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }
  if (sort != null) {
    queryParams.addAll(_queryParams('', 'sort', sort));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}