Skip to content

Commit 643c20d

Browse files
committed
Batch update
1 parent 381596d commit 643c20d

12 files changed

Lines changed: 1317 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
11
# 釘選訊息
2+
3+
# Pin message
4+
5+
Pin message at top of a room
6+
7+
Note: restrict to room owner or managers.
8+
9+
10+
### path
11+
12+
/messages/{id}/pin
13+
14+
### Method
15+
16+
POST
17+
18+
19+
### Post Body
20+
21+
| Field | Type | Description |
22+
| ----- | ------ | ----------- |
23+
| id | String | Message ID |
24+
25+
26+
27+
### Response Result
28+
29+
Pined message
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,82 @@
11
# 撤回訊息
2+
3+
### path
4+
5+
/rooms/:roomId/message
6+
7+
| Field | Description |
8+
| ------ | ----------- |
9+
| roomId | Room ID |
10+
11+
### Method
12+
13+
POST
14+
15+
### Headers:
16+
17+
#### For client
18+
19+
| Field | Description |
20+
| ------------- | ------------ |
21+
| IM-CLIENT-KEY | Client Key |
22+
| Authorization | Client Token |
23+
24+
#### For Platform API
25+
26+
| Field | Description |
27+
| ---------- | ---------------- |
28+
| IM-API-KEY | Platform API Key |
29+
30+
### Post Body
31+
32+
#### Message
33+
34+
| Field | Type | Description |
35+
| ----------- | ------ | ------------------- |
36+
| messageType | String | (required) 'recall' |
37+
| \_id | String | (required) |
38+
39+
```
40+
## Recall Message
41+
curl -X "POST" "http://localhost:3100/rooms/demo-room/message" \
42+
-H 'IM-CLIENT-KEY: {IM-CLIENT-KEY}' \
43+
-H 'Authorization: {TOKEN}' \
44+
-H 'Content-Type: application/json; charset=utf-8' \
45+
-d $'{
46+
"_id": "5ce3d80bd594874e495895a4",
47+
"messageType": "recall"
48+
}'
49+
50+
```
51+
52+
### Response Result
53+
54+
Sent message data
55+
56+
```json
57+
{
58+
"RC": 0,
59+
"RM": "OK",
60+
"result": {
61+
"_id": "5ce3d80bd594874e495895a4",
62+
"message": "",
63+
"room": "demo-room",
64+
"sender": {
65+
"_id": "sss",
66+
"nickname": "Nita",
67+
"avatarUrl": "http://loremflickr.com/240/240/style?1558435839",
68+
"description": "description la la #1551163111743",
69+
"isRobot": false,
70+
"id": "sss",
71+
"lastLoginTimeMS": 1553145898032
72+
},
73+
"messageType": "recall",
74+
"appID": "SampleApp",
75+
"__v": 0,
76+
"id": "5ce3d80bd594874e495895a4",
77+
"messageTimeMS": 1558435851576,
78+
"updatedAtMS": 1558435921086,
79+
"createdAtMS": 1558435851580
80+
}
81+
}
82+
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
11
# 取消釘選訊息
2+
3+
4+
5+
Unpin message from top of a room
6+
7+
Note: restrict to room owner or managers.
8+
9+
10+
### path
11+
12+
/messages/{id}/pin
13+
14+
### Method
15+
16+
DELETE
17+
18+
19+
### Post Body
20+
21+
| Field | Type | Description |
22+
| ----- | ------ | ----------- |
23+
| id | String | Message ID |
24+
25+
26+
27+
### Response Result
28+
29+
Unpined message

0 commit comments

Comments
 (0)