File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 11# xiaomi-push
22小米推送服务 Golang SDK
33
4- full golang implementation of XiaoMi Push API (http://dev.xiaomi.com/console/?page=appservice&mod=push )
4+ Production ready, full golang implementation of Xiaomi Push API (http://dev.xiaomi.com/console/?page=appservice&mod=push )
55
66``` Go
7- import (
8- " fmt"
9-
10- xm " github.com/yilee/xiaomi-push"
11- )
12-
13- var client = xm.NewClient (" yourappSecret" , []string {" packageName" })
7+ var client = xiaomipush.NewClient (" yourappSecret" , []string {" packageName" })
148
159func main () {
16- var msg1 *Message = NewAndroidMessage (" hi baby1 " , " hi1 " ).SetPayload (" this is payload1" ). SetPassThrough ( 0 )
17- client.Send (msg1, regID1)
10+ var msg1 *Message = xiaomipush. NewAndroidMessage (" title " , " body " ).SetPayload (" this is payload1" )
11+ client.Send (context. Background (), msg1, regID1)
1812}
1913
2014```
You can’t perform that action at this time.
0 commit comments