Interface MatchService

    • Method Detail

      • getMatches

        java.util.List<Match> getMatches​(Tournament tournament,
                                         Participant participant,
                                         MatchState state)
                                  throws DataAccessException
        Retrieve a tournament's match list.
        Parameters:
        tournament - The tournament to get the matches from. Must contain id or url with an optional subdomain
        participant - 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 or validation failed
      • getMatches

        void getMatches​(Tournament tournament,
                        Participant participant,
                        MatchState state,
                        Callback<java.util.List<Match>> onSuccess,
                        Callback<DataAccessException> onFailure)
        Retrieve a tournament's match list.
        Parameters:
        tournament - The tournament to get the matches from. Must contain id or url with an optional subdomain
        participant - 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

        Match getMatch​(Tournament tournament,
                       long matchId,
                       boolean includeAttachments)
                throws DataAccessException
        Retrieve a single match record for a tournament.
        Parameters:
        tournament - The tournament to get the match from. Must contain tournament id
        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 or validation failed
      • getMatch

        void getMatch​(Tournament tournament,
                      long matchId,
                      boolean includeAttachments,
                      Callback<Match> onSuccess,
                      Callback<DataAccessException> onFailure)
        Retrieve a single match record for a tournament.
        Parameters:
        tournament - The tournament to get the match from. Must contain tournament id
        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

        Match updateMatch​(Match match,
                          MatchQuery data)
                   throws DataAccessException
        Update/submit the score(s) for a match.
        Parameters:
        match - The match to update. Must contain the tournament- and match id
        data - The new match data
        Returns:
        The updated match
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • updateMatch

        void updateMatch​(Match match,
                         MatchQuery data,
                         Callback<Match> onSuccess,
                         Callback<DataAccessException> onFailure)
        Update/submit the score(s) for a match.
        Parameters:
        match - The match to update. Must contain the tournament- and match id
        data - The new match data
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • reopenMatch

        Match reopenMatch​(Match match)
                   throws DataAccessException
        Reopens a match that was marked completed, automatically resetting matches that follow it.
        Parameters:
        match - The match to reopen. Must contain the tournament- and match id
        Returns:
        The reopened match
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • reopenMatch

        void reopenMatch​(Match match,
                         Callback<Match> onSuccess,
                         Callback<DataAccessException> onFailure)
        Reopens a match that was marked completed, automatically resetting matches that follow it.
        Parameters:
        match - The match to reopen. Must contain the tournament- and match id
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful