用户
列出个人公钥
列出个人公钥,需要鉴权。
GET /api/user/{username}/keys
请求参数
字段 | 描述 |
---|---|
usernamestring | 用户名 username |
响应示例
Status: 200 OK
{
"code": 0,
"data": [
{
"id": 176947,
"owner_id": 93,
"finger_print": "xxx",
"type": "",
"title": "Coding@xxx",
"has_expired": false,
"created_at": 1483435363000
}
]
}
获取当前用户头像
获取当前用户头像,需要鉴权。
GET /api/account/avatar
响应示例
Status: 200 OK
{
"code": 0,
"data": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0"
}
获取当前用户邮箱
获取当前用户邮箱,需要鉴权。
GET /api/account/email
响应示例
Status: 200 OK
{
"code": 0,
"data": "admin@coding.net"
}
获取当前登录用户信息
获取当前登录用户信息,需要鉴权。
GET /api/account/current_user
响应示例
Status: 200 OK
{
"code": 0,
"data": {
"tags_str": "云计算追随者, 技术风向标",
"tags": "19,32",
"job_str": "产品",
"job": 2,
"sex": 0,
"location": "广东 深圳",
"company": "Coding.net",
"slogan": "",
"website": "",
"introduction": "",
"avatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
"gravatar": "",
"lavatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
"created_at": 1403329814000,
"last_logined_at": 1553703523000,
"last_activity_at": 1553853207680,
"global_key": "coding",
"name": "coding",
"name_pinyin": "",
"updated_at": 1553703524000,
"path": "/u/coding",
"status": 1,
"is_member": 0,
"id": 93,
"vip": 4,
"vip_expired_at": 1562256000000,
"follows_count": 0,
"fans_count": 0,
"tweets_count": 756,
"followed": true,
"follow": true,
"is_tencent_user": false
}
}
获取某个用户信息
通过 username 获取某个用户信息
GET /api/account/key/{username}
请求参数
字段 | 描述 |
---|---|
usernamestring | 用户名 username |
响应示例
Status: 200 OK
{
"code": 0,
"data": {
"tags_str": "云计算追随者, 技术风向标",
"tags": "19,32",
"job_str": "产品",
"job": 2,
"sex": 0,
"location": "广东 深圳",
"company": "Coding.net",
"slogan": "",
"website": "",
"introduction": "",
"avatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
"gravatar": "",
"lavatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
"created_at": 1403329814000,
"last_logined_at": 1553703523000,
"last_activity_at": 1553851797552,
"global_key": "coding",
"name": "coding",
"name_pinyin": "",
"updated_at": 1553703524000,
"path": "/u/coding",
"status": 1,
"is_member": 0,
"id": 93,
"vip": 4,
"vip_expired_at": 1562256000000,
"follows_count": 0,
"fans_count": 0,
"tweets_count": 756,
"followed": false,
"follow": false,
"is_tencent_user": false
}
}
当前内容版权归 coding.net 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 coding.net .