-
Notifications
You must be signed in to change notification settings - Fork 2
Problem
Siyuan Zhang | 张豆 edited this page Oct 11, 2019
·
1 revision
GET /api/v1/problems
Parameter | Default | Description |
---|---|---|
page |
0 |
|
size |
10 |
Parameter | Default | Description |
---|---|---|
title |
null |
fuzzy query |
tags |
null |
String, separate tagId by commas |
GET /api/v1/problems?page=1&size=5&title=test&tags=37,42
[
{
"id": 47,
"authorId": 20,
"authorName": "kastnerorz",
"title": "test4",
"description": "test",
"timeLimit": 10,
"ramLimit": 128,
"difficulty": "HIGH",
"enabled": true,
"tagList": [
{
"id": 37,
"name": "test"
}
],
"inputDesc": "test",
"outputDesc": "test",
"sampleIOList": [
{
"id": 48,
"input": "test",
"output": "test"
},
{
"id": 49,
"input": "test1",
"output": "test1"
}
],
"specialJudged": false,
"testData": "test",
"hint": "",
"source": "",
"averageAcceptTime": 0,
"acceptCount": 0,
"submitCount": 0,
"acceptRate": 0,
"createDate": "2018-08-26T16:28:51",
"lastUsedDate": "2018-08-26T16:28:51"
},
{
"...":"..."
}
]
GET /api/v1/problems/:id
{
"...":"..."
}
POST /api/v1/problems
The parameter which default is "null" must be provided
Parameter | Default | Description |
---|---|---|
authorId |
||
title |
Unique | |
description |
||
timeLimit |
||
ramLimit |
||
difficulty |
HIGH / MEDIUM / LOW | |
enabled |
true |
|
email |
||
tagList |
List | |
inputDesc |
||
outputDesc |
Unique | |
sampleIOList |
List | |
sampleIOList.input |
||
sampleIOList.output |
||
specialJudged |
false |
|
testData |
file upload url | |
hint |
" " | |
source |
" " |
It will return the problem just created.
{
"...":"..."
}
PUT /api/v1/problems/:id
Same as the previous one except the HTTP verb
Parameter | Default | Description |
---|---|---|
authorId |
||
title |
Unique | |
description |
||
timeLimit |
||
ramLimit |
||
difficulty |
HIGH / MEDIUM / LOW | |
enabled |
true |
|
email |
||
tagList |
List | |
inputDesc |
||
outputDesc |
Unique | |
sampleIOList |
List | |
sampleIOList.input |
||
sampleIOList.output |
||
specialJudged |
false |
|
testData |
file upload url | |
hint |
" " | |
source |
" " |
It will return the problem just updated.
{
"...":"..."
}
DELETE /api/v1/problems/:id
{
"...":"..."
}