Interface MatchRestClient


  • public interface MatchRestClient
    • 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 successful
        onFailure - 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 ID
        includeAttachments - 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 ID
        includeAttachments - Include an array of associated attachment records
        onSuccess - Called with result if call was successful
        onFailure - 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 ID
        match - 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 ID
        match - The match data
        onSuccess - Called with result if call was successful
        onFailure - 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 ID
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful