Interface AttachmentRestClient
-
public interface AttachmentRestClientAttachment Rest Client Definition
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttachmentWrappercreateAttachment(java.lang.String tournament, long matchId, AttachmentQuery attachment)Add a file, link, or text attachment to a match.voidcreateAttachment(java.lang.String tournament, long matchId, AttachmentQuery attachment, Callback<AttachmentWrapper> onSuccess, Callback<DataAccessException> onFailure)Add a file, link, or text attachment to a match.AttachmentWrapperdeleteAttachment(java.lang.String tournament, long matchId, long attachmentId)Delete a match attachment.voiddeleteAttachment(java.lang.String tournament, long matchId, long attachmentId, Callback<AttachmentWrapper> onSuccess, Callback<DataAccessException> onFailure)Delete a match attachment.AttachmentWrappergetAttachment(java.lang.String tournament, long matchId, long attachmentId)Retrieve a single match attachment record.voidgetAttachment(java.lang.String tournament, long matchId, long attachmentId, Callback<AttachmentWrapper> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single match attachment record.java.util.List<AttachmentWrapper>getAttachments(java.lang.String tournament, long matchId)Retrieve a match's attachments.voidgetAttachments(java.lang.String tournament, long matchId, Callback<java.util.List<AttachmentWrapper>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a match's attachments.AttachmentWrapperupdateAttachment(java.lang.String tournament, long matchId, long attachmentId, AttachmentQuery attachment)Update the attributes of a match attachment.voidupdateAttachment(java.lang.String tournament, long matchId, long attachmentId, AttachmentQuery attachment, Callback<AttachmentWrapper> onSuccess, Callback<DataAccessException> onFailure)Update the attributes of a match attachment.
-
-
-
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 IDonSuccess- Called with result if call was successfulonFailure- 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 IDattachmentId- 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 IDattachmentId- The attachment's unique IDonSuccess- Called with result if call was successfulonFailure- 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 IDattachment- 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 IDattachment- The attachment to createonSuccess- Called with result if call was successfulonFailure- 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 IDattachmentId- The attachment's unique IDattachment- 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 IDattachmentId- The attachment's unique IDattachment- The attachment to updateonSuccess- Called with result if call was successfulonFailure- 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 IDattachmentId- 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 IDattachmentId- The attachment's unique IDonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
-