Interface ChallongeService

All Known Implementing Classes:
Challonge, SimpleChallongeService

public interface ChallongeService
Challonge Service Definitions
  • Method Details

    • getTournaments

      java.util.List<Tournament> 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 state
      type - Only get tournaments with this type
      createdAfter - Get tournaments created after this date
      createdBefore - Get tournaments created before this date
      subdomain - Only get tournaments with this subdomain
      Returns:
      The filtered tournaments
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • getTournaments

      void getTournaments​(TournamentQueryState state, TournamentType type, java.time.OffsetDateTime createdAfter, java.time.OffsetDateTime createdBefore, java.lang.String subdomain, Callback<java.util.List<Tournament>> onSuccess, Callback<DataAccessException> onFailure)
      Retrieve a set of tournaments created with your account.
      Parameters:
      state - Only get tournaments with this state
      type - Only get tournaments with this type
      createdAfter - Get tournaments created after this date
      createdBefore - Get tournaments created before this date
      subdomain - Only get tournaments with this subdomain
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • getTournament

      Tournament 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 response
      includeMatches - Include a list of matches in the response
      Returns:
      The matching tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • getTournament

      void getTournament​(java.lang.String tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> 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 response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • createTournament

      Tournament createTournament​(TournamentQuery data) throws DataAccessException
      Create a new tournament.
      Parameters:
      data - An object with all the necessary information to create the tournament
      Returns:
      The created tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • createTournament

      void createTournament​(TournamentQuery data, Callback<Tournament> onSuccess, Callback<DataAccessException> onFailure)
      Create a new tournament.
      Parameters:
      data - An object with all the necessary information to create the tournament
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • updateTournament

      Tournament updateTournament​(Tournament tournament, TournamentQuery data) throws DataAccessException
      Update a tournament's attributes.
      Parameters:
      tournament - The tournament to update. Must contain tournament id
      data - An object with all the necessary information to update the tournament
      Returns:
      The updated tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • updateTournament

      void updateTournament​(Tournament tournament, TournamentQuery data, Callback<Tournament> onSuccess, Callback<DataAccessException> onFailure)
      Update a tournament's attributes.
      Parameters:
      tournament - The tournament to update. Must contain tournament id
      data - An object with all the necessary information to update the tournament
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • deleteTournament

      Tournament deleteTournament​(Tournament tournament) throws DataAccessException
      Deletes a tournament along with all its associated records. There is no undo, so use with care!
      Parameters:
      tournament - The tournament to delete. Must contain tournament id
      Returns:
      The deleted tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • deleteTournament

      void deleteTournament​(Tournament tournament, Callback<Tournament> onSuccess, Callback<DataAccessException> onFailure)
      Deletes a tournament along with all its associated records. There is no undo, so use with care!
      Parameters:
      tournament - The tournament to delete. Must contain tournament id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • processCheckIns

      Tournament processCheckIns​(Tournament 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 - The tournament to process check ins for. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      Returns:
      The updated tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • processCheckIns

      void processCheckIns​(Tournament tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> 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 - The tournament to process check ins for. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • abortCheckIn

      Tournament abortCheckIn​(Tournament 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 - The tournament to abort check in for. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      Returns:
      The updated tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • abortCheckIn

      void abortCheckIn​(Tournament tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> 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 - The tournament to abort check in for. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • startTournament

      Tournament startTournament​(Tournament 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 - The tournament to start. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      Returns:
      The started tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • startTournament

      void startTournament​(Tournament tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> 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 - The tournament to start. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • finalizeTournament

      Tournament finalizeTournament​(Tournament tournament, boolean includeParticipants, boolean includeMatches) throws DataAccessException
      Finalize a tournament that has had all match scores submitted, rendering its results permanent.
      Parameters:
      tournament - The tournament to finalize. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      Returns:
      The finalized tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • finalizeTournament

      void finalizeTournament​(Tournament tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> onSuccess, Callback<DataAccessException> onFailure)
      Finalize a tournament that has had all match scores submitted, rendering its results permanent.
      Parameters:
      tournament - The tournament to finalize. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • resetTournament

      Tournament resetTournament​(Tournament 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 - The tournament to reset. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      Returns:
      The reset tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • resetTournament

      void resetTournament​(Tournament tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> 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 - The tournament to reset. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • openTournamentForPredictions

      Tournament openTournamentForPredictions​(Tournament 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 - The tournament to open predictions for. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      Returns:
      The reset tournament
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • openTournamentForPredictions

      void openTournamentForPredictions​(Tournament tournament, boolean includeParticipants, boolean includeMatches, Callback<Tournament> 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 - The tournament to open predictions for. Must contain tournament id
      includeParticipants - Include a list of participants in the response
      includeMatches - Include a list of matches in the response
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • getParticipants

      java.util.List<Participant> getParticipants​(Tournament tournament) throws DataAccessException
      Retrieve a tournament's participant list.
      Parameters:
      tournament - The tournament to get the participants from. Must contain tournament id
      Returns:
      The tournaments participants
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • getParticipants

      void getParticipants​(Tournament tournament, Callback<java.util.List<Participant>> onSuccess, Callback<DataAccessException> onFailure)
      Retrieve a tournament's participant list.
      Parameters:
      tournament - The tournament to get the participants from. Must contain tournament id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • getParticipant

      Participant getParticipant​(Tournament tournament, long participantId, boolean includeMatches) throws DataAccessException
      Retrieve a single participant record for a tournament.
      Parameters:
      tournament - The tournament to get the participant from. Must contain tournament id
      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 or validation failed
    • getParticipant

      void getParticipant​(Tournament tournament, long participantId, boolean includeMatches, Callback<Participant> onSuccess, Callback<DataAccessException> onFailure)
      Retrieve a single participant record for a tournament.
      Parameters:
      tournament - The tournament to get the participant from. Must contain tournament id
      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

      Participant addParticipant​(Tournament tournament, ParticipantQuery data) throws DataAccessException
      Add a participant to a tournament (up until it is started).
      Parameters:
      tournament - The tournament to add the participant to. Must contain tournament id
      data - The participant data
      Returns:
      The added participant
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • addParticipant

      void addParticipant​(Tournament tournament, ParticipantQuery data, Callback<Participant> onSuccess, Callback<DataAccessException> onFailure)
      Add a participant to a tournament (up until it is started).
      Parameters:
      tournament - The tournament to add the participant to. Must contain tournament id
      data - The participant data
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • bulkAddParticipants

      java.util.List<Participant> bulkAddParticipants​(Tournament tournament, java.util.List<ParticipantQuery> data) 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 - The tournament to add the participants to. Must contain tournament id
      data - The participant data
      Returns:
      The added participants
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • bulkAddParticipants

      void bulkAddParticipants​(Tournament tournament, java.util.List<ParticipantQuery> data, Callback<java.util.List<Participant>> 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 - The tournament to add the participants to. Must contain tournament id
      data - The participant data
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • updateParticipant

      Participant updateParticipant​(Participant participant, ParticipantQuery data) throws DataAccessException
      Update the attributes of a tournament participant.
      Parameters:
      participant - The participant to update. Must contain the tournament id and the participant's id
      data - The participant data
      Returns:
      The updates participant
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • updateParticipant

      void updateParticipant​(Participant participant, ParticipantQuery data, Callback<Participant> onSuccess, Callback<DataAccessException> onFailure)
      Update the attributes of a tournament participant.
      Parameters:
      participant - The participant to update. Must contain the tournament id and the participant's id
      data - The participant data
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • checkInParticipant

      Participant checkInParticipant​(Participant participant) throws DataAccessException
      Checks a participant in, setting checked_in_at to the current time.
      Parameters:
      participant - The participant to check in. Must contain the tournament id and the participant's id
      Returns:
      The checked in participant
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • checkInParticipant

      void checkInParticipant​(Participant participant, Callback<Participant> onSuccess, Callback<DataAccessException> onFailure)
      Checks a participant in, setting checked_in_at to the current time.
      Parameters:
      participant - The participant to check in. Must contain the tournament id and the participant's id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • undoCheckInParticipant

      Participant undoCheckInParticipant​(Participant participant) throws DataAccessException
      Marks a participant as having not checked in, setting checked_in_at to nil.
      Parameters:
      participant - The participant to check in. Must contain the tournament id and the participant's id
      Returns:
      The checked out participant
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • undoCheckInParticipant

      void undoCheckInParticipant​(Participant participant, Callback<Participant> onSuccess, Callback<DataAccessException> onFailure)
      Marks a participant as having not checked in, setting checked_in_at to nil.
      Parameters:
      participant - The participant to check in. Must contain the tournament id and the participant's id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • deleteParticipant

      Participant deleteParticipant​(Participant participant) 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:
      participant - The participant to delete. Must contain the tournament id and the participant's id
      Returns:
      The deleted participant
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • deleteParticipant

      void deleteParticipant​(Participant participant, Callback<Participant> 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:
      participant - The participant to delete. Must contain the tournament id and the participant's id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • randomizeParticipants

      java.util.List<Participant> randomizeParticipants​(Tournament tournament) throws DataAccessException
      Randomize seeds among participants. Only applicable before a tournament has started.
      Parameters:
      tournament - The tournament to randomize. Must contain the tournament id
      Returns:
      The randomized participants
      Throws:
      DataAccessException - Exchange with the rest api or validation failed
    • randomizeParticipants

      void randomizeParticipants​(Tournament tournament, Callback<java.util.List<Participant>> onSuccess, Callback<DataAccessException> onFailure)
      Randomize seeds among participants. Only applicable before a tournament has started.
      Parameters:
      tournament - The tournament to randomize. Must contain the tournament id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • 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
    • markMatchAsUnderway

      Match markMatchAsUnderway​(Match match) throws DataAccessException
      Marks a match as underway
      Parameters:
      match - The match to mark as underway. Must contain the tournament- and match id
      Returns:
      The updated match
      Throws:
      DataAccessException - Exchange with the rest api failed
    • markMatchAsUnderway

      void markMatchAsUnderway​(Match match, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)
      Marks a match as underway
      Parameters:
      match - The match to mark as underway. Must contain the tournament- and match id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • unmarkMatchAsUnderway

      Match unmarkMatchAsUnderway​(Match match) throws DataAccessException
      Unmarks a match as underway
      Parameters:
      match - The match to unmark as underway. Must contain the tournament- and match id
      Returns:
      The updated match
      Throws:
      DataAccessException - Exchange with the rest api failed
    • unmarkMatchAsUnderway

      void unmarkMatchAsUnderway​(Match match, Callback<Match> onSuccess, Callback<DataAccessException> onFailure)
      Unmarks a match as underway
      Parameters:
      match - The match to unmark as underway. Must contain the tournament- and match id
      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
    • getAttachments

      java.util.List<Attachment> getAttachments​(Match match) throws DataAccessException
      Retrieve a match's attachments.
      Parameters:
      match - The match to get the attachments from. Must contain the tournament- and match id
      Returns:
      The match attachments
      Throws:
      DataAccessException - Exchange with the rest api failed
    • getAttachments

      void getAttachments​(Match match, Callback<java.util.List<Attachment>> onSuccess, Callback<DataAccessException> onFailure)
      Retrieve a match's attachments.
      Parameters:
      match - The match to get the attachments from. Must contain the tournament- and match id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • getAttachment

      Attachment getAttachment​(Match match, long attachmentId) throws DataAccessException
      Retrieve a single match attachment record.
      Parameters:
      match - The match to get the attachment from. Must contain the tournament- and match id
      attachmentId - The attachment's unique ID
      Returns:
      The requested attachment
      Throws:
      DataAccessException - Exchange with the rest api failed
    • getAttachment

      void getAttachment​(Match match, long attachmentId, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)
      Retrieve a single match attachment record.
      Parameters:
      match - The match to get the attachment from. Must contain the tournament- and match id
      attachmentId - The attachment's unique ID
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • createAttachment

      Attachment createAttachment​(Match match, AttachmentQuery data) throws DataAccessException
      Add a file, link, or text attachment to a match. NOTE: The associated tournament's "accept_attachments" attribute must be true for this action to succeed.

      At least 1 of the 3 optional parameters (asset, url or description in the enumeration object) must be provided. Files up to 25MB are allowed for tournaments hosted by Challonge Premier subscribers.

      Parameters:
      match - The match to create the attachment for. Must contain the tournament- and match id
      data - The attachment to create
      Returns:
      The created attachment
      Throws:
      DataAccessException - Exchange with the rest api failed
    • createAttachment

      void createAttachment​(Match match, AttachmentQuery data, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)
      Add a file, link, or text attachment to a match. NOTE: The associated tournament's "accept_attachments" attribute must be true for this action to succeed.

      At least 1 of the 3 optional parameters (asset, url or description in the enumeration object) must be provided. Files up to 25MB are allowed for tournaments hosted by Challonge Premier subscribers.

      Parameters:
      match - The match to create the attachment for. Must contain the tournament- and match id
      data - The attachment to create
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • updateAttachment

      Attachment updateAttachment​(Match match, Attachment attachment, AttachmentQuery data) throws DataAccessException
      Update the attributes of a match attachment.

      Sending the asset does neither work with base64 nor with a multipart-form-data request

      At least 1 of the 3 optional parameters (asset, url or description in the enumeration object) must be provided. Files up to 25MB are allowed for tournaments hosted by Challonge Premier subscribers.

      Parameters:
      match - The match to delete the attachment from. Must contain the tournament- and match id
      attachment - The attachment to update. Must contain the tournament- and match id
      data - The attachment to update
      Returns:
      The updated attachment
      Throws:
      DataAccessException - Exchange with the rest api failed
    • updateAttachment

      void updateAttachment​(Match match, Attachment attachment, AttachmentQuery data, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)
      Update the attributes of a match attachment.

      Sending the asset does neither work with base64 nor with a multipart-form-data request

      At least 1 of the 3 optional parameters (asset, url or description in the enumeration object) must be provided. Files up to 25MB are allowed for tournaments hosted by Challonge Premier subscribers.

      Parameters:
      match - The match to delete the attachment from. Must contain the tournament- and match id
      attachment - The attachment to update. Must contain the tournament- and match id
      data - The attachment to update
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful
    • deleteAttachment

      Attachment deleteAttachment​(Match match, Attachment attachment) throws DataAccessException
      Delete a match attachment.
      Parameters:
      match - The match to delete the attachment from. Must contain the tournament- and match id
      attachment - The attachment to delete. Must contain the tournament- and match id
      Returns:
      The deleted attachment
      Throws:
      DataAccessException - Exchange with the rest api failed
    • deleteAttachment

      void deleteAttachment​(Match match, Attachment attachment, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)
      Delete a match attachment.
      Parameters:
      match - The match to delete the attachment from. Must contain the tournament- and match id
      attachment - The attachment to delete. Must contain the tournament- and match id
      onSuccess - Called with result if call was successful
      onFailure - Called with exception if call was not successful