Skip to content

Commit c1fc7a1

Browse files
committedSep 13, 2022
add: 添加api(forum/search_post)
fix: 修复api(forum/search_post)中更新时间错误的问题
1 parent 77bb640 commit c1fc7a1

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
 

‎_sidebar.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- [所有板块信息](/forum/boards)
3535
- [板块信息](/forum/board)
3636
- [公告栏](/forum/notice_boards)
37+
- [搜索帖子](/forum/search_post)
3738
- [发布帖子](/forum/publish_post)
3839
- [删除帖子](/forum/delete_post)
3940
- [举报帖子](/forum/report_post)

‎forum/search_post.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# 搜索帖子
2+
3+
> 通过标题搜索帖子
4+
> `/web/forums/posts/search` `GET`
5+
6+
## URL 参数
7+
8+
| key | value | type | |
9+
| :---: | :------------------: | :----: | :----: |
10+
| title | 帖子标题 | string | `必须` |
11+
| page | 页码 | int | `可选` |
12+
| limit | 每一页的数量`[5,30]` | int | `可选` |
13+
14+
## 返回内容
15+
16+
| key | value | type |
17+
| :-----: | :----------------------------------------------: | :--: |
18+
| items | 由多个 JSON 构成的帖子列表([查看详情](#items)| list |
19+
| offset | `未知` | int |
20+
| limit | 每一页的数量 | int |
21+
| total | 查询到的帖子总数 | int |
22+
| counted | `未知` | bool |
23+
24+
### items
25+
26+
| key | value | type |
27+
| :-----------: | :----------------------------------------------------: | :----: |
28+
| id | 帖子 ID | string |
29+
| user | 帖子发布者([查看详情](#user)| JSON |
30+
| title | 帖子标题 | string |
31+
| content | 帖子内容 | string |
32+
| n_replies | 回帖数量 | int |
33+
| is_authorized | 是否为官方贴 | bool |
34+
| is_featured | 是否为精选贴 | bool |
35+
| is_hotted | 是否为热门贴 | bool |
36+
| is_pinned | 是否为置顶帖 | bool |
37+
| tutorial_flag | 是否为教程帖 | int |
38+
| ask_help_flag | 是否为求助帖 | int |
39+
| created_at | 发布时间戳 | int |
40+
| n_comments | (每个回帖下的)评论数量 | int |
41+
| reply_user | 最新回帖的发表者([查看详情](#reply_or_comment_user)| JSON |
42+
| replied_at | 最新回帖时间戳(若无回帖,则为 0) | int |
43+
| comment_user | 最新回复的发表者([查看详情](#reply_or_comment_user)| JSON |
44+
| commented_at | 最新回复时间戳(若无回复,则为 created_at) | int |
45+
46+
#### user
47+
48+
| key | value | type |
49+
| :-------------: | :------------------------------------------------------------------------------------------: | :------: |
50+
| id | ID | string |
51+
| nickname | 昵称 | string |
52+
| avatar_url | 头像链接 | string |
53+
| subject_id | 用户工作室 ID | int |
54+
| work_shop_name | 用户工作室名 | string |
55+
| work_shop_level | 用户工作室等级 | int |
56+
| ~~wuhan_medal~~ | ~~是否参加武汉爆发疫情时期的[“编程猫健康护航计划”活动](https://shequ.codemao.cn/studio/11)~~ | ~~bool~~ |
57+
| has_signed | `未知` | bool |
58+
59+
#### reply_or_comment_user
60+
61+
[user](#user) 一致,但部分信息有时存在,有时不存在。
62+
63+
> 更新于 2022.09.13

0 commit comments

Comments
 (0)