v1/contest.proto (version not set)
Download OpenAPI specification:Download
比赛列表
query Parameters
name | string |
groupId | integer <int32> |
page | integer <int32> |
perPage | integer <int32> |
Responses
Response samples
- 200
- default
Content type
application/json
{- "data": [
- {
- "id": 0,
- "name": "string",
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "frozenTime": "2019-08-24T14:15:22Z",
- "type": "ICPC",
- "privacy": "PRIVATE",
- "membership": "ALLOW_ANYONE",
- "invitationCode": "string",
- "participantCount": 0,
- "userId": 0,
- "role": "ROLE_GUEST",
- "virtualStart": "2019-08-24T14:15:22Z",
- "virtualEnd": "2019-08-24T14:15:22Z",
- "runningStatus": "NOT_STARTED",
- "owner": {
- "type": "GROUP",
- "id": 0,
- "name": "string",
- "userNickname": "string"
}, - "feature": "string"
}
], - "total": "string"
}
创建比赛
Request Body schema: application/json
name | string |
groupId | integer <int32> |
startTime | string <date-time> |
endTime | string <date-time> |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "groupId": 0,
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "frozenTime": "2019-08-24T14:15:22Z",
- "type": "ICPC",
- "privacy": "PRIVATE",
- "membership": "ALLOW_ANYONE",
- "invitationCode": "string",
- "participantCount": 0,
- "userId": 0,
- "role": "ROLE_GUEST",
- "virtualStart": "2019-08-24T14:15:22Z",
- "virtualEnd": "2019-08-24T14:15:22Z",
- "runningStatus": "NOT_STARTED",
- "owner": {
- "type": "GROUP",
- "id": 0,
- "name": "string",
- "userNickname": "string"
}, - "feature": "string"
}
批量添加用户
path Parameters
contestId required | integer <int32> |
Request Body schema: application/json
Array of objects (contestBatchCreateContestUsersRequestContestUser) | |
role | string (比赛用户角色) Default: "ROLE_GUEST" Enum: "ROLE_GUEST" "ROLE_OFFICIAL_PLAYER" "ROLE_UNOFFICIAL_PLAYER" "ROLE_VIRTUAL_PLAYER" "ROLE_WRITER" "ROLE_ADMIN" |
Responses
Request samples
- Payload
Content type
application/json
{- "users": [
- {
- "username": "string",
- "name": "string"
}
], - "role": "ROLE_GUEST"
}
Response samples
- 200
- default
Content type
application/json
{- "success": [
- {
- "username": "string",
- "name": "string",
- "reason": "string"
}
], - "failed": [
- {
- "username": "string",
- "name": "string",
- "reason": "string"
}
]
}
获取等级分变化
path Parameters
contestId required | integer <int32> |
query Parameters
page | integer <int32> |
perPage | integer <int32> |
Responses
Response samples
- 200
- default
Content type
application/json
{- "data": [
- {
- "id": 0,
- "name": "string",
- "userId": 0,
- "userNickname": "string",
- "userAvatar": "string",
- "virtualStart": "2019-08-24T14:15:22Z",
- "oldRating": 0,
- "newRating": 0,
- "role": "ROLE_GUEST",
- "specialEffects": "string"
}
], - "total": "string"
}
获取提交列表
path Parameters
contestId required | integer <int32> |
query Parameters
verdict | Array of integers <int32> [ items <int32 > ] |
problem | integer <int32> |
userId | integer <int32> |
page | integer <int32> |
perPage | integer <int32> |
Responses
Response samples
- 200
- default
Content type
application/json
{- "data": [
- {
- "id": 0,
- "problemNumber": 0,
- "problemName": "string",
- "verdict": 0,
- "time": 0,
- "memory": 0,
- "userId": 0,
- "score": 0,
- "language": 0,
- "user": {
- "id": 0,
- "nickname": "string"
}, - "createdAt": "2019-08-24T14:15:22Z"
}
], - "total": "string"
}
获取比赛用户
path Parameters
contestId required | integer <int32> |
query Parameters
name | string |
role | string Default: "ROLE_GUEST" Enum: "ROLE_GUEST" "ROLE_OFFICIAL_PLAYER" "ROLE_UNOFFICIAL_PLAYER" "ROLE_VIRTUAL_PLAYER" "ROLE_WRITER" "ROLE_ADMIN" |
page | integer <int32> |
perPage | integer <int32> |
Responses
Response samples
- 200
- default
Content type
application/json
{- "data": [
- {
- "id": 0,
- "name": "string",
- "userId": 0,
- "userNickname": "string",
- "userAvatar": "string",
- "virtualStart": "2019-08-24T14:15:22Z",
- "oldRating": 0,
- "newRating": 0,
- "role": "ROLE_GUEST",
- "specialEffects": "string"
}
], - "total": "string"
}
用户注册比赛
path Parameters
contestId required | integer <int32> |
Request Body schema: application/json
invitationCode | string |
name | string |
Responses
Request samples
- Payload
Content type
application/json
{- "invitationCode": "string",
- "name": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "userId": 0,
- "userNickname": "string",
- "userAvatar": "string",
- "virtualStart": "2019-08-24T14:15:22Z",
- "oldRating": 0,
- "newRating": 0,
- "role": "ROLE_GUEST",
- "specialEffects": "string"
}
修改比赛用户信息
path Parameters
contestId required | integer <int32> |
Request Body schema: application/json
userId | integer <int32> |
name | string |
role | string (比赛用户角色) Default: "ROLE_GUEST" Enum: "ROLE_GUEST" "ROLE_OFFICIAL_PLAYER" "ROLE_UNOFFICIAL_PLAYER" "ROLE_VIRTUAL_PLAYER" "ROLE_WRITER" "ROLE_ADMIN" |
Responses
Request samples
- Payload
Content type
application/json
{- "userId": 0,
- "name": "string",
- "role": "ROLE_GUEST"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "userId": 0,
- "userNickname": "string",
- "userAvatar": "string",
- "virtualStart": "2019-08-24T14:15:22Z",
- "oldRating": 0,
- "newRating": 0,
- "role": "ROLE_GUEST",
- "specialEffects": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "userId": 0,
- "userNickname": "string",
- "userAvatar": "string",
- "virtualStart": "2019-08-24T14:15:22Z",
- "oldRating": 0,
- "newRating": 0,
- "role": "ROLE_GUEST",
- "specialEffects": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "frozenTime": "2019-08-24T14:15:22Z",
- "type": "ICPC",
- "privacy": "PRIVATE",
- "membership": "ALLOW_ANYONE",
- "invitationCode": "string",
- "participantCount": 0,
- "userId": 0,
- "role": "ROLE_GUEST",
- "virtualStart": "2019-08-24T14:15:22Z",
- "virtualEnd": "2019-08-24T14:15:22Z",
- "runningStatus": "NOT_STARTED",
- "owner": {
- "type": "GROUP",
- "id": 0,
- "name": "string",
- "userNickname": "string"
}, - "feature": "string"
}
编辑比赛信息
path Parameters
id required | integer <int32> |
Request Body schema: application/json
name | string |
description | string |
startTime | string <date-time> |
endTime | string <date-time> |
frozenTime | string <date-time> |
type | string (contestContestType) Default: "ICPC" Enum: "ICPC" "IOI" "OI" |
privacy | string (contestContestPrivacy) Default: "PRIVATE" Enum: "PRIVATE" "PUBLIC" |
membership | string (contestContestMembership) Default: "ALLOW_ANYONE" Enum: "ALLOW_ANYONE" "INVITATION_CODE" "GROUP_USER" |
invitationCode | string |
feature | string |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "frozenTime": "2019-08-24T14:15:22Z",
- "type": "ICPC",
- "privacy": "PRIVATE",
- "membership": "ALLOW_ANYONE",
- "invitationCode": "string",
- "feature": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "description": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "frozenTime": "2019-08-24T14:15:22Z",
- "type": "ICPC",
- "privacy": "PRIVATE",
- "membership": "ALLOW_ANYONE",
- "invitationCode": "string",
- "participantCount": 0,
- "userId": 0,
- "role": "ROLE_GUEST",
- "virtualStart": "2019-08-24T14:15:22Z",
- "virtualEnd": "2019-08-24T14:15:22Z",
- "runningStatus": "NOT_STARTED",
- "owner": {
- "type": "GROUP",
- "id": 0,
- "name": "string",
- "userNickname": "string"
}, - "feature": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "data": [
- {
- "id": 0,
- "name": "string",
- "number": 0,
- "contestId": 0,
- "problemId": 0,
- "submitCount": 0,
- "acceptedCount": 0,
- "timeLimit": "string",
- "memoryLimit": "string",
- "source": "string",
- "type": "DEFAULT",
- "statements": [
- {
- "id": 0,
- "problemId": 0,
- "language": "string",
- "name": "string",
- "legend": "string",
- "input": "string",
- "output": "string",
- "note": "string"
}
], - "sampleTests": [
- {
- "input": "string",
- "output": "string"
}
], - "status": "NOT_START"
}
], - "total": "string"
}
创建比赛题目
path Parameters
id required | integer <int32> |
Request Body schema: application/json
problemIds | Array of integers <int32> [ items <int32 > ] |
Responses
Request samples
- Payload
Content type
application/json
{- "problemIds": [
- 0
]
}
Response samples
- 200
- default
Content type
application/json
{- "success": [
- {
- "problemId": 0,
- "reason": "string"
}
], - "failed": [
- {
- "problemId": 0,
- "reason": "string"
}
]
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "name": "string",
- "number": 0,
- "contestId": 0,
- "problemId": 0,
- "submitCount": 0,
- "acceptedCount": 0,
- "timeLimit": "string",
- "memoryLimit": "string",
- "source": "string",
- "type": "DEFAULT",
- "statements": [
- {
- "id": 0,
- "problemId": 0,
- "language": "string",
- "name": "string",
- "legend": "string",
- "input": "string",
- "output": "string",
- "note": "string"
}
], - "sampleTests": [
- {
- "input": "string",
- "output": "string"
}
], - "status": "NOT_START"
}
获取比赛榜单
path Parameters
id required | integer <int32> |
query Parameters
isVirtualIncluded | boolean |
isOfficial | boolean |
page | integer <int32> |
perPage | integer <int32> |
Responses
Response samples
- 200
- default
Content type
application/json
{- "data": [
- {
- "rank": 0,
- "who": "string",
- "userAvatar": "string",
- "userId": 0,
- "solved": 0,
- "isRank": true,
- "isVirtual": true,
- "score": 0,
- "maxScore": 0,
- "problem": {
- "property1": {
- "attempted": 0,
- "isFirstBlood": true,
- "status": "PENDING",
- "score": 0,
- "solvedAt": 0,
- "maxScore": 0,
- "isInComp": true
}, - "property2": {
- "attempted": 0,
- "isFirstBlood": true,
- "status": "PENDING",
- "score": 0,
- "solvedAt": 0,
- "maxScore": 0,
- "isInComp": true
}
}
}
], - "total": 0
}