-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Endpoints
GET @ /challenges/{id}/submissions
Gets a list of submitted solutions for said challenge.
Only available if the challenge has ended (now() >= released_at + interval '7' days) or if the user has ManageSubmissions permission.
Submission Object should be something like this:
{
"id": "string",
"challenge_id": "string",
"author_id": "string",
"author": {
"id": "string",
"name": "string",
"avatar": "string",
"discriminator": "string"
},
"language": {
"id": "string",
"name": "string"
},
"code": "string"
}Pagination Required
GET @ /challenges/{id}/submissions/{user_id/submission_id}
GET @ /challenges/{id}/submissions/@meshould also be available
Gets a submission for said user by their user id or submission id.
Submission Object should be the same as the one in GET @ /challenges/{id}/submissions
One of the following conditions should be true for this endpoint to be available:
- If the user is the author of the submission
- If the challenge has ended
- If the user has
ManageSubmissionspermission
POST @ /challenges/{id}/submissions
Creates a new submission for said challenge. Returns 201 Created on success and return id in Location header.
Body
{
"language": "string",
"code": "string"
}DELETE @ /challenges/{challenge_id}/submissions/{id}
Deletes said submission from said challenge. Returns 204 No Content on success.
Needs
ManageSubmissionsPermission