getTournamentAppeals method

Future<Iterable<TournamentAppeals>> getTournamentAppeals(
  1. int tournamentId
)

Requests tournament appeal questions TournamentAppeals from server.

Requires tournament identifier tournamentId. Returns tournament appeal questions TournamentAppeals list in case of success or empty list if tournament results not found. Throws DioError in case of network connection problems.

Implementation

Future<Iterable<TournamentAppeals>> getTournamentAppeals(
    int tournamentId) async {
  final Response<List<dynamic>> response =
      await _dio.get('/tournaments/$tournamentId/appeals');
  return List<TournamentAppeals>.from(
      response.data!.map((dynamic e) => TournamentAppeals.fromJson(e)));
}