-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.http
311 lines (237 loc) · 7.53 KB
/
test.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
### 获取登陆链接
GET http://127.0.0.1:30233/session
### 登陆
GET http://127.0.0.1:30233/session/violet?code=8f48c80107e95a232629c7301f3ac3300eb4220dbf7b38a373dfec4ffd07cee59a286576532e004ea20739b68a80cd8763bfa2111725728c879da6dadbadc5df6edc6ec47717a0edee13c2264e29160fe58b312dcb531c1d228f7cd6bcd3f824d8&state=9b3291d1427aa3d43a6738da6ed2e5c966d962f9d1b96002a2d2
### 获取登陆状态
GET http://127.0.0.1:30233/session/status
// https://coin.zhenly.cn/api/session/status
### 获取微信登陆二维码
GET http://127.0.0.1:30233/session/wechat
### 获取用户信息
GET http://127.0.0.1:30233/users/info/me
//GET https://coin.zhenly.cn/api/users/info/me
### 获取用户信息
GET http://127.0.0.1:30233/users/info/5d00d8d583977849d662489c
### 签到
POST http://127.0.0.1:30233/users/attend
### 修改资料
PUT http://127.0.0.1:30233/users/info
Content-Type: application/json
{
"nickname": "BBShow🐷"
}
### 修改用户类型
PUT http://127.0.0.1:30233/users/type
Content-Type: application/json
{
"id": "5cdbf6fe678405360d9fc162",
"type": "normal"
}
### 微信登陆
// POST http://127.0.0.1:30233/session/wechat
POST http://127.0.0.1:30233/session/wechat
Content-Type: application/json
{
"code": "023z8BGT1jFtF41UWQFT1I9wGT1z8BGI"
}
### 微信二维码
GET http://127.0.0.1:30233/session/wechat
### 用户认证
POST http://127.0.0.1:30233/certification
Content-Type: application/json
{
"identity": "student",
"data": "我是秀秀",
"type": "email",
"email": "[email protected]"
}
### 用户认证
GET http://127.0.0.1:30233/certification/auth?code=0182949eef78757e93c7bb2deea32b88613b12d0c0629ed5632915fc031816fbc436285da10a674eeaeb797e7c312fb46418d3030ce34676cf0855825d6f081e&user=5cf6588cf629d9be71a64875
### 新建任务
POST http://127.0.0.1:30233/tasks
Content-Type: application/json
{
"title": "问卷2",
"content": "到底什么时候睡觉啊",
"type": "questionnaire",
"reward": "object",
"reward_object": "觉",
"location": [
"床上"
],
"tags": [
"睡觉"
],
"start_date": 1579797713,
"end_date": 1579797724,
"max_player": 100,
"auto_accept": true,
"publish": false
}
### 获取任务列表
GET http://127.0.0.1:30233/tasks?page=1&size=5
// Get https://coin.zhenly.cn/api/tasks?page=1&size=10
### 获取单个任务详情
GET http://127.0.0.1:30233/tasks/5d0b6d6277b84a717c9f3854
### 修改任务信息
PUT http://127.0.0.1:30233/tasks/5d0b6d6277b84a717c9f3854
Content-Type: application/json
{
"status": "wait"
}
### 删除任务
DELETE http://127.0.0.1:30233/tasks/5cfbcb2836ef7fc31418d916
### 添加阅读量
POST http://127.0.0.1:30233/tasks/5cfba56596a3b91b06b6dc3e/view
### 任务点赞
POST http://127.0.0.1:30233/tasks/5cfba56596a3b91b06b6dc3e/like
### 取消点赞
DELETE http://127.0.0.1:30233/tasks/5cfba56596a3b91b06b6dc3e/like
### 获取评论列表
GET https://coin.zhenly.cn/api/comments/5d01295ccf5a6a31b607f88c
### 添加评论
POST http://127.0.0.1:30233/comments/5d01295ccf5a6a31b607f88c
Content-Type: application/json
{
"type": "task",
"content": "这是第二条评论哦🐷"
}
### 添加回复
POST http://127.0.0.1:30233/comments/5cfcac1d899659486b1ac02b
Content-Type: application/json
{
"type": "comment",
"content": "这是一个回复哦❤"
}
### 删除评论/回复
DELETE http://127.0.0.1:30233/comments/5cfcac1d899659486b1ac02b
### 点赞评论/回复
POST http://127.0.0.1:30233/comments/5cfcab061a9341e1cb5e1ca7/like
### 删除点赞评论/回复
DELETE http://127.0.0.1:30233/comments/5cfcab061a9341e1cb5e1ca7/like
### 搜索用户
GET http://127.0.0.1:30233/users?key=-.-
### 获取搜索记录
GET http://127.0.0.1:30233/users/history
### 删除搜索记录
DELETE http://127.0.0.1:30233/users/history
### 收藏任务
POST http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/collect
### 获取用户收藏
GET http://127.0.0.1:30233/users/collect/me
### 取消收藏
DELETE http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/collect
### 获取用户粉丝列表
GET http://127.0.0.1:30233/users/follower/me
### 获取用户关注列表
GET http://127.0.0.1:30233/users/following/me
### 关注用户
POST http://127.0.0.1:30233/users/following/5cfe5275c938ced30d43615d
### 取消关注用户
DELETE http://127.0.0.1:30233/users/following/5cfe5275c938ced30d43615d
### 获取用户会话列表
GET http://127.0.0.1:30233/messages
### 发送系统消息
POST http://127.0.0.1:30233/messages/system
Content-Type: application/json
{
"title": "Hello",
"content": "World"
}
### 获取会话信息
GET http://127.0.0.1:30233/messages/5d07c34f9b0958884bdde14b
### 获取会话信息
GET http://127.0.0.1:30233/messages/user/5d0f0b718194ce8e8c8b180e?page=2&size=2
### 将会话标记为已读
PUT http://127.0.0.1:30233/messages/5d07c2779b0958884bdde0a2
### 发送消息
POST http://127.0.0.1:30233/messages/5d0f0b718194ce8e8c8b180e
Content-Type: application/json
{
"content": "你讲咩啊"
}
### 获取用户参与人员列表
GET http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/player
### 领取任务
POST http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/player
### 改变任务状态
PUT http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/player/5d00d8d583977849d662489c
Content-Type: application/json
{
"note": "我要加入啊",
"score": 102
}
### 退出任务
DELETE http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/player/5d00d8d583977849d662489c
### 新建问卷
POST http://127.0.0.1:30233/questionnaires/5d106ef618633d579fd2eb8c
Content-Type: application/json
{
"title": "问卷标题",
"description": "问卷描述",
"anonymous": false
}
### 获取问卷信息
GET http://127.0.0.1:30233/questionnaires/5d106ef618633d579fd2eb8c
### 修改问卷信息
PUT http://127.0.0.1:30233/questionnaires/5d0b6d6277b84a717c9f3854
Content-Type: application/json
{
"title": "不是问卷标题",
"description": "不是问卷描述"
}
### 获取问卷问题
GET http://127.0.0.1:30233/questionnaires/5d10664b281e86f5226c5974/questions
### 修改问卷问题
POST http://127.0.0.1:30233/questionnaires/5d106ef618633d579fd2eb8c/questions
Content-Type: application/json
{
"problems":
[{
"index":1,
"content":"问题内容",
"note":"问题备注",
"type":"choose",
"choose_problem":{
"options":[
{"index":1,"content":"选项","image":""},
{"index":2,"content":"选项","image":""}],
"max_choose":1
}
},{
"index":3,
"content":"问题内容",
"note":"问题备注",
"type":"choose",
"choose_problem":{
"options":[
{"index":1,"content":"选项","image":""},
{"index":2,"content":"选项","image":""}],
"max_choose":1
}
},
{
"index":2,
"content":"问题内容",
"note":"问题备注",
"type":"choose",
"choose_problem":{
"options":[
{"index":1,"content":"选项","image":""},
{"index":2,"content":"选项","image":""}],
"max_choose":1
}
}]
}
### 获取问卷回答数据
GET http://127.0.0.1:30233/questionnaires/5d0b6d6277b84a717c9f3854/answers
### 添加问卷回答
POST http://127.0.0.1:30233/questionnaires/5d10664b281e86f5226c5974/answers
Content-Type: application/json
{
"data": [{"problem_index":0,"choose_value":[3]},{"problem_index":1,"choose_value":[0]},{"problem_index":2,"choose_value":[1]},{"problem_index":3,"string_value":"123"},{"problem_index":4,"score_value":3},{"problem_index":5,"choose_value":[1]},{"problem_index":6,"choose_value":[0]}]
}
### 获取活动二维码
GET http://127.0.0.1:30233/tasks/5d01295ccf5a6a31b607f88c/wechat
### 获取公告
GET http://127.0.0.1:30233/article