部分联系人和会话接口
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"account\": \"user1@example.com\",\n \"password\": \"12345678\",\n \"remember\": true\n}"
|
||||
"raw": "{\n \"account\": \"workerqi@163.com\",\n \"password\": \"12345678\",\n \"remember\": true\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/login",
|
||||
@@ -52,9 +52,13 @@
|
||||
"script": {
|
||||
"exec": [
|
||||
"if (pm.response.code === 200) {",
|
||||
" var jsonData = pm.response.json();",
|
||||
" pm.collectionVariables.set(\"token\", jsonData.token);",
|
||||
" pm.collectionVariables.set(\"user_id\", jsonData.user.id);",
|
||||
" const body = pm.response.json();",
|
||||
" if (body.code === 0 && body.result && body.result.token) {",
|
||||
" pm.environment.set(\"token\", body.result.token);",
|
||||
" if (body.result.user && body.result.user.id) {",
|
||||
" pm.environment.set(\"user_id\", body.result.user.id);",
|
||||
" }",
|
||||
" }",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
@@ -143,6 +147,103 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "会话管理",
|
||||
"item": [
|
||||
{
|
||||
"name": "获取会话列表",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{token}}"
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/conversations",
|
||||
"host": ["{{base_url}}"],
|
||||
"path": ["api", "conversations"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "重置会话未读数",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{token}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"target_id\": \"10002\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/conversations/reset-unread",
|
||||
"host": ["{{base_url}}"],
|
||||
"path": ["api", "conversations", "reset-unread"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "更新会话标记",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{token}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"target_id\": \"10002\",\n \"is_top\": true,\n \"is_muted\": false,\n \"is_special_care\": true\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/conversations/update",
|
||||
"host": ["{{base_url}}"],
|
||||
"path": ["api", "conversations", "update"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "删除会话",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{token}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"target_id\": \"10002\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/conversations/delete",
|
||||
"host": ["{{base_url}}"],
|
||||
"path": ["api", "conversations", "delete"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "用户管理",
|
||||
"item": [
|
||||
|
||||
Reference in New Issue
Block a user