用户

列出个人公钥

列出个人公钥,需要鉴权

  1. GET /api/user/{username}/keys

请求参数

字段描述
usernamestring用户名 username

响应示例

  1. Status: 200 OK
  2. {
  3. "code": 0,
  4. "data": [
  5. {
  6. "id": 176947,
  7. "owner_id": 93,
  8. "finger_print": "xxx",
  9. "type": "",
  10. "title": "Coding@xxx",
  11. "has_expired": false,
  12. "created_at": 1483435363000
  13. }
  14. ]
  15. }

获取当前用户头像

获取当前用户头像,需要鉴权

  1. GET /api/account/avatar

响应示例

  1. Status: 200 OK
  2. {
  3. "code": 0,
  4. "data": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0"
  5. }

获取当前用户邮箱

获取当前用户邮箱,需要鉴权

  1. GET /api/account/email

响应示例

  1. Status: 200 OK
  2. {
  3. "code": 0,
  4. "data": "admin@coding.net"
  5. }

获取当前登录用户信息

获取当前登录用户信息,需要鉴权

  1. GET /api/account/current_user

响应示例

  1. Status: 200 OK
  2. {
  3. "code": 0,
  4. "data": {
  5. "tags_str": "云计算追随者, 技术风向标",
  6. "tags": "19,32",
  7. "job_str": "产品",
  8. "job": 2,
  9. "sex": 0,
  10. "location": "广东 深圳",
  11. "company": "Coding.net",
  12. "slogan": "",
  13. "website": "",
  14. "introduction": "",
  15. "avatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
  16. "gravatar": "",
  17. "lavatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
  18. "created_at": 1403329814000,
  19. "last_logined_at": 1553703523000,
  20. "last_activity_at": 1553853207680,
  21. "global_key": "coding",
  22. "name": "coding",
  23. "name_pinyin": "",
  24. "updated_at": 1553703524000,
  25. "path": "/u/coding",
  26. "status": 1,
  27. "is_member": 0,
  28. "id": 93,
  29. "vip": 4,
  30. "vip_expired_at": 1562256000000,
  31. "follows_count": 0,
  32. "fans_count": 0,
  33. "tweets_count": 756,
  34. "followed": true,
  35. "follow": true,
  36. "is_tencent_user": false
  37. }
  38. }

获取某个用户信息

通过 username 获取某个用户信息

  1. GET /api/account/key/{username}

请求参数

字段描述
usernamestring用户名 username

响应示例

  1. Status: 200 OK
  2. {
  3. "code": 0,
  4. "data": {
  5. "tags_str": "云计算追随者, 技术风向标",
  6. "tags": "19,32",
  7. "job_str": "产品",
  8. "job": 2,
  9. "sex": 0,
  10. "location": "广东 深圳",
  11. "company": "Coding.net",
  12. "slogan": "",
  13. "website": "",
  14. "introduction": "",
  15. "avatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
  16. "gravatar": "",
  17. "lavatar": "https://dn-coding-net-production-static.codehub.cn/512b2a62-956b-4ef8-8e84-b3c66e71468f.png?imageMogr2/auto-orient/format/png/crop/!300x300a0a0",
  18. "created_at": 1403329814000,
  19. "last_logined_at": 1553703523000,
  20. "last_activity_at": 1553851797552,
  21. "global_key": "coding",
  22. "name": "coding",
  23. "name_pinyin": "",
  24. "updated_at": 1553703524000,
  25. "path": "/u/coding",
  26. "status": 1,
  27. "is_member": 0,
  28. "id": 93,
  29. "vip": 4,
  30. "vip_expired_at": 1562256000000,
  31. "follows_count": 0,
  32. "fans_count": 0,
  33. "tweets_count": 756,
  34. "followed": false,
  35. "follow": false,
  36. "is_tencent_user": false
  37. }
  38. }