jpush

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 支持的推送平台
	AllPlatform = "" // 所有平台
	IOS         = pushSDK.IOS
	Android     = pushSDK.ANDROID
	WinPhone    = pushSDK.WINPHONE
)

Functions

This section is empty.

Types

type JPush

type JPush struct {
	// conf:
	AppKey    string // JPush key
	AppSecret string
	// contains filtered or unexported fields
}

func NewJPush

func NewJPush(appKey string, appSecret string) *JPush

func (*JPush) SendMessage

func (m *JPush) SendMessage(payload *pushSDK.PayLoad) error

发送消息:

func (*JPush) SetAudience

func (m *JPush) SetAudience(isAll bool, ids []string, tags []string, tagAnds []string, alias []string) *pushSDK.Audience

设置被推送范围: 用户ID/用户 tag 等

func (*JPush) SetMessage

func (m *JPush) SetMessage(title string, content string) *pushSDK.Message

设置推送消息报文内容:

func (*JPush) SetNotice

func (m *JPush) SetNotice(alertText string, androidText string, iOSText string, winPhoneText string) *pushSDK.Notice

设置推送弹出提示:

func (*JPush) SetPayload

func (m *JPush) SetPayload(platform *pushSDK.Platform, audience *pushSDK.Audience, notice *pushSDK.Notice, message *pushSDK.Message) *pushSDK.PayLoad

推送完整报文初始化:

func (*JPush) SetPlatform

func (m *JPush) SetPlatform(platform string) *pushSDK.Platform

设置被推送的设备平台: iOS/Android 等

Jump to

Keyboard shortcuts

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