Package at.stefangeyer.challonge.rest
Interface MatchRestClient
-
public interface MatchRestClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MatchWrappergetMatch(java.lang.String tournament, long matchId, boolean includeAttachments)Retrieve a single match record for a tournament.voidgetMatch(java.lang.String tournament, long matchId, boolean includeAttachments, Callback<MatchWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single match record for a tournament.java.util.List<MatchWrapper>getMatches(java.lang.String tournament, java.lang.Long participantId, MatchState state)Retrieve a tournament's match list.voidgetMatches(java.lang.String tournament, java.lang.Long participantId, MatchState state, Callback<java.util.List<MatchWrapper>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a tournament's match list.MatchWrapperreopenMatch(java.lang.String tournament, long matchId)Reopens a match that was marked completed, automatically resetting matches that follow itvoidreopenMatch(java.lang.String tournament, long matchId, Callback<MatchWrapper> onSuccess, Callback<DataAccessException> onFailure)Reopens a match that was marked completed, automatically resetting matches that follow itMatchWrapperupdateMatch(java.lang.String tournament, long matchId, MatchQueryWrapper match)Update/submit the score(s) for a match.voidupdateMatch(java.lang.String tournament, long matchId, MatchQueryWrapper match, Callback<MatchWrapper> onSuccess, Callback<DataAccessException> onFailure)Update/submit the score(s) for a match.
-
-
-
Method Detail
-
getMatches
java.util.List<MatchWrapper> getMatches(java.lang.String tournament, java.lang.Long participantId, MatchState state) throws DataAccessException
Retrieve a tournament's match list.- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)participantId- 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 failed
-
getMatches
void getMatches(java.lang.String tournament, java.lang.Long participantId, MatchState state, Callback<java.util.List<MatchWrapper>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a tournament's match list.- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)participantId- 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
MatchWrapper getMatch(java.lang.String tournament, long matchId, boolean includeAttachments) throws DataAccessException
Retrieve a single match record for a tournament.- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)matchId- The match's unique IDincludeAttachments- Include an array of associated attachment records- Returns:
- The requested match
- Throws:
DataAccessException- Exchange with the rest api failed
-
getMatch
void getMatch(java.lang.String tournament, long matchId, boolean includeAttachments, Callback<MatchWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single match record for a tournament.- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)matchId- 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
MatchWrapper updateMatch(java.lang.String tournament, long matchId, MatchQueryWrapper match) throws DataAccessException
Update/submit the score(s) for a match.- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)matchId- The match's unique IDmatch- The match data- Returns:
- The updated match
- Throws:
DataAccessException- Exchange with the rest api failed
-
updateMatch
void updateMatch(java.lang.String tournament, long matchId, MatchQueryWrapper match, Callback<MatchWrapper> onSuccess, Callback<DataAccessException> onFailure)Update/submit the score(s) for a match.- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)matchId- The match's unique IDmatch- The match dataonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
reopenMatch
MatchWrapper reopenMatch(java.lang.String tournament, long matchId) throws DataAccessException
Reopens a match that was marked completed, automatically resetting matches that follow it- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)matchId- The match's unique ID- Returns:
- The reopened match
- Throws:
DataAccessException- Exchange with the rest api failed
-
reopenMatch
void reopenMatch(java.lang.String tournament, long matchId, Callback<MatchWrapper> onSuccess, Callback<DataAccessException> onFailure)Reopens a match that was marked completed, automatically resetting matches that follow it- Parameters:
tournament- Tournament ID (e.g. 10230) or URL (e.g. 'single_elim' for challonge.com/single_elim). If assigned to a subdomain, URL format must be :subdomain-:tournament_url (e.g. 'test-mytourney' for test.challonge.com/mytourney)matchId- The match's unique IDonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
-