getTeamTournamentList method
Requests historical team tournament PlayerTournament from server.
Requires team identifier teamId
. Returns team tournament object
PlayerTournament list in case of success or empty list
if team tournament not found.
Throws DioError
in case of network connection problems.
Implementation
Future<Iterable<PlayerTournament>> getTeamTournamentList(int teamId) async {
final Response<List<dynamic>> response =
await _dio.get('/teams/$teamId/tournaments');
return PlayerTournament.decodeList(response.data!);
}