Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UMENG_RET_SUCCESS = "SUCCESS" //成功返回 UMENG_RET_FAIL = "FAIL" //失败返回 )
View Source
var ( DISPLAY_TYPE_MESSAGE = "message" DISPLAY_TYPE_NOTIFICATION = "notification" )
View Source
var ( UMENG_PUSH_TYPE_UNICAST = "unicast" //单播, 针对某个设备推送 UMENG_PUSH_TYPE_LISTCAST = "listcast" //列播,要求不超过500个device_token UMENG_PUSH_TYPE_FILECAST = "filecast" //文件播,多个device_token可通过文件形式批量发送 UMENG_PUSH_TYPE_BROADCAST = "broadcast" //广播,针对所有设备推送 UMENG_PUSH_TYPE_GROUPCAST = "groupcast" //组播,按照filter筛选用户群, 请参照filter参数 UMENG_PUSH_TYPE_CUSTOMIZEDCAST = "customizedcast" //通过alias进行推送,包括以下两种case: - alias: 对单个或者多个alias进行推送 - file_id: 将alias存放到文件后,根据file_id来推送 )
View Source
var UMENG_METHOD_POST = "POST"
View Source
var UMENG_PARAMS_COUNT = 2
View Source
var UMENG_PUSH_API_URL = "https://msgapi.umeng.com/api/send"
http://msg.umeng.com/api/send?sign=mysign https://msgapi.umeng.com/api/send?sign=mysign
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Ret string `json:"ret"` //成功返回"SUCCESS" 失败返回"FAIL" Data struct { MsgID string `json:"msg_id"` //单播类消息(type为unicast、listcast、customizedcast且不带file_id)返回: TaskID string `json:"task_id"` //任务类消息(type为broadcast、groupcast、filecast、customizedcast且file_id不为空)返回 ErrorCode string `json:"error_code"` //当ret返回值为FAIL时指示错误码 ErrorMsg string `json:"error_msg"` //当ret返回值为FAIL时指示错误细信息 } `json:"data"` }
type Umeng ¶
type Umeng struct {
// contains filtered or unexported fields
}
func (*Umeng) PushNotification ¶
func (u *Umeng) PushNotification(msg *push.Notification) (MsgID string, err error)
推送消息(当前只支持Android单播和列播)
Click to show internal directories.
Click to hide internal directories.