Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxiuwen committed Dec 2, 2024
1 parent 3b7a044 commit f992dac
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ The request body is a JSON object, which contains the following fields:

| Field | Type | Description | Required |
| :-------- | :--------- | :------------------------------------------------ | :------- |
| `usernames` | An array of usernames | The usernames to be added to the block list, such as ["user1", "user2"]. You can pass in a maximum of 50 user IDs each time. | Yes |
| `usernames` | Array | The usernames to be added to the block list, such as ["user1", "user2"]. You can pass in a maximum of 50 user IDs each time. | Yes |

### HTTP response

Expand Down Expand Up @@ -443,7 +443,7 @@ For other parameters and detailed descriptions, see [Common parameters](#param).
| `pageSize` | Number | The number of users on the block list that you expect to retrieve on each page. The value range is [1,50]. | No |
| `cursor` | String | Where to start getting data. | No |

<div class="alert note">If neither `pageSize` nor `cursor` is specified, the server returns the block list of up to 500 users that are added most recently. If `pageSize` is specified and `cursor` is ignored, the server returns the block list of up to 50 users are added most recently.</div>
<div class="alert note">If neither `pageSize` nor `cursor` is specified, the server returns the block list of up to 500 users that are added most recently. If `pageSize` is specified and `cursor` is ignored, the server returns the block list of up to 50 users that are added most recently.</div>

#### Request header

Expand Down Expand Up @@ -483,6 +483,7 @@ curl -X GET -H 'Accept: application/json' -H 'Authorization: Bearer {YourAppToke
"uri": "http://XXXX/XXXX/XXXX/users/user1/blocks/users",
"timestamp": 1542599978751,
"entities": [],
"cursor": "MTA5OTAwMzMwNDUzNTA2ODY1NA==",
"count": 2,
"action": "get",
"data": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For each App Key, the call frequency limit of this method is 100 per second.
### HTTP request

```http
POST https://{host}/{orgName}/{appName}/mutes
POST https://{host}/{org_name}/{app_name}/mutes
```

#### Path parameter
Expand All @@ -74,6 +74,7 @@ For parameters and the detailed descriptions, see [Commom parameters](#param).
| Parameter | Type | Description |
| --- | --- | --- |
| `Content-Type` | String | The content type. Set is as `application/json`. |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or admin, in the format of `Bearer ${YourAppToken}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. |

### HTTP response
Expand All @@ -96,6 +97,7 @@ If the returned HTTP status code is not `200`, the request fails. You can refer
curl -L -X POST 'https://XXXX/XXXX/XXXX/mutes' \
-H 'Authorization: Bearer {YourAppToken}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"username": "XXXX",
"chat": 100,
Expand Down Expand Up @@ -147,7 +149,8 @@ For other parameters and the detailed descriptions, see [Commom parameters](#par
| Parameter | Type | Description |
| --- | --- | --- |
| `Content-Type` | String | The content type. Set is as `application/json`. |
| `Authorization` | String | The authentication token of the user or admin, in the format of `Bearer ${YourAppToken}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or administrator, in the format of `Bearer ${token}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes |

### HTTP response

Expand All @@ -158,7 +161,7 @@ If the returned HTTP status code is `200`, the request succeeds, and the respons
| `userid` | String | The user ID whose global-mute settings you want to query. |
| `chat` | Number | The remaining time that this user is muted in one-to-one chats, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining time that this user is muted in one-to-one chats.</li><li>0: This user is unmuted in one-to-one chats.</li><li>-1: This user is permanently muted in one-to-one chats.</li></ul> |
| `groupchat` | Number | The remaining time that this user is muted in group chats, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining time that this user is muted in group chats.</li><li>0: This user is unmuted in group chats.</li><li>-1: This user is permanently muted in group chats.</li></ul> |
| `chatroom` | Number | The remaining time that this user is muted in group rooms, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining time that this user is muted in chat rooms.</li><li>0: This user is unmuted in chat rooms.</li><li>-1: This user is permanently muted in chat rooms.</li></ul> |
| `chatroom` | Number | The remaining time that this user is muted in chat rooms, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining time that this user is muted in chat rooms.</li><li>0: This user is unmuted in chat rooms.</li><li>-1: This user is permanently muted in chat rooms.</li></ul> |
| `unixtime` | Number | The Unix timestamp of the current operation. |

For other fields and detailed descriptions, see [Common parameters](#param).
Expand All @@ -172,7 +175,8 @@ If the returned HTTP status code is not `200`, the request fails. You can refer
```shell
curl -L -X GET 'https://XXXX/XXXX/XXXX/mutes/{username}' \
-H 'Authorization: Bearer {YourAppToken}' \
-H 'Content-Type: application/json'
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
```

#### Response example
Expand Down Expand Up @@ -206,7 +210,7 @@ For each App Key, the call frequency limit of this method is 100 per second.
### HTTP request

```http
GET https://{host}/{orgName}/{appName}/mutes
GET https://{host}/{org_name}/{app_name}/mutes
```

#### Path parameter
Expand All @@ -218,13 +222,14 @@ For parameters and the detailed descriptions, see [Common parameters](#param).
| Parameter | Type | Description |
| --- | --- | --- |
| `Content-Type` | String | The content type. Set is as `application/json`. |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or admin, in the format of `Bearer ${YourAppToken}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. |

#### Query parameter

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `pageNum` | Number | No | The number of pages for querying the globally muted users in the app. |
| `pageNum` | Number | No | The number of page for querying the globally muted users in the app. |
| `pageSize` | Number | No | The number of data entries on each page. The value range is [1,50]. |

### HTTP response
Expand All @@ -236,7 +241,7 @@ If the returned HTTP status code is `200`, the request succeeds, and the respons
| `username` | String | The user ID whose global-mute settings you want to query. |
| `chat` | Number | The remaining time that this user is muted in one-to-one chats, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining time that this user is muted in one-to-one chats.</li><li>0: This user is unmuted in one-to-one chats.</li><li>-1: This user is permanently muted in one-to-one chats.</li></ul> |
| `groupchat` | Number | The remaining time that this user is muted in group chats, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining that this user in chat groups.</li><li>0: This user is unmuted in chat groups.</li><li>-1: This user is permanently muted in chat groups.</li></ul> |
| `chatroom` | Number | The remaining time that this user is muted in group rooms, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining duration for muting this user in chat rooms.</li><li>0: This user is unmuted in chat rooms.</li><li>-1: This user is permanently muted in chat rooms.</li></ul> |
| `chatroom` | Number | The remaining time that this user is muted in chat rooms, in seconds. The maximum value is 2,147,483,647.<ul><li>&gt; 0: The remaining duration for muting this user in chat rooms.</li><li>0: This user is unmuted in chat rooms.</li><li>-1: This user is permanently muted in chat rooms.</li></ul> |
| `unixtime` | Number | The Unix timestamp of the current operation. |

For other fields and detailed descriptions, see [Common parameters](#param).
Expand All @@ -250,7 +255,8 @@ If the returned HTTP status code is not `200`, the request fails. You can refer
```shell
curl -L -X GET 'https://XXXX/XXXX/XXXX/mutes?pageNum=1&pageSize=10' \
-H 'Authorization: Bearer {YourAppToken}' \
-H 'Content-Type: application/json'
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
```

#### Response example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The request body is a JSON object, which contains the following parameters:
| Parameter | Type | Description | Required |
| --- | --- | --- | --- |
| `from` | String | The username of the message sender. If you do not set this field, the Chat server takes the `admin` as the sender. If you set it as the empty string "", this request fails. | No |
| `to` | Array | An array of the usernames of the message recipient. For each request, you can send a message to a maximum of 600 users. Within one minute, you can send messages to a maximum of 6,000 users. | Yes |
| `to` | Array | An array of the usernames of the message recipient. For each request, you can send a message to a maximum of 600 users. Within one minute, you can send 6,000 messages. | Yes |
| `type` | String | The message type: <ul><li>`txt`: Text message</li><li>`img`: Image message</li><li>`audio`: Audio message</li><li>`video`: Video message</li><li>`file`: File message</li><li>`loc`: Location message</li><li>`cmd`: Command message</li><li>`custom`: Custom message</li></ul> | Yes |
| `body` | JSON | The message content. For different message types, this parameter contains different fields. For details, see [Body of different message types](#body). | Yes |
| `roam_ignore_users` | List | No | Which users cannot obtain such message when they pull messages from the server. A maximum of 20 users can be passed in each time. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ For the descriptions of the other path parameters, see [Common Parameters](#para
| Parameter | Type | Description | Required |
|:---------------| :------ | :------- |:------------------|
| `Content-Type` | String | The content type. Set it to `application/json`. | Yes |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or administrator, in the format of `Bearer ${token}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes |

#### Request body
Expand All @@ -79,10 +80,11 @@ If the returned HTTP status code is not `200`, the request fails. You can refer

#### Request example

```json
```shell
curl -X POST 'http://XXXX/XXXX/XXXX/users/c1/presence/android_123423453246/0' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"ext":"123"}'
```

Expand Down Expand Up @@ -118,6 +120,7 @@ For the descriptions of the other path parameters, see [Common Parameters](#para
| Parameter | Type | Description | Required |
|:---------------| :------ | :------- |:------------------|
| `Content-Type` | String | The content type. Set it to `application/json`. | Yes |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or administrator, in the format of `Bearer ${token}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes |

#### Request body
Expand All @@ -136,7 +139,7 @@ If the returned HTTP status code is `200`, the request succeeds, and the data fi
| :------- |:-------------|:-------------|
| `result` | JSON | Whether the subscription succeeds. If successful, the presence statuses of the users return; otherwise, you can troubleshoot according to the returned reasons. |
| `uid` | String | The unique login account of the user. |
| `last_time` | Number | The Unix timestamp when the user was last online, in seconds. |
| `last_time` | Number | The Unix timestamp when the user was last online, in seconds. The server records the time when the subscribed user logs in or out. |
| `expiry` | Number | The Unix timestamp when the subscription expires, in seconds. |
| `ext` | String | The extension information of the presence status. |
| `status` | JSON | The presence statuses on multiple devices of the user.<ul><li>`0`: Offline.</li><li>`1`: Online.</li><li>Other strings: User-defined custom presence status.</li></ul> |
Expand All @@ -147,10 +150,11 @@ If the returned HTTP status code is not `200`, the request fails. You can refer

#### Request example

```json
```shell
curl -X POST 'http://XXXX/XXXX/XXXX/users/wzy/presence/1000' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"usernames":["c2","c3"]}'
```

Expand Down Expand Up @@ -188,6 +192,7 @@ For other parameters and descriptions, see [Common Parameters](#param).
| Parameter | Type | Description | Required |
|:---------------| :------ | :------- |:------------------|
| `Content-Type` | String | The content type. Set it to `application/json`. | Yes |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or administrator, in the format of `Bearer ${token}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes |

#### Request body
Expand Down Expand Up @@ -216,10 +221,11 @@ If the returned HTTP status code is not `200`, the request fails. You can refer

#### Request example

```json
```shell
curl -X POST 'http://XXXX/XXXX/XXXX/users/wzy/presence' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"usernames":["c2","c3"]}'
```

Expand Down Expand Up @@ -268,6 +274,7 @@ For other parameters and descriptions, see [Common Parameters](#param).
| Parameter | Type | Description | Required |
|:---------------| :------ | :------- |:------------------|
| `Content-Type` | String | The content type. Set it to `application/json`. | Yes |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or administrator, in the format of `Bearer ${token}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes |

#### Request body
Expand All @@ -292,10 +299,11 @@ If the returned HTTP status code is not `200`, the request fails. You can refer

#### Request example

```json
```shell
curl -X DELETE 'http://XXXX/XXXX/XXXX/users/wzy/presence' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '["c1"]'
```

Expand All @@ -314,14 +322,14 @@ For each App Key, the call frequency limit of this method is 50 per second.
### HTTP request

```http
GET https://{host}/{org_name}/{app_name}/users/{uid}/presence/sublist?pageNum=1&pageSize=100
GET https://{host}/{org_name}/{app_name}/users/{uid}/presence/sublist?pageNum={pagenumber}&pageSize={pagesize}
```

#### Path parameter

| Parameter | Type | Description | Required |
|:---------------| :------ | :------- |:------------------|
| `uid` | String | The user for which the subscriptions are retrieved. | Yes |
| `uid` | String | The user for which the subscriptions are retrieved. If the user ID you passed in does not exist or the user does not subscribe to the presence status of any users, an empty list is returned. | Yes |

For other parameters and descriptions, see [Common Parameters](#param).

Expand All @@ -337,6 +345,7 @@ For other parameters and descriptions, see [Common Parameters](#param).
| Parameter | Type | Description | Required |
|:---------------| :------ | :------- |:------------------|
| `Content-Type` | String | The content type. Set it to `application/json`. | Yes |
| `Accept` | String | The parameter type. Set it as `application/json`. | Yes |
| `Authorization` | String | The authentication token of the user or administrator, in the format of `Bearer ${token}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes |

### HTTP response
Expand All @@ -359,10 +368,11 @@ If the returned HTTP status code is not `200`, the request fails. You can refer

#### Request example

```json
```shell
curl -X GET 'http://XXXX/XXXX/XXXX/users/wzy/presence/sublist?pageNum=1&pageSize=100' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json'
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
```

#### Response example
Expand Down
Loading

0 comments on commit f992dac

Please sign in to comment.