Interface AttachmentRestClient


  • public interface AttachmentRestClient
    Attachment Rest Client Definition
    • Method Detail

      • getAttachments

        java.util.List<AttachmentWrapper> getAttachments​(java.lang.String tournament,
                                                         long matchId)
                                                  throws DataAccessException
        Retrieve a match's attachments.
        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 match attachments
        Throws:
        DataAccessException - Exchange with the rest api failed
      • getAttachments

        void getAttachments​(java.lang.String tournament,
                            long matchId,
                            Callback<java.util.List<AttachmentWrapper>> onSuccess,
                            Callback<DataAccessException> onFailure)
        Retrieve a match's attachments.
        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
      • getAttachment

        AttachmentWrapper getAttachment​(java.lang.String tournament,
                                        long matchId,
                                        long attachmentId)
                                 throws DataAccessException
        Retrieve a single match attachment record.
        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
        attachmentId - The attachment's unique ID
        Returns:
        The requested attachment
        Throws:
        DataAccessException - Exchange with the rest api failed
      • getAttachment

        void getAttachment​(java.lang.String tournament,
                           long matchId,
                           long attachmentId,
                           Callback<AttachmentWrapper> onSuccess,
                           Callback<DataAccessException> onFailure)
        Retrieve a single match attachment record.
        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
        attachmentId - The attachment's unique ID
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • createAttachment

        AttachmentWrapper createAttachment​(java.lang.String tournament,
                                           long matchId,
                                           AttachmentQuery attachment)
                                    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:
        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
        attachment - The attachment to create
        Returns:
        The created attachment
        Throws:
        DataAccessException - Exchange with the rest api failed
      • createAttachment

        void createAttachment​(java.lang.String tournament,
                              long matchId,
                              AttachmentQuery attachment,
                              Callback<AttachmentWrapper> 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:
        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
        attachment - The attachment to create
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • updateAttachment

        AttachmentWrapper updateAttachment​(java.lang.String tournament,
                                           long matchId,
                                           long attachmentId,
                                           AttachmentQuery attachment)
                                    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:
        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
        attachmentId - The attachment's unique ID
        attachment - The attachment to update
        Returns:
        The updated attachment
        Throws:
        DataAccessException - Exchange with the rest api failed
      • updateAttachment

        void updateAttachment​(java.lang.String tournament,
                              long matchId,
                              long attachmentId,
                              AttachmentQuery attachment,
                              Callback<AttachmentWrapper> 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:
        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
        attachmentId - The attachment's unique ID
        attachment - The attachment to update
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • deleteAttachment

        AttachmentWrapper deleteAttachment​(java.lang.String tournament,
                                           long matchId,
                                           long attachmentId)
                                    throws DataAccessException
        Delete a match attachment.
        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
        attachmentId - The attachment's unique ID
        Returns:
        The deleted attachment
        Throws:
        DataAccessException - Exchange with the rest api failed
      • deleteAttachment

        void deleteAttachment​(java.lang.String tournament,
                              long matchId,
                              long attachmentId,
                              Callback<AttachmentWrapper> onSuccess,
                              Callback<DataAccessException> onFailure)
        Delete a match attachment.
        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
        attachmentId - The attachment's unique ID
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful