XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/bilibili-API-collect

feat:新增"回复我的"接口 /x/msgfeed/reply (#1309)

* feat:新增"回复我的"接口 /x/msgfeed/reply * fix: 增加示例,修改格式 * fix: 修复格式 * fix: 使用真实返回示例,不脱敏

5149af0
m1saka <admin@misaka.ren>
提交于

代码差异

1 个文件 +174 -0
Modified docs/message/msg.md +174 -0
@@ -82,3 +82,177 @@ curl 'https://api.vc.bilibili.com/x/im/web/msgfeed/unread' \
82 82 ```
83 83
84 84 </details>
85
86
87 ## 获取"回复我的"信息
88
89 > <https://api.bilibili.com/x/msgfeed/reply>
90
91 *请求方式:GET*
92
93 认证方式:Cookie(SESSDATA)
94
95 **URL参数:**
96
97 | 参数名 | 类型 | 内容 | 必要性 | 备注 |
98 | ------------ | ---- | ---------------- | ------ | ------------- |
99 | build | num | 客户端内部版本号 | 非必要 | 默认为 `0` |
100 | mobi_app | str | 平台标识 | 非必要 | 可为 `web` 等 |
101 | id | num | 起始 id | 非必要 | 详情见返回 |
102 | reply_time | num | 起始时间 | 非必要 | 详情见返回 |
103 | platform | str | 平台标识 | 非必要 | 可为 `web` 等 |
104 | web_location | str | 暂时不知道是啥 | 非必要 | |
105
106 **json回复:**
107
108 根对象:
109
110 | 字段 | 类型 | 内容 | 备注 |
111 | ------- | ---- | -------- | ----------------------------- |
112 | code | num | 返回值 | 0:成功<br />-101:账号未登录 |
113 | message | str | 错误信息 | 默认为 0 |
114 | ttl | num | 1 | |
115 | data | obj | 信息本体 | |
116
117 `data` 对象:
118
119 | 字段 | 类型 | 内容 | 备注 |
120 | ------------ | ----- | ----------- | ------------------------------ |
121 | cursor | obj | 光标 | 下一次查询的指针 |
122 | items | array | 通知列表 | 数组,每个元素代表一条回复通知 |
123 | last_view_at | num | unix 时间戳 | 上次查看的时间 |
124
125 `cursor` 对象:
126
127 | 字段 | 类型 | 内容 | 备注 |
128 | ------ | ---- | ----------- | ---------------------------------------------- |
129 | is_end | bool | 是否结束 | `false` 表示还有更多数据 |
130 | id | num | 通知 id | 最后(旧)一条通知的 id,用作下次查询的起始 id |
131 | time | num | unix 时间戳 | 最后一条通知的时间 |
132
133 `items` 数组中的对象(每条通知):
134
135 | 字段 | 类型 | 内容 | 备注 |
136 | ---------- | ---- | -------------------- | ---------------------------- |
137 | id | num | 通知 id | |
138 | user | obj | **回复者**的用户信息 | |
139 | item | obj | 通知详情 | |
140 | counts | num | 通知计数 | 固定为 `1`,可能表示单条通知 |
141 | is_multi | num | 是否多回复 | 固定为 `0`,可能表示单条回复 |
142 | reply_time | num | unix 时间戳 | 回复时间 |
143
144 `user` 对象(回复者信息):
145
146 | 字段 | 类型 | 内容 | 备注 |
147 | -------- | ---- | -------------- | ------------------------------ |
148 | mid | num | 用户 mid | |
149 | fans | num | 粉丝数 | 固定为 `0`,可能不返回实际数据 |
150 | nickname | str | 用户昵称 | |
151 | avatar | str | 头像 URL | |
152 | mid_link | str | 用户主页链接 | 固定为空字符串 |
153 | follow | bool | 是否关注该用户 | `false` 表示未关注 |
154
155 `item` 对象(通知详情):
156
157 | 字段 | 类型 | 内容 | 备注 |
158 | -------------------- | ----- | ---------------- | ----------------------------- |
159 | subject_id | num | 主体 id | |
160 | root_id | num | 根评论 id | 最顶层的评论 ID |
161 | source_id | num | 源评论 id | 直接回复的评论 ID |
162 | target_id | num | 目标评论 id | 被回复的评论 ID |
163 | type | str | 通知类型 | 固定为 `"reply"`(回复类型) |
164 | business_id | num | 业务类型 id | `1`=视频评论,`11`=动态评论 |
165 | business | str | 业务名称 | `"评论"` 或 `"视频"` |
166 | title | str | 通知标题 | 摘要文本 |
167 | desc | str | 描述 | 固定为空字符串 |
168 | image | str | 图片 URL | 固定为空字符串 |
169 | uri | str | 跳转链接 | web 端跳转链接 |
170 | native_uri | str | 客户端跳转链接 | 客户端专用跳转链接 |
171 | detail_title | str | 详细标题 | 固定为空字符串 |
172 | root_reply_content | str | 根评论内容 | 最顶层评论的文本内容 |
173 | source_content | str | 源评论内容 | 直接回复的评论内容 |
174 | target_reply_content | str | 目标评论内容 | 被回复的评论内容 |
175 | at_details | array | @的用户列表 | 数组,每个元素是被@的用户对象 |
176 | topic_details | array | 话题详情 | 固定为空数组 |
177 | hide_reply_button | bool | 是否隐藏回复按钮 | |
178 | hide_like_button | bool | 是否隐藏点赞按钮 | |
179 | like_state | num | 点赞状态 | `0`=未点赞 |
180 | danmu | null | 弹幕信息 | 固定为 `null` |
181 | message | str | 消息内容 | 固定为空字符串 |
182
183 `at_details` 数组中的对象(被@的用户):
184
185 | 字段 | 类型 | 内容 | 备注 |
186 | -------- | ---- | -------------- | ------------------ |
187 | mid | num | 用户 mid | |
188 | fans | num | 粉丝数 | 固定为 `0` |
189 | nickname | str | 用户昵称 | |
190 | avatar | str | 头像 URL | |
191 | mid_link | str | 用户主页链接 | 固定为空字符串 |
192 | follow | bool | 是否关注该用户 | `false` 表示未关注 |
193
194 **示例:**
195
196 ```shell
197 curl 'https://api.bilibili.com/x/msgfeed/reply' \
198 -b 'SESSDATA=xxx'
199 ```
200
201 <details>
202 <summary>查看响应示例:</summary>
203
204 ```json
205 {
206 "code": 0,
207 "message": "0",
208 "data": {
209 "cursor": {
210 "is_end": true,
211 "id": 823260581625886,
212 "time": 1749474709
213 },
214 "items": [{
215 "id": 823260581625886,
216 "user": {
217 "mid": 3546910497441845,
218 "fans": 0,
219 "nickname": "佘总累了",
220 "avatar": "https://i2.hdslb.com/bfs/face/e45c62bd47729e07dd01a788988be865ed3d210e.jpg",
221 "mid_link": "",
222 "follow": false
223 },
224 "item": {
225 "subject_id": 1073543151725051921,
226 "root_id": 0,
227 "source_id": 265141324256,
228 "target_id": 0,
229 "type": "dynamic",
230 "business_id": 17,
231 "business": "动态",
232 "title": "我已成为哔哩哔哩第245743680位转正会员,挑战转正答题考试获得60分。",
233 "desc": "",
234 "image": "",
235 "uri": "https://www.bilibili.com/opus/1073543151725051921#reply265141324256",
236 "native_uri": "bilibili://opus/detail/1073543151725051921?comment_root_id=265141324256&comment_on=1",
237 "detail_title": "",
238 "root_reply_content": "",
239 "source_content": "60",
240 "target_reply_content": "",
241 "at_details": [],
242 "topic_details": [],
243 "hide_reply_button": false,
244 "hide_like_button": false,
245 "like_state": 0,
246 "danmu": null,
247 "message": ""
248 },
249 "counts": 1,
250 "is_multi": 0,
251 "reply_time": 1749474709
252 }],
253 "last_view_at": 1749474724
254 }
255 }
256 ```
257
258 </details>