v1/user.proto (version not set)
Download OpenAPI specification:Download
注册
Request Body schema: application/json
phone | string (手机号) |
string (邮箱) | |
username | string (用户名) |
captcha | string (验证码) |
password | string (密码) |
Responses
Request samples
- Payload
Content type
application/json
{- "phone": "string",
- "email": "string",
- "username": "string",
- "captcha": "string",
- "password": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "token": "string"
}
修改用户信息
path Parameters
id required | integer <int32> |
Request Body schema: application/json
nickname | string |
location | string |
bio | string |
gender | integer <int32> |
school | string |
birthday | string <date-time> |
company | string |
job | string |
Responses
Request samples
- Payload
Content type
application/json
{- "nickname": "string",
- "location": "string",
- "bio": "string",
- "gender": 0,
- "school": "string",
- "birthday": "2019-08-24T14:15:22Z",
- "company": "string",
- "job": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": 0,
- "nickname": "string",
- "username": "string",
- "realname": "string",
- "role": "REGULAR_USER",
- "avatar": "string"
}
修改用户头像
path Parameters
id required | integer <int32> |
Request Body schema: application/json
avatarFile | string |
avatarName | string |
Responses
Request samples
- Payload
Content type
application/json
{- "avatarFile": "string",
- "avatarName": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "url": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "activeYears": [
- 0
], - "submissionCalendar": [
- {
- "date": "string",
- "count": 0
}
], - "totalActiveDays": 0,
- "totalSubmission": 0,
- "totalProblemSolved": 0,
- "start": "string",
- "end": "string"
}
用户主页做题进度
path Parameters
id required | integer <int32> |
query Parameters
type | string Default: "PROBLEMSET" Enum: "PROBLEMSET" "CONTEST" "GROUP" |
page | integer <int32> |
perPage | integer <int32> |
Responses
Response samples
- 200
- default
Content type
application/json
{- "problemsets": [
- {
- "id": 0,
- "name": "string",
- "count": 0,
- "total": 0,
- "problems": [
- {
- "id": 0,
- "status": "NOT_START"
}
]
}
], - "contests": [
- {
- "id": 0,
- "name": "string",
- "groupName": "string",
- "groupId": 0,
- "count": 0,
- "total": 0,
- "problems": [
- {
- "id": 0,
- "status": "NOT_START"
}
]
}
], - "groups": [
- {
- "id": 0,
- "name": "string",
- "count": 0,
- "total": 0,
- "contests": [
- {
- "id": 0,
- "name": "string",
- "groupName": "string",
- "groupId": 0,
- "count": 0,
- "total": 0,
- "problems": [
- {
- "id": 0,
- "status": "NOT_START"
}
]
}
]
}
], - "total": "string"
}