public interface RetrofitAttachmentHandler
| Modifier and Type | Method and Description |
|---|---|
retrofit2.Call<Attachment> |
createAttachment(String tournament,
int matchId,
AttachmentQuery attachment)
Add a file, link, or text attachment to a match.
|
retrofit2.Call<Attachment> |
deleteAttachment(String tournament,
int matchId,
int attachmentId)
Delete a match attachment.
|
retrofit2.Call<Attachment> |
getAttachment(String tournament,
int matchId,
int attachmentId)
Retrieve a single match attachment record.
|
retrofit2.Call<List<Attachment>> |
getAttachments(String tournament,
int matchId)
Retrieve a match's attachments.
|
retrofit2.Call<Attachment> |
updateAttachment(String tournament,
int matchId,
int attachmentId,
AttachmentQuery attachment)
Update the attributes of a match attachment.
|
@GET(value="tournaments/{tournament}/matches/{match_id}/attachments/{attachment_id}.json")
retrofit2.Call<Attachment> getAttachment(@Path(value="tournament")
String tournament,
@Path(value="match_id")
int matchId,
@Path(value="attachment_id")
int attachmentId)
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@GET(value="tournaments/{tournament}/matches/{match_id}/attachments.json")
retrofit2.Call<List<Attachment>> getAttachments(@Path(value="tournament")
String tournament,
@Path(value="match_id")
int matchId)
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@POST(value="tournaments/{tournament}/matches/{match_id}/attachments.json")
retrofit2.Call<Attachment> createAttachment(@Path(value="tournament")
String tournament,
@Path(value="match_id")
int matchId,
@Body
AttachmentQuery attachment)
At least 1 of the 3 optional parameters (asset, url or description in the query object) must be provided. Files up to 25MB are allowed for tournaments hosted by Challonge Premier subscribers.
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 data@PUT(value="tournaments/{tournament}/matches/{match_id}/attachments/{attachment_id}.json")
retrofit2.Call<Attachment> updateAttachment(@Path(value="tournament")
String tournament,
@Path(value="match_id")
int matchId,
@Path(value="attachment_id")
int attachmentId,
@Body
AttachmentQuery 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 query object) must be provided. Files up to 25MB are allowed for tournaments hosted by Challonge Premier subscribers.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 data@DELETE(value="tournaments/{tournament}/matches/{match_id}/attachments/{attachment_id}.json")
retrofit2.Call<Attachment> deleteAttachment(@Path(value="tournament")
String tournament,
@Path(value="match_id")
int matchId,
@Path(value="attachment_id")
int attachmentId)
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 IDCopyright © 2016. All rights reserved.