Skip to content

Commit cd2dd70

Browse files
committed
README.md
1 parent 20e7829 commit cd2dd70

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# PushSDK
2+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/xxgail/PushSDK)](https://pkg.go.dev/github.com/xxgail/PushSDK)
3+
24
Go-PushSDK
35
给APNS发推送消息。包括iOS、华为、小米、魅族、OPPO、vivo
46

@@ -9,6 +11,7 @@ Go-PushSDK
911
`go get github.com/xxgail/PushSDK`
1012

1113

14+
1215
- [builder.go](https://github.com/xxgail/PushSDK/blob/master/builder.go) 构建消息体
1316
- [common.go](https://github.com/xxgail/PushSDK/blob/master/common.go) 包内的公共方法
1417
- [const.go](https://github.com/xxgail/PushSDK/blob/master/const.go) 定义常量
@@ -17,6 +20,7 @@ Go-PushSDK
1720
- [result_common.go](https://github.com/xxgail/PushSDK/blob/master/result_common.go) 返回格式
1821
- [send.go](https://github.com/xxgail/PushSDK/blob/master/send.go) sendMessage主体步骤
1922

23+
2024
# example
2125
```go
2226
package main
@@ -40,6 +44,8 @@ func main() {
4044
}
4145

4246
```
47+
48+
4349
# channel-param
4450
| **channel** | **plat** |
4551
| --- | --- |
@@ -50,6 +56,8 @@ func main() {
5056
| oppo | {"app_key":"xxx","master_secret":"xxx"} |
5157
| vivo | {"app_id":"xxx","app_key":"xxx","app_secret":"xxx"} |
5258

59+
60+
5361
# 具体传输方式
5462
| **channel** | **device_token来源** | **请求方式** | **URL** | **Content-Type** | **request-header** | **消息体结构** | **device_token位置** |
5563
| --- | --- | --- | --- | --- | --- | --- | --- |
@@ -61,5 +69,7 @@ func main() {
6169
| vivo| regId | POST| [https://api-push.vivo.com.cn](https://api-push.vivo.com.cn)/message/send | application/json | "authToken" = authToken | json格式 | 在json消息体中 |
6270

6371

72+
6473
# 参考来源
65-
> ios- Local and Remote Notification Programming Guide [https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1)
74+
> Local and Remote Notification Programming Guide [https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1)
75+
> hw推送服务-HTTPS下行消息 [https://developer.huawei.com/consumer/cn/doc/HMSCore-References-V5/https-send-api-0000001050986197-V5#ZH-CN_TOPIC_0000001050986197__section723545214380](https://developer.huawei.com/consumer/cn/doc/HMSCore-References-V5/https-send-api-0000001050986197-V5#ZH-CN_TOPIC_0000001050986197__section723545214380)

oppo_push.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (o *OPPO) initMessage(m *Message, registrationIds []string) map[string]stri
4848
AppMessageId: m.ApnsId,
4949
Style: 1,
5050
Title: m.Title,
51-
SubTitle: m.Title,
51+
SubTitle: "",
5252
Content: m.Desc,
5353
ClickActionType: clickTypeOPPO[m.ClickType],
5454
ClickActionActivity: m.ClickContent,

0 commit comments

Comments
 (0)