跳到主要内容

v1/contest.proto (version not set)

Download OpenAPI specification:Download

ContestService

比赛列表

query Parameters
name
string
groupId
integer <int32>
page
integer <int32>
perPage
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": "string"
}

创建比赛

Request Body schema: application/json
name
string
groupId
integer <int32>
startTime
string <date-time>
endTime
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "groupId": 0,
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z"
}

Response samples

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": {
    },
  • "feature": "string"
}

获取全部提交列表

path Parameters
contestId
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

批量添加用户

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

Content type
application/json
{
  • "users": [
    ],
  • "role": "ROLE_GUEST"
}

Response samples

Content type
application/json
{
  • "success": [
    ],
  • "failed": [
    ]
}

计算比赛积分

path Parameters
contestId
required
integer <int32>
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

退出虚拟竞赛

path Parameters
contestId
required
integer <int32>
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

获取等级分变化

path Parameters
contestId
required
integer <int32>
query Parameters
page
integer <int32>
perPage
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": "string"
}

查询比赛特效

path Parameters
contestId
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "contestName": "string",
  • "userName": "string",
  • "contestDuration": "string",
  • "akTime": "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

Content type
application/json
{
  • "data": [
    ],
  • "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

Content type
application/json
{
  • "data": [
    ],
  • "total": "string"
}

用户注册比赛

path Parameters
contestId
required
integer <int32>
Request Body schema: application/json
invitationCode
string
name
string

Responses

Request samples

Content type
application/json
{
  • "invitationCode": "string",
  • "name": "string"
}

Response samples

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

Content type
application/json
{
  • "userId": 0,
  • "name": "string",
  • "role": "ROLE_GUEST"
}

Response samples

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>
userId
required
integer <int32>

Responses

Response samples

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>
userId
required
integer <int32>

Responses

Response samples

Content type
application/json
{ }

比赛详情

path Parameters
id
required
integer <int32>

Responses

Response samples

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": {
    },
  • "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

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

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": {
    },
  • "feature": "string"
}

获取比赛题目列表

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": "string"
}

创建比赛题目

path Parameters
id
required
integer <int32>
Request Body schema: application/json
problemIds
Array of integers <int32> [ items <int32 > ]

Responses

Request samples

Content type
application/json
{
  • "problemIds": [
    ]
}

Response samples

Content type
application/json
{
  • "success": [
    ],
  • "failed": [
    ]
}

获取比赛题目

path Parameters
id
required
integer <int32>
number
required
integer <int32>

Responses

Response samples

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": [
    ],
  • "sampleTests": [
    ],
  • "status": "NOT_START"
}

删除比赛题目

path Parameters
id
required
integer <int32>
number
required
integer <int32>

Responses

Response samples

Content type
application/json
{ }

语言列表

path Parameters
id
required
integer <int32>
number
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": "string"
}

语言详情

path Parameters
id
required
integer <int32>
number
required
integer <int32>
language
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "languageCode": 0,
  • "languageName": "string",
  • "userContent": "string",
  • "mainContent": "string"
}

获取比赛榜单

path Parameters
id
required
integer <int32>
query Parameters
isVirtualIncluded
boolean
isOfficial
boolean
page
integer <int32>
perPage
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 0
}