用户信息

  • 地址 GET /api/user/:username
  • 请求类型 application/json
  • 参数
    • username: 用户名
  • 返回 Result(Map)
    • 用户信息
    • 话题列表(7条)
    • 评论列表(7条)
    • 收藏条数
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": {
  5. "oAuthUsers": [
  6. {
  7. "id": 1,
  8. "oauthId": 6915570,
  9. "type": "GITHUB",
  10. "login": "tomoya92",
  11. "inTime": 1548734221000,
  12. "bio": "hello world",
  13. "email": "py2qiuse@gmail.com",
  14. "userId": 1
  15. }
  16. ],
  17. "comments": {
  18. "records": [
  19. {
  20. "inTime": 1548992961000,
  21. "topicId": 1,
  22. "commentUsername": "tomoya",
  23. "upIds": "2",
  24. "id": 1,
  25. "topicUsername": "tomoya",
  26. "title": "我是一个话题标题",
  27. "userId": 1,
  28. "content": "modify_comment_content"
  29. }
  30. ],
  31. "total": 1,
  32. "size": 10,
  33. "current": 1,
  34. "searchCount": true,
  35. "pages": 1
  36. },
  37. "topics": {
  38. "records": [
  39. {
  40. "collectCount": 2,
  41. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  42. "title": "我是一个话题标题",
  43. "userId": 1,
  44. "good": false,
  45. "content": "我是话题内容\n\n我还支持Markdown语法哦\n\n![](https://avatars3.githubusercontent.com/u/6915570?s=460&v=4)\n\n- 无序列表1\n- 无序列表2\n- 无序列表3\n\n1. 有序列表1\n2. 有序列表2\n3. 有序列表3\n\n| Column A | Column B | Column C |\n| -------- | -------- | -------- |\n| A1 | B1 | C1 |\n| A2 | B2 | C2 |\n| A3 | B3 | C3 |\n\n[开发俱乐部](https://17dev.club/)",
  46. "commentCount": 4,
  47. "inTime": 1548992281000,
  48. "view": 20,
  49. "modifyTime": 1548992296000,
  50. "top": false,
  51. "upIds": "2",
  52. "id": 1,
  53. "username": "tomoya"
  54. }
  55. ],
  56. "total": 1,
  57. "size": 10,
  58. "current": 1,
  59. "searchCount": true,
  60. "pages": 1
  61. },
  62. "collectCount": 1,
  63. "user": {
  64. "id": 1,
  65. "username": "tomoya",
  66. "telegramName": null,
  67. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  68. "email": "py2qiuse@gmail.com",
  69. "website": "https://17dev.club/",
  70. "bio": "hello world",
  71. "score": 20,
  72. "inTime": 1548992041000,
  73. "emailNotification": false
  74. }
  75. }
  76. }

用户话题列表

  • 地址 GET /api/user/:username/topics
  • 请求类型 application/json
  • 参数
    • username: 用户名
    • pageNo: 页数
  • 返回 Result(Map)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": {
  5. "topics": {
  6. "records": [
  7. {
  8. "collectCount": 2,
  9. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  10. "title": "我是一个话题标题",
  11. "userId": 1,
  12. "good": false,
  13. "content": "我是话题内容\n\n我还支持Markdown语法哦\n\n![](https://avatars3.githubusercontent.com/u/6915570?s=460&v=4)\n\n- 无序列表1\n- 无序列表2\n- 无序列表3\n\n1. 有序列表1\n2. 有序列表2\n3. 有序列表3\n\n| Column A | Column B | Column C |\n| -------- | -------- | -------- |\n| A1 | B1 | C1 |\n| A2 | B2 | C2 |\n| A3 | B3 | C3 |\n\n[开发俱乐部](https://17dev.club/)",
  14. "commentCount": 4,
  15. "inTime": 1548992281000,
  16. "view": 20,
  17. "modifyTime": 1548992296000,
  18. "top": false,
  19. "upIds": "2",
  20. "id": 1,
  21. "username": "tomoya"
  22. }
  23. ],
  24. "total": 1,
  25. "size": 20,
  26. "current": 1,
  27. "searchCount": true,
  28. "pages": 1
  29. },
  30. "user": {
  31. "id": 1,
  32. "username": "tomoya",
  33. "telegramName": null,
  34. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  35. "email": "py2qiuse@gmail.com",
  36. "website": "https://17dev.club/",
  37. "bio": "hello world",
  38. "score": 20,
  39. "inTime": 1548992041000,
  40. "emailNotification": false
  41. }
  42. }
  43. }

用户评论列表

  • 地址 GET /api/user/:username/comments
  • 请求类型 application/json
  • 参数
    • username: 用户名
    • pageNo: 页数
  • 返回 Result(Map)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": {
  5. "comments": {
  6. "records": [
  7. {
  8. "inTime": 1548992961000,
  9. "topicId": 1,
  10. "commentUsername": "tomoya",
  11. "upIds": "2",
  12. "id": 1,
  13. "topicUsername": "tomoya",
  14. "title": "我是一个话题标题",
  15. "userId": 1,
  16. "content": "modify_comment_content"
  17. }
  18. ],
  19. "total": 1,
  20. "size": 20,
  21. "current": 1,
  22. "searchCount": true,
  23. "pages": 1
  24. },
  25. "user": {
  26. "id": 1,
  27. "username": "tomoya",
  28. "telegramName": null,
  29. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  30. "email": "py2qiuse@gmail.com",
  31. "website": "https://17dev.club/",
  32. "bio": "hello world",
  33. "score": 20,
  34. "inTime": 1548992041000,
  35. "emailNotification": false
  36. }
  37. }
  38. }

用户收藏列表

  • 地址 GET /api/user/:username/collects
  • 请求类型 application/json
  • 参数
    • username: 用户名
    • pageNo: 页数
  • 返回 Result(Map)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": {
  5. "user": {
  6. "id": 1,
  7. "username": "tomoya",
  8. "telegramName": null,
  9. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  10. "email": "py2qiuse@gmail.com",
  11. "website": "https://17dev.club/",
  12. "bio": "hello world",
  13. "score": 20,
  14. "inTime": 1548992041000,
  15. "emailNotification": false
  16. },
  17. "collects": {
  18. "records": [
  19. {
  20. "collectCount": 2,
  21. "avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
  22. "title": "我是一个话题标题",
  23. "userId": 1,
  24. "good": false,
  25. "content": "我是话题内容\n\n我还支持Markdown语法哦\n\n![](https://avatars3.githubusercontent.com/u/6915570?s=460&v=4)\n\n- 无序列表1\n- 无序列表2\n- 无序列表3\n\n1. 有序列表1\n2. 有序列表2\n3. 有序列表3\n\n| Column A | Column B | Column C |\n| -------- | -------- | -------- |\n| A1 | B1 | C1 |\n| A2 | B2 | C2 |\n| A3 | B3 | C3 |\n\n[开发俱乐部](https://17dev.club/)",
  26. "commentCount": 4,
  27. "tags": [
  28. {
  29. "id": 1,
  30. "name": "一个标签",
  31. "description": "标签描述,解释一下标签让人能更明白它的意思",
  32. "icon": "http://spring.io/img/homepage/icon-spring-boot.svg",
  33. "topicCount": 1,
  34. "inTime": 1548992281000
  35. }
  36. ],
  37. "inTime": 1548992281000,
  38. "view": 20,
  39. "modifyTime": 1548992296000,
  40. "top": false,
  41. "upIds": "2",
  42. "id": 1,
  43. "username": "tomoya"
  44. }
  45. ],
  46. "total": 1,
  47. "size": 20,
  48. "current": 1,
  49. "searchCount": true,
  50. "pages": 1
  51. }
  52. }
  53. }