Interface TournamentRestClient
-
public interface TournamentRestClientTournament Rest Client Definition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TournamentWrapperabortCheckIn(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration).voidabortCheckIn(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration).TournamentWrappercreateTournament(TournamentQueryWrapper tournamentData)Create a new tournament.voidcreateTournament(TournamentQueryWrapper tournamentData, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Create a new tournament.TournamentWrapperdeleteTournament(java.lang.String tournament)Deletes a tournament along with all its associated records.voiddeleteTournament(java.lang.String tournament, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Deletes a tournament along with all its associated records.TournamentWrapperfinalizeTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)Finalize a tournament that has had all match scores submitted, rendering its results permanent.voidfinalizeTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Finalize a tournament that has had all match scores submitted, rendering its results permanent.TournamentWrappergetTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)Retrieve a single tournament record created with your account.voidgetTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single tournament record created with your account.java.util.List<TournamentWrapper>getTournaments(TournamentQueryState state, TournamentType type, java.time.OffsetDateTime createdAfter, java.time.OffsetDateTime createdBefore, java.lang.String subdomain)Retrieve a set of tournaments created with your account.voidgetTournaments(TournamentQueryState state, TournamentType type, java.time.OffsetDateTime createdAfter, java.time.OffsetDateTime createdBefore, java.lang.String subdomain, Callback<java.util.List<TournamentWrapper>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a set of tournaments created with your account.TournamentWrapperopenTournamentForPredictions(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)Sets the state of the tournament to start accepting predictions.voidopenTournamentForPredictions(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Sets the state of the tournament to start accepting predictions.TournamentWrapperprocessCheckIns(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)This should be invoked after a tournament's check-in window closes before the tournament is started.voidprocessCheckIns(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)This should be invoked after a tournament's check-in window closes before the tournament is started.TournamentWrapperresetTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)Reset a tournament, clearing all of its scores and attachments.voidresetTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Reset a tournament, clearing all of its scores and attachments.TournamentWrapperstartTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches)Start a tournament, opening up first round matches for score reporting.voidstartTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Start a tournament, opening up first round matches for score reporting.TournamentWrapperupdateTournament(java.lang.String tournament, TournamentQueryWrapper tournamentData)Update a tournament's attributes.voidupdateTournament(java.lang.String tournament, TournamentQueryWrapper tournamentData, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Update a tournament's attributes.
-
-
-
Method Detail
-
getTournaments
java.util.List<TournamentWrapper> getTournaments(TournamentQueryState state, TournamentType type, java.time.OffsetDateTime createdAfter, java.time.OffsetDateTime createdBefore, java.lang.String subdomain) throws DataAccessException
Retrieve a set of tournaments created with your account.- Parameters:
state- only get tournaments with this statetype- only get tournaments with this typecreatedAfter- get tournaments created after this datecreatedBefore- get tournaments created before this datesubdomain- only get tournaments with this subdomain- Returns:
- The filtered tournaments
- Throws:
DataAccessException- Exchange with the rest api failed
-
getTournaments
void getTournaments(TournamentQueryState state, TournamentType type, java.time.OffsetDateTime createdAfter, java.time.OffsetDateTime createdBefore, java.lang.String subdomain, Callback<java.util.List<TournamentWrapper>> onSuccess, Callback<DataAccessException> onFailure)
Retrieve a set of tournaments created with your account.- Parameters:
state- only get tournaments with this statetype- only get tournaments with this typecreatedAfter- get tournaments created after this datecreatedBefore- get tournaments created before this datesubdomain- only get tournaments with this subdomainonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
getTournament
TournamentWrapper getTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
Retrieve a single tournament record created with your account.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The matching tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
getTournament
void getTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single tournament record created with your account.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
createTournament
TournamentWrapper createTournament(TournamentQueryWrapper tournamentData) throws DataAccessException
Create a new tournament.- Parameters:
tournamentData- An object with all the necessary information to create the tournament- Returns:
- The created tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
createTournament
void createTournament(TournamentQueryWrapper tournamentData, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)
Create a new tournament.- Parameters:
tournamentData- An object with all the necessary information to create the tournamentonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
updateTournament
TournamentWrapper updateTournament(java.lang.String tournament, TournamentQueryWrapper tournamentData) throws DataAccessException
Update a tournament's attributes.- 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)tournamentData- An object with all the necessary information to update the tournament- Returns:
- The updated tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
updateTournament
void updateTournament(java.lang.String tournament, TournamentQueryWrapper tournamentData, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Update a tournament's attributes.- 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)tournamentData- An object with all the necessary information to update the tournamentonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
deleteTournament
TournamentWrapper deleteTournament(java.lang.String tournament) throws DataAccessException
Deletes a tournament along with all its associated records. There is no undo, so use with care!- 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)- Returns:
- The deleted tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
deleteTournament
void deleteTournament(java.lang.String tournament, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Deletes a tournament along with all its associated records. There is no undo, so use with care!- 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)onSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
processCheckIns
TournamentWrapper processCheckIns(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
This should be invoked after a tournament's check-in window closes before the tournament is started.1. Marks participants who have not checked in as inactive. 2. Moves inactive participants to bottom seeds (ordered by original seed). 3. Transitions the tournament state from 'checking_in' to 'checked_in'
NOTE: Checked in participants on the waiting list will be promoted if slots become available.
- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The updated tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
processCheckIns
void processCheckIns(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)This should be invoked after a tournament's check-in window closes before the tournament is started.1. Marks participants who have not checked in as inactive. 2. Moves inactive participants to bottom seeds (ordered by original seed). 3. Transitions the tournament state from 'checking_in' to 'checked_in'
NOTE: Checked in participants on the waiting list will be promoted if slots become available.
- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
abortCheckIn
TournamentWrapper abortCheckIn(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration). You must first abort check-in, then you may edit those attributes.1. Makes all participants active and clears their checked_in_at times. 2. Transitions the tournament state from 'checking_in' or 'checked_in' to 'pending'
- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The updated tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
abortCheckIn
void abortCheckIn(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)When your tournament is in a 'checking_in' or 'checked_in' state, there's no way to edit the tournament's start time (start_at) or check-in duration (check_in_duration). You must first abort check-in, then you may edit those attributes.1. Makes all participants active and clears their checked_in_at times. 2. Transitions the tournament state from 'checking_in' or 'checked_in' to 'pending'
- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
startTournament
TournamentWrapper startTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
Start a tournament, opening up first round matches for score reporting. The tournament must have at least 2 participants.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The started tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
startTournament
void startTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Start a tournament, opening up first round matches for score reporting. The tournament must have at least 2 participants.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
finalizeTournament
TournamentWrapper finalizeTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
Finalize a tournament that has had all match scores submitted, rendering its results permanent.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The finalized tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
finalizeTournament
void finalizeTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Finalize a tournament that has had all match scores submitted, rendering its results permanent.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
resetTournament
TournamentWrapper resetTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
Reset a tournament, clearing all of its scores and attachments. You can then add/remove/edit participants before starting the tournament again.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The reset tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
resetTournament
void resetTournament(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Reset a tournament, clearing all of its scores and attachments. You can then add/remove/edit participants before starting the tournament again.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
openTournamentForPredictions
TournamentWrapper openTournamentForPredictions(java.lang.String tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
Sets the state of the tournament to start accepting predictions. Your tournament's 'prediction_method' attribute must be set to 1 (exponential scoring) or 2 (linear scoring) to use this option. Note: Once open for predictions, match records will be persisted, so participant additions and removals will no longer be permitted.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the response- Returns:
- The reset tournament
- Throws:
DataAccessException- Exchange with the rest api failed
-
openTournamentForPredictions
void openTournamentForPredictions(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<TournamentWrapper> onSuccess, Callback<DataAccessException> onFailure)Sets the state of the tournament to start accepting predictions. Your tournament's 'prediction_method' attribute must be set to 1 (exponential scoring) or 2 (linear scoring) to use this option. Note: Once open for predictions, match records will be persisted, so participant additions and removals will no longer be permitted.- 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)includeParticipants- Include a list of participants in the responseincludeMatches- Include a list of matches in the responseonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
-