Skip to content

Commit 207ddc1

Browse files
committed
Update: /v1/sticker
1 parent 35083eb commit 207ddc1

3 files changed

Lines changed: 178 additions & 38 deletions

File tree

src/api/v1/expression.md

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,20 @@ POST /v1/expression/list
1818
响应体:
1919
```JSONC
2020
{
21-
"code": 1, // 请求状态码,1为正常
21+
"code": 1,
2222
"data": {
2323
"expression": [
2424
{
2525
"id": 114514,
26-
"url": "expression/...", // 需要在前面加上 https://chat-img.jwznb.com/
27-
"urlOriginal": "https://...", // 来源URL
28-
"delFlag": 0, // 未知
26+
"url": "expression/abcdef123456789abcdef123456789ab.jpg", // 需要前面加上 https://chat-img.jwznb.com/
27+
"urlOriginal": "https://chat-img.jwznb.com/123456789abcdefabcf43bce54e4e242.jpg", // 来源URL
28+
"delFlag": 0,
2929
"createTime": 114514, // 创建时间戳
30-
"createBy": "123" // 创建者ID
30+
"createBy": "7356666" // 创建者ID
3131
}
32-
// ...
3332
]
3433
},
35-
"msg": "success" // 返回消息
34+
"msg": "success"
3635
}
3736
```
3837

@@ -48,16 +47,13 @@ POST /v1/expression/create
4847
请求体:
4948
```JSONC
5049
{
51-
"url": "https://..." // 图片URL
50+
"url": "https://chat-img.jwznb.com/......" // 图片URL
5251
}
5352
```
5453

5554
响应体:
5655
```JSONC
57-
{
58-
"code":1, // 请求状态码,1为正常
59-
"msg":"success" // 返回消息
60-
}
56+
{"code":1,"msg":"success"}
6157
```
6258

6359
## 删除个人表情收藏中的表情
@@ -72,17 +68,12 @@ POST /v1/expression/delete
7268

7369
请求体:
7470
```JSONC
75-
{
76-
"id": 114514 // 表情ID
77-
}
71+
{"id": 114514} // 要删除的表情ID
7872
```
7973

8074
响应体:
8175
```JSONC
82-
{
83-
"code":1 ,// 请求状态码,1为正常
84-
"msg":"success" // 返回消息
85-
}
76+
{"code":1,"msg":"success"}
8677
```
8778

8879
## 置顶个人表情收藏中的表情
@@ -97,15 +88,10 @@ POST /v1/expression/topping
9788

9889
请求体:
9990
```JSONC
100-
{
101-
"id": 114514 // 表情包ID
102-
}
91+
{"id": 114514} // 要置顶的表情ID
10392
```
10493

10594
响应体:
10695
```JSONC
107-
{
108-
"code":1, // 请求状态码,1为正常
109-
"msg":"success" // 返回消息
110-
}
111-
```
96+
{"code":1,"msg":"success"}
97+
```

src/api/v1/misc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: misc
77

88
## 获取个人表情收藏
99

10-
get /v1/misc/configure-distribution
10+
GET /v1/misc/configure-distribution
1111

1212
请求头:
1313

src/api/v1/sticker.md

Lines changed: 164 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ title: sticker
77

88
## 获取收藏表情包
99

10+
POST /v1/sticker/list
11+
1012
请求头:
1113

1214
|名称|必须|备注|
@@ -22,22 +24,22 @@ title: sticker
2224
{
2325
"id": 114514,
2426
"name": "表情包名称",
25-
"createBy": "创建者ID",
26-
"createTime": 创建时间戳,
27-
"delFlag": 0,
28-
"userCount": 使用人数(数值),
29-
"hot": 0,
30-
"uuid": "dddddddd-dddd-2333-1145-ddddddabcdef",
31-
"updateTime": 更新时间戳,
27+
"createBy": "7356666", // 创建者ID
28+
"createTime": 114514, // 创建时间戳
29+
"delFlag": 0, // 是否被删除
30+
"userCount": 2, // 使用人数
31+
"hot": 0, // 表情包热度,不知道为啥全0
32+
"uuid": "dddddddd-dddd-2333-1145-ddddddabcdef", // UUID
33+
"updateTime": 2333, // 更新时间戳
3234
"sort": 0, // 分类?我这边都是0
3335
"stickerItems": [
3436
{
3537
"id": 114514,
3638
"name": "表情名称",
37-
"url": "sticker/114514abcdd444456aaaaaaaaee0d454.jpg",
39+
"url": "sticker/114514abcdd444456aaaaaaaaee0d454.jpg", // 表情包URL,需要前面加上 https://chat-img.jwznb.com/
3840
"stickerPackId": 114514, // 所属表情包ID
39-
"createBy": "创建者ID",
40-
"createTime": 创建时间戳,
41+
"createBy": "7356666", // 创建者ID
42+
"createTime": 2333, // 更新时间戳
4143
"delFlag": 0
4244
}
4345
]
@@ -47,3 +49,155 @@ title: sticker
4749
"msg": "success"
4850
}
4951
```
52+
53+
## 查看表情包详情
54+
55+
POST /v1/sticker/detail
56+
57+
请求头:
58+
59+
|名称|必须|备注|
60+
|-----|-----|-----|
61+
|token|||
62+
63+
请求体:
64+
```JSON
65+
{
66+
"id": 894 // 表情包ID
67+
}
68+
```
69+
70+
响应体:
71+
```JSON
72+
{
73+
"code": 1,
74+
"data": {
75+
"stickerPack": {
76+
"id": 894, // 表情包ID
77+
"name": "图标梗", // 表情包名称
78+
"createBy": "9120256", // 创建者
79+
"createTime": 1730724963, // 创建时间(时间戳)
80+
"delFlag": 0,
81+
"userCount": 8, // 用户人数
82+
"hot": 0, // 热度? 我这边抓到的都是0
83+
"uuid": "216d7881-64ae-4409-aa0a-4f4d1a8f649d", // uuid
84+
"updateTime": 1754363209, // 更新时间
85+
"sort": 0, // 分类相关?
86+
"stickerItems": [
87+
{
88+
"id": 18951, // 表情ID
89+
"name": "汇总部分", // 表情名称
90+
"url": "sticker/4599f91519364bcc2be6718c3915d388.jpg", // 表情URL,前面需加上 https://chat-img.jwznb.com/
91+
"stickerPackId": 894, // 所属表情包ID
92+
"createBy": "9120256", // 创建者ID
93+
"createTime": 1730724991, // 创建时间
94+
"delFlag": 0
95+
},
96+
// ...
97+
]
98+
},
99+
"user": {
100+
"id": 56922, // 似乎是名称ID?
101+
"user_id": "9120256", // 创建者用户ID
102+
"nickname": "千米", // 创建者用户名
103+
"avatar_url": "https://uapis.cn/api/imgapi/bq/youshou.php" // 头像地址
104+
}
105+
},
106+
"msg": "success"
107+
}
108+
```
109+
110+
## 添加表情包
111+
112+
POST /v1/sticker/add
113+
114+
请求头:
115+
116+
|名称|必须|备注|
117+
|-----|-----|-----|
118+
|token|||
119+
120+
请求体:
121+
```JSON
122+
{
123+
"id": 894 // 表情包ID
124+
}
125+
```
126+
127+
响应体:
128+
```JSON
129+
{"code": 1,"msg": "success"}
130+
```
131+
132+
## 移除收藏表情包
133+
134+
POST /v1/sticker/remove-sticker-pack
135+
136+
请求头:
137+
138+
|名称|必须|备注|
139+
|-----|-----|-----|
140+
|token|||
141+
142+
请求体:
143+
```JSON
144+
{
145+
"id": 52 // 要移除的表情包的ID
146+
}
147+
```
148+
149+
响应体:
150+
```JSON
151+
{"code":1,"msg":"success"}
152+
```
153+
154+
## 更改收藏表情包的排序
155+
156+
POST /v1/sticker/sort
157+
158+
请求头:
159+
160+
|名称|必须|备注|
161+
|-----|-----|-----|
162+
|token|||
163+
164+
请求体:
165+
```JSON
166+
{
167+
"sort": "[
168+
{
169+
\"id\":\"123\", // 表情包ID
170+
\"sort\":\"2\" // 排序,数字越大越靠前
171+
},
172+
{
173+
\"id\":\"456\",
174+
\"sort\":\"1\"
175+
},
176+
// ...
177+
]"
178+
}
179+
```
180+
181+
云湖的抽象玩意.
182+
把数列转字符串发.
183+
184+
::: details 备注: 使用Python请求代码
185+
```Python
186+
headers = {"token": token}
187+
sticker = [
188+
{
189+
"id": "1","sort": "1", # 不知道为啥id前面是数值这里为啥变成了字符串,sort越大排序越靠前
190+
},
191+
{
192+
"id": "2","sort": "2"
193+
}
194+
]
195+
payload = {"sort": str(sticker)}
196+
response = httpx.post("https://chat-go.jwzhd.com/v1/sticker/sort", headers = headers, json = payload)
197+
print(response.text)
198+
```
199+
:::
200+
响应体:
201+
```JSON
202+
{"code":1,"msg":"success"}
203+
```

0 commit comments

Comments
 (0)