用户 关注问题

优质
小牛编辑
130浏览
2023-12-01

获取关注的问题列表

GET /api/v2/user/question-watches

参数

参数类型描述
limitInteger默认 20 ,获取列表条数,修正值 1 - 30
offsetinteger默认 0 ,数据偏移量,传递之前通过接口获取的总数。

响应

Status: 200 OK
[
  {
    "id": 1,
    "user_id": 1,
    "subject": "第一个提问?",
    "body": null,
    "anonymity": 0,
    "amount": 0,
    "automaticity": 1,
    "look": 1,
    "excellent": 0,
    "status": 0,
    "comments_count": 0,
    "answers_count": 3,
    "watchers_count": 0,
    "likes_count": 0,
    "view_count": 0,
    "created_at": "2017-07-28 08:38:54",
    "updated_at": "2017-08-01 06:03:21",
    "user": {
      "id": 1,
      "name": "Seven",
      "bio": "Seven 的个人传记",
      "sex": 2,
      "location": "成都 中国",
      "created_at": "2017-06-02 08:43:54",
      "updated_at": "2017-07-25 03:59:39",
      "avatar": "http://plus.io/api/v2/users/1/avatar",
      "bg": "https://www.xnip.cn/wp-content/uploads/2021/docimg15/36-tldrkfjhpuw.png",
      "verified": null,
      "extra": {
        "user_id": 1,
        "likes_count": 0,
        "comments_count": 8,
        "followers_count": 0,
        "followings_count": 1,
        "updated_at": "2017-08-01 06:06:37",
        "feeds_count": 0,
        "questions_count": 5,
        "answers_count": 3
      }
    }
  }
]

数据结构参考「问题」文档。

关注一个问题

PUT /api/v2/user/question-watches/:question

响应

Status: 204 No Content

取消关注一个问题

DELETE /api/v2/user/question-watches/:question

响应

Status: 204 No Content