Package at.stefangeyer.challonge.service
Interface MatchService
-
- All Known Implementing Classes:
Challonge,SimpleMatchService
public interface MatchServiceMatch Service Definitions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MatchgetMatch(Tournament tournament, long matchId, boolean includeAttachments)Retrieve a single match record for a tournament.voidgetMatch(Tournament tournament, long matchId, boolean includeAttachments, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single match record for a tournament.java.util.List<Match>getMatches(Tournament tournament, Participant participant, MatchState state)Retrieve a tournament's match list.voidgetMatches(Tournament tournament, Participant participant, MatchState state, Callback<java.util.List<Match>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a tournament's match list.MatchreopenMatch(Match match)Reopens a match that was marked completed, automatically resetting matches that follow it.voidreopenMatch(Match match, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)Reopens a match that was marked completed, automatically resetting matches that follow it.MatchupdateMatch(Match match, MatchQuery data)Update/submit the score(s) for a match.voidupdateMatch(Match match, MatchQuery data, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)Update/submit the score(s) for a match.
-
-
-
Method Detail
-
getMatches
java.util.List<Match> getMatches(Tournament tournament, Participant participant, MatchState state) throws DataAccessException
Retrieve a tournament's match list.- Parameters:
tournament- The tournament to get the matches from. Must contain id or url with an optional subdomainparticipant- Only retrieve matches that include the specified participant. This parameter is optional. Provide null if you want to skip it.state- all (default), pending, open, complete. This parameter is optional. Provide null if you want to skip it.- Returns:
- The tournament's matches
- Throws:
DataAccessException- Exchange with the rest api or validation failed
-
getMatches
void getMatches(Tournament tournament, Participant participant, MatchState state, Callback<java.util.List<Match>> onSuccess, Callback<DataAccessException> onFailure)
Retrieve a tournament's match list.- Parameters:
tournament- The tournament to get the matches from. Must contain id or url with an optional subdomainparticipant- Only retrieve matches that include the specified participant. This parameter is optional. Provide null if you want to skip it.state- all (default), pending, open, complete. This parameter is optional. Provide null if you want to skip it.onSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
getMatch
Match getMatch(Tournament tournament, long matchId, boolean includeAttachments) throws DataAccessException
Retrieve a single match record for a tournament.- Parameters:
tournament- The tournament to get the match from. Must contain tournament idmatchId- The match's unique IDincludeAttachments- Include an array of associated attachment records- Returns:
- The requested match
- Throws:
DataAccessException- Exchange with the rest api or validation failed
-
getMatch
void getMatch(Tournament tournament, long matchId, boolean includeAttachments, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)
Retrieve a single match record for a tournament.- Parameters:
tournament- The tournament to get the match from. Must contain tournament idmatchId- The match's unique IDincludeAttachments- Include an array of associated attachment recordsonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
updateMatch
Match updateMatch(Match match, MatchQuery data) throws DataAccessException
Update/submit the score(s) for a match.- Parameters:
match- The match to update. Must contain the tournament- and match iddata- The new match data- Returns:
- The updated match
- Throws:
DataAccessException- Exchange with the rest api or validation failed
-
updateMatch
void updateMatch(Match match, MatchQuery data, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)
Update/submit the score(s) for a match.- Parameters:
match- The match to update. Must contain the tournament- and match iddata- The new match dataonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
reopenMatch
Match reopenMatch(Match match) throws DataAccessException
Reopens a match that was marked completed, automatically resetting matches that follow it.- Parameters:
match- The match to reopen. Must contain the tournament- and match id- Returns:
- The reopened match
- Throws:
DataAccessException- Exchange with the rest api or validation failed
-
reopenMatch
void reopenMatch(Match match, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)
Reopens a match that was marked completed, automatically resetting matches that follow it.- Parameters:
match- The match to reopen. Must contain the tournament- and match idonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
-