apiV1MatchesGet method

Future<MatchPaginated?> apiV1MatchesGet({
  1. int? pageSize,
  2. int? pageNumber,
  3. MatchesOrderByEnum? orderBy,
})

Get a page of matches from the collection of all ordered matches.

Parameters:

  • int pageSize: The maximum number of matches to include on a page.

  • int pageNumber: The page of matches to get.

  • MatchesOrderByEnum orderBy: How to order the collection of matches.

Implementation

Future<MatchPaginated?> apiV1MatchesGet({ int? pageSize, int? pageNumber, MatchesOrderByEnum? orderBy, }) async {
  final response = await apiV1MatchesGetWithHttpInfo( pageSize: pageSize, pageNumber: pageNumber, orderBy: orderBy, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MatchPaginated',) as MatchPaginated;

  }
  return null;
}