Skip to main content

用户 API

用户信息 api

个人信息​

获取个人信息


GET /openapi/v1/athlete/info/​

Response 200​

字段详情​

字段名类型含义备注
id整数用户id
username字符串用户名
sex整数性别0:保密 1:男 2:女
age整数年龄默认值为18
height整数身高单位cm
weight浮点型体重单位kg,保留一位小数
birthday字符串生日YYYY-mm-DD格式
avatar字符串头像图片链接

样例​

{
"id": 1,
"username": "username",
"sex": 0,
"age": 18,
"height": 170,
"weight": 60,
"birthday": "2023-07-26",
"avatar": "www.example.com/avatar_url"
}

Error Response​

400​

{
"code": 400,
"msg": "API Limited",
"data": {}
}

401​

{
"code": 401,
"msg": "Unauthorized Error",
"data": {}
}

500​

{
"code": 500,
"msg": "Server Error",
"data": {}
}