umeng

package
v0.0.0-...-f578327 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendAndroidBroadcast

func SendAndroidBroadcast(appKey, appMasterSecret, ticker, title, text, expireTime string) error

Android广播函数

func SendIOSBroadcast

func SendIOSBroadcast(appKey, appMasterSecret, title, subtitle, body, expireTime string) error

iOS广播函数

Types

type AndroidBody

type AndroidBody struct {
	Ticker    string `json:"ticker"`
	Title     string `json:"title"`
	Text      string `json:"text"`
	AfterOpen string `json:"after_open"`
}

type AndroidBroadcastMessage

type AndroidBroadcastMessage struct {
	AppKey            string            `json:"appkey"`
	Timestamp         string            `json:"timestamp"`
	Type              string            `json:"type"`
	Payload           AndroidPayload    `json:"payload"`
	Policy            Policy            `json:"policy"`
	ChannelProperties map[string]string `json:"channel_properties"`
	Description       string            `json:"description"`
}

Android广播消息结构

type AndroidPayload

type AndroidPayload struct {
	DisplayType string      `json:"display_type"`
	Body        AndroidBody `json:"body"`
}

type IOSAlert

type IOSAlert struct {
	Title    string `json:"title"`
	Subtitle string `json:"subtitle"`
	Body     string `json:"body"`
}

type IOSAps

type IOSAps struct {
	Alert IOSAlert `json:"alert"`
}

type IOSBroadcastMessage

type IOSBroadcastMessage struct {
	AppKey      string     `json:"appkey"`
	Timestamp   string     `json:"timestamp"`
	Type        string     `json:"type"`
	Payload     IOSPayload `json:"payload"`
	Policy      Policy     `json:"policy"`
	Description string     `json:"description"`
}

iOS广播消息结构

type IOSPayload

type IOSPayload struct {
	Aps IOSAps `json:"aps"`
}

type Policy

type Policy struct {
	ExpireTime string `json:"expire_time"`
}

公共策略结构

type UmengResponse

type UmengResponse struct {
	Ret  string `json:"ret"`
	Data struct {
		MsgID     string `json:"msg_id,omitempty"`
		ErrorCode string `json:"error_code,omitempty"`
		ErrorMsg  string `json:"error_msg,omitempty"`
	} `json:"data"`
}

公共返回结构

Jump to

Keyboard shortcuts

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