getAllSeasonRewardsSeasonRewardsGetWithHttpInfo method

Future<Response> getAllSeasonRewardsSeasonRewardsGetWithHttpInfo({
  1. RewardType? type,
  2. int? page,
  3. int? size,
  4. Future<void>? abortTrigger,
})

Get All Season Rewards

List of all rewards for the current season.

Note: This method returns the HTTP Response.

Parameters:

  • RewardType type: Filter by reward type.

  • int page: Page number

  • int size: Page size

Implementation

Future<Response> getAllSeasonRewardsSeasonRewardsGetWithHttpInfo({
  RewardType? type,
  int? page,
  int? size,
  Future<void>? abortTrigger,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/season_rewards';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (type != null) {
    queryParams.addAll(_queryParams('', 'type', type));
  }
  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,
    abortTrigger: abortTrigger,
  );
}