push

package
v0.0.0-...-396ab03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package push provides several push services API access.

Example (iOS only):

r := xg.SingleDeviceReq{}
r.AccessID = ""
localLoc, err := time.LoadLocation("Asia/Chongqing")
r.TimeStamp = strconv.FormatInt(time.Now().In(localLoc).Unix(), 10)
r.DeviceToken = ""
r.MessageType = "0"
r.Environment = "2"
r.Message = `{"aps":{"alert":"来自腾讯信鸽的提醒"}}`
resp, err := xg.SinglePush(&r, "")
fmt.Println(resp, err)

r := xg.MultipleDeviceReq{}
r.AccessID = ""
localLoc, _ := time.LoadLocation("Asia/Chongqing")
r.TimeStamp = strconv.FormatInt(time.Now().In(localLoc).Unix(), 10)
r.MessageType = "0"
r.Environment = "2"
r.Message = `{"aps":{"alert":"来自腾讯信鸽的提醒"}}`
r.DeviceList = []string{""}
xg.MultiPush(&r, "")

s := lc.New("", "")
r := lc.InstallationReq{}
r.DeviceType = ""
r.DeviceToken = ""
r.InstallationID = ""
r.Channels = []string{"all"}
s.SaveInstallation(&r)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL