Package at.stefangeyer.challonge.rest
Interface ParticipantRestClient
-
public interface ParticipantRestClientParticipant Rest Client Definition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParticipantWrapperaddParticipant(java.lang.String tournament, ParticipantQueryWrapper participant)Add a participant to a tournament (up until it is started).voidaddParticipant(java.lang.String tournament, ParticipantQueryWrapper participant, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Add a participant to a tournament (up until it is started).java.util.List<ParticipantWrapper>bulkAddParticipants(java.lang.String tournament, ParticipantQueryListWrapper participants)Bulk add participants to a tournament (up until it is started).voidbulkAddParticipants(java.lang.String tournament, ParticipantQueryListWrapper participants, Callback<java.util.List<ParticipantWrapper>> onSuccess, Callback<DataAccessException> onFailure)Bulk add participants to a tournament (up until it is started).ParticipantWrappercheckInParticipant(java.lang.String tournament, long participantId)Checks a participant in, setting checked_in_at to the current time.voidcheckInParticipant(java.lang.String tournament, long participantId, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Checks a participant in, setting checked_in_at to the current time.ParticipantWrapperdeleteParticipant(java.lang.String tournament, long participantId)If the tournament has not started, delete a participant, automatically filling in the abandoned seed number.voiddeleteParticipant(java.lang.String tournament, long participantId, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)If the tournament has not started, delete a participant, automatically filling in the abandoned seed number.ParticipantWrappergetParticipant(java.lang.String tournament, long participantId, boolean includeMatches)Retrieve a single participant record for a tournament.voidgetParticipant(java.lang.String tournament, long participantId, boolean includeMatches, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single participant record for a tournament.java.util.List<ParticipantWrapper>getParticipants(java.lang.String tournament)Retrieve a tournament's participant list.voidgetParticipants(java.lang.String tournament, Callback<java.util.List<ParticipantWrapper>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a tournament's participant list.java.util.List<ParticipantWrapper>randomizeParticipants(java.lang.String tournament)Randomize seeds among participants.voidrandomizeParticipants(java.lang.String tournament, Callback<java.util.List<ParticipantWrapper>> onSuccess, Callback<DataAccessException> onFailure)Randomize seeds among participants.ParticipantWrapperundoCheckInParticipant(java.lang.String tournament, long participantId)Marks a participant as having not checked in, setting checked_in_at to nil.voidundoCheckInParticipant(java.lang.String tournament, long participantId, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Marks a participant as having not checked in, setting checked_in_at to nil.ParticipantWrapperupdateParticipant(java.lang.String tournament, long participantId, ParticipantQueryWrapper participant)Update the attributes of a tournament participant.voidupdateParticipant(java.lang.String tournament, long participantId, ParticipantQueryWrapper participant, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Update the attributes of a tournament participant.
-
-
-
Method Detail
-
getParticipants
java.util.List<ParticipantWrapper> getParticipants(java.lang.String tournament) throws DataAccessException
Retrieve a tournament's participant 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)- Returns:
- The tournaments participants
- Throws:
DataAccessException- Exchange with the rest api failed
-
getParticipants
void getParticipants(java.lang.String tournament, Callback<java.util.List<ParticipantWrapper>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a tournament's participant 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)onSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
getParticipant
ParticipantWrapper getParticipant(java.lang.String tournament, long participantId, boolean includeMatches) throws DataAccessException
Retrieve a single participant 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)participantId- The participant's unique IDincludeMatches- Includes an array of associated match records- Returns:
- The requested participant
- Throws:
DataAccessException- Exchange with the rest api failed
-
getParticipant
void getParticipant(java.lang.String tournament, long participantId, boolean includeMatches, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single participant 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)participantId- The participant's unique IDincludeMatches- Includes an array of associated match recordsonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
addParticipant
ParticipantWrapper addParticipant(java.lang.String tournament, ParticipantQueryWrapper participant) throws DataAccessException
Add a participant to a tournament (up until it is started).- 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)participant- The participant data- Returns:
- The added participant
- Throws:
DataAccessException- Exchange with the rest api failed
-
addParticipant
void addParticipant(java.lang.String tournament, ParticipantQueryWrapper participant, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Add a participant to a tournament (up until it is started).- 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)participant- The participant dataonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
bulkAddParticipants
java.util.List<ParticipantWrapper> bulkAddParticipants(java.lang.String tournament, ParticipantQueryListWrapper participants) throws DataAccessException
Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back.- 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)participants- The participant data- Returns:
- The added participants
- Throws:
DataAccessException- Exchange with the rest api failed
-
bulkAddParticipants
void bulkAddParticipants(java.lang.String tournament, ParticipantQueryListWrapper participants, Callback<java.util.List<ParticipantWrapper>> onSuccess, Callback<DataAccessException> onFailure)Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back.- 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)participants- The participant dataonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
updateParticipant
ParticipantWrapper updateParticipant(java.lang.String tournament, long participantId, ParticipantQueryWrapper participant) throws DataAccessException
Update the attributes of a tournament participant.- 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- The participant's unique IDparticipant- The participant data- Returns:
- The updates participant
- Throws:
DataAccessException- Exchange with the rest api failed
-
updateParticipant
void updateParticipant(java.lang.String tournament, long participantId, ParticipantQueryWrapper participant, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Update the attributes of a tournament participant.- 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- The participant's unique IDparticipant- The participant dataonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
checkInParticipant
ParticipantWrapper checkInParticipant(java.lang.String tournament, long participantId) throws DataAccessException
Checks a participant in, setting checked_in_at to the current time.- 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- The participant's unique ID- Returns:
- The checked in participant
- Throws:
DataAccessException- Exchange with the rest api failed
-
checkInParticipant
void checkInParticipant(java.lang.String tournament, long participantId, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Checks a participant in, setting checked_in_at to the current time.- 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- The participant's unique IDonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
undoCheckInParticipant
ParticipantWrapper undoCheckInParticipant(java.lang.String tournament, long participantId) throws DataAccessException
Marks a participant as having not checked in, setting checked_in_at to nil.- 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- The participant's unique ID- Returns:
- The checked out participant
- Throws:
DataAccessException- Exchange with the rest api failed
-
undoCheckInParticipant
void undoCheckInParticipant(java.lang.String tournament, long participantId, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)Marks a participant as having not checked in, setting checked_in_at to nil.- 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- The participant's unique IDonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
deleteParticipant
ParticipantWrapper deleteParticipant(java.lang.String tournament, long participantId) throws DataAccessException
If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches.- 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- The participant's unique ID- Returns:
- The deleted participant
- Throws:
DataAccessException- Exchange with the rest api failed
-
deleteParticipant
void deleteParticipant(java.lang.String tournament, long participantId, Callback<ParticipantWrapper> onSuccess, Callback<DataAccessException> onFailure)If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches.- 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- The participant's unique IDonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
randomizeParticipants
java.util.List<ParticipantWrapper> randomizeParticipants(java.lang.String tournament) throws DataAccessException
Randomize seeds among participants. Only applicable before a tournament has started.- 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 randomized participants
- Throws:
DataAccessException- Exchange with the rest api failed
-
randomizeParticipants
void randomizeParticipants(java.lang.String tournament, Callback<java.util.List<ParticipantWrapper>> onSuccess, Callback<DataAccessException> onFailure)Randomize seeds among participants. Only applicable before a tournament has started.- 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
-
-