Interface AttachmentService
-
- All Known Implementing Classes:
Challonge,SimpleAttachmentService
public interface AttachmentServiceAttachment Service Definitions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttachmentcreateAttachment(Match match, AttachmentQuery data)Add a file, link, or text attachment to a match.voidcreateAttachment(Match match, AttachmentQuery data, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)Add a file, link, or text attachment to a match.AttachmentdeleteAttachment(Match match, Attachment attachment)Delete a match attachment.voiddeleteAttachment(Match match, Attachment attachment, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)Delete a match attachment.AttachmentgetAttachment(Match match, long attachmentId)Retrieve a single match attachment record.voidgetAttachment(Match match, long attachmentId, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)Retrieve a single match attachment record.java.util.List<Attachment>getAttachments(Match match)Retrieve a match's attachments.voidgetAttachments(Match match, Callback<java.util.List<Attachment>> onSuccess, Callback<DataAccessException> onFailure)Retrieve a match's attachments.AttachmentupdateAttachment(Match match, Attachment attachment, AttachmentQuery data)Update the attributes of a match attachment.voidupdateAttachment(Match match, Attachment attachment, AttachmentQuery data, Callback<Attachment> onSuccess, Callback<DataAccessException> onFailure)Update the attributes of a match attachment.
-
-
-
Method Detail
-
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 idonSuccess- Called with result if call was successfulonFailure- 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 idattachmentId- 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 idattachmentId- The attachment's unique IDonSuccess- Called with result if call was successfulonFailure- 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 iddata- 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 iddata- The attachment to createonSuccess- Called with result if call was successfulonFailure- 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 idattachment- The attachment to update. Must contain the tournament- and match iddata- 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 idattachment- The attachment to update. Must contain the tournament- and match iddata- The attachment to updateonSuccess- Called with result if call was successfulonFailure- 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 idattachment- 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 idattachment- The attachment to delete. Must contain the tournament- and match idonSuccess- Called with result if call was successfulonFailure- Called with exception if call was not successful
-
-