getCharactersLeaderboardLeaderboardCharactersGetWithHttpInfo method

Future<Response> getCharactersLeaderboardLeaderboardCharactersGetWithHttpInfo({
  1. CharacterLeaderboardType? sort,
  2. int? page,
  3. int? size,
})

Get Characters Leaderboard

Fetch leaderboard details.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> getCharactersLeaderboardLeaderboardCharactersGetWithHttpInfo({ CharacterLeaderboardType? sort, int? page, int? size, }) async {
  // ignore: prefer_const_declarations
  final path = r'/leaderboard/characters';

  // ignore: prefer_final_locals
  Object? postBody;

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

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

  const contentTypes = <String>[];


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