Skip to content

Commit

Permalink
Merge pull request #477 from haoxiuwen/doc-v2
Browse files Browse the repository at this point in the history
Modify Instant Push Docs
  • Loading branch information
haoxiuwen authored Oct 24, 2023
2 parents 5bcf99f + 2ea08cd commit c8e42aa
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 24 deletions.
24 changes: 16 additions & 8 deletions docs/push/push_by_tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ POST https://{host}/{org_name}/{app_name}/push/label
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X POST 'localhost/hx/hxdemo/push/label' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-d '{
"name":"post-90s",
Expand Down Expand Up @@ -152,8 +153,9 @@ GET https://{host}/{org_name}/{app_name}/push/label/{labelname}
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X GET 'localhost/hx/hxdemo/push/label/90' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A'
-H 'Authorization: Bearer <YourAppToken>'
```

#### 响应示例
Expand Down Expand Up @@ -221,8 +223,9 @@ GET https://{host}/{org_name}/{app_name}/push/label
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X GET 'localhost/hx/hxdemo/push/label' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A'
-H 'Authorization: Bearer <YourAppToken>'
```

### 响应示例
Expand Down Expand Up @@ -291,8 +294,9 @@ DELETE https://{host}/{org_name}/{app_name}/push/label/{labelname}
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X DELETE 'localhost/hx/hxdemo/push/label/post-90s' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A'
-H 'Authorization: Bearer <YourAppToken>'
```

#### 响应示例
Expand Down Expand Up @@ -357,8 +361,9 @@ POST https://{host}/{org_name}/{app_name}/push/label/{labelname}/user
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X POST 'localhost/hx/hxdemo/push/label/post-90s/user' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-d '{
"usernames":["hx1","hx2"]
Expand Down Expand Up @@ -428,8 +433,9 @@ GET https://{host}/{org_name}/{app_name}/push/label/{labelname}/user/{username}
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X GET 'localhost/hx/hxdemo/push/label/post-90s/user/hx1' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A'
-H 'Authorization: Bearer <YourAppToken>'
```

#### 响应示例
Expand Down Expand Up @@ -499,8 +505,9 @@ GET https://{host}/{org_name}/{app_name}/push/label/{labelname}/user
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X GET 'localhost/hx/hxdemo/push/label/post-90s/user?limit=1' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A'
-H 'Authorization: Bearer <YourAppToken>'
```

#### 响应示例
Expand Down Expand Up @@ -571,8 +578,9 @@ DELETE https://{host}/{org_name}/{app_name}/push/label/{labelname}/user
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X DELETE 'localhost/hx/hxdemo/push/label/post-90s/user' \
-H 'Authorization: Bearer YWMt5lyAUJnNEeyHUS2MdMYkPAAAAAAAAAAAAAAAAAAAAAEHMpqy501HZr2ms92z-Hz9AQMAAAF_SGRs1QBPGgBOIAaoCYWXntKF-h0vuvlyUCNB-IXTM4eEpSVqIdei9A' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-d '{
"usernames":["hx1","hx2"]
Expand Down
8 changes: 5 additions & 3 deletions docs/push/push_integration_note_ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ demo 中的 SDK 文件夹为 **Hyphenate SDK**,将 SDK 文件夹拖入到工
}
```

调用的 SDK 接口参数解释如下:\ App Key: 区别 APP 的标识,请参考[开发者注册及管理后台](https://docs-im.easemob.com/im/quickstart/guide/experience#注册并创建应用)。 \ apnsCertName: iOS 中推送证书名称,请参考[制作与上传推送证书](https://docs-im.easemob.com/im/ios/apns/deploy)
调用的 SDK 接口参数解释如下:
- App Key: 区别 APP 的标识,请参考[开发者注册及管理后台](https://docs-im.easemob.com/im/quickstart/guide/experience#注册并创建应用)
- apnsCertName: iOS 中推送证书名称,请参考[制作与上传推送证书](https://docs-im.easemob.com/im/ios/apns/deploy)

### SDK 登录流程

Expand Down Expand Up @@ -148,9 +150,9 @@ if (NSClassFromString(@"UNUserNotificationCenter")) {

##### 2.将获得的 deviceToken 传到 SDK

**注意**

:::notice
如果是 iOS 13 及以上的系统,请将 SDK 更新至 v3.6.4 或以上版本。
:::

```objectiveC
// 将获得的 deviceToken 传给 SDK。
Expand Down
40 changes: 27 additions & 13 deletions docs/push/push_send_notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ POST https://{host}/{org_name}/{app_name}/push/sync/{target}
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -X POST 'http://XXXX/XXXX/XXXX/push/sync/test1' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
Expand Down Expand Up @@ -217,8 +218,11 @@ POST https://{host}/{org_name}/{app_name}/push/single
#### 请求示例

```shell
curl -X POST "http://localhost:8099/easemob-demo/testy/push/single"
-H "Authorization: Bearer <YourAppToken> -H "Content-Type: application/json" -d '{
<YourAppToken> 替换为你在服务端生成的 App Token
curl -X POST 'http://localhost:8099/easemob-demo/testy/push/single' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
-d '{
"targets": [
"test2"
],
Expand Down Expand Up @@ -298,10 +302,11 @@ POST https://{host}/{org_name}/{app_name}/push/list/label
#### 请求示例

```shell
<YourAppToken> 替换为你在服务端生成的 App Token
curl -L -X POST 'http://a1.easemob.com/easemob/easeim/push/list/label' \
-H 'Authorization: Bearer YWMtIPBHKsOyEeAAAAAAAAAAAExCXvf5bRGAJBgXNYFJVQ9AQMAAAGAWu67KQBPGgBOV9ghkGKbtt9H9b1' \
-H 'Authorization: Bearer <YourAppToken>' \
-H 'Content-Type: application/json' \
--data-raw '{
-d '{
"targets": [
"post-90s"
],
Expand Down Expand Up @@ -373,9 +378,13 @@ POST https://{host}/{org_name}/{app_name}/push/task
#### 请求示例

```shell
curl -X POST "http://localhost:8099/easemob-demo/testy/push/task" -H "Content-Type: application/json" --data-raw '{
<YourAppToken> 替换为你在服务端生成的 App Token
curl -X POST "http://localhost:8099/easemob-demo/testy/push/task" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <YourAppToken>' \
-d '{
"pushMessage": {
"title\": "Hello1234",
"title": "Hello1234",
"subTitle": "Hello",
"content": "Hello",
"vivo": {}
Expand Down Expand Up @@ -444,9 +453,11 @@ POST https://{host}/{org_name}/{app_name}/push/message
##### 请求示例

```shell
curl -X POST "http://localhost:8099/easemob-demo/testy/push/message"
-H "Authorization: Bearer YWMtOzQVjJ3mEeuJQv1qXhB5QAAAAAAAAAAAAAAAAAAAAAFDtjwasNNKD6W3CET2O3RNAQMAAAF41YIKUABPGgDuIZeu5IMVC_M9G5JlTjUsZeYVSg5o8BwshLgWveZxjA"
-H "Content-Type: application/json" -d '{
<YourAppToken> 替换为你在服务端生成的 App Token
curl -X POST "http://localhost:8099/easemob-demo/testy/push/message" \
-H "Authorization: Bearer <YourAppToken>" \
-H "Content-Type: application/json" \
-d '{
"title": "Hello",
"subTitle": "Hello",
"content": "Hello",
Expand Down Expand Up @@ -508,8 +519,9 @@ POST https://{host}/{org_name}/{app_name}/push/message/{messageId}
#### 请求示例

```shell
curl -X GET "http://localhost:8099/easemob-demo/testy/push/message/832655326988867864"
-H "Authorization: Bearer YWMtOzQVjJ3mEeuJQv1qXhB5QAAAAAAAAAAAAAAAAAAAAAFDtjwasNNKD6W3CET2O3RNAQMAAAF41YIKUABPGgDuIZeu5IMVC_M9G5JlTjUsZeYVSg5o8BwshLgWveZxjA"
<YourAppToken> 替换为你在服务端生成的 App Token
curl -X GET "http://localhost:8099/easemob-demo/testy/push/message/832655326988867864" \
-H "Authorization: Bearer <YourAppToken>"
```

#### 响应示例
Expand Down Expand Up @@ -576,8 +588,10 @@ POST https://{host}/{org_name}/{app_name}/push/task/broadcast
##### 请求示例

```shell
curl -X POST "http://localhost:8099/easemob-demo/testy/push/task/broadcast"
-H "Content-Type: application/json" -d '{
curl -X POST "http://localhost:8099/easemob-demo/testy/push/task/broadcast" \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer <YourAppToken>' \
-d '{
"pushMsgId": 832253695868580464
}'
```
Expand Down

0 comments on commit c8e42aa

Please sign in to comment.