Interface ParticipantRestClient


  • public interface ParticipantRestClient
    Participant Rest Client Definition
    • 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 successful
        onFailure - 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 ID
        includeMatches - 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 ID
        includeMatches - Includes an array of associated match records
        onSuccess - Called with result if call was successful
        onFailure - 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 data
        onSuccess - Called with result if call was successful
        onFailure - 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 data
        onSuccess - Called with result if call was successful
        onFailure - 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 ID
        participant - 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 ID
        participant - The participant data
        onSuccess - Called with result if call was successful
        onFailure - 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 ID
        onSuccess - Called with result if call was successful
        onFailure - 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 ID
        onSuccess - Called with result if call was successful
        onFailure - 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 ID
        onSuccess - Called with result if call was successful
        onFailure - 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 successful
        onFailure - Called with exception if call was not successful