jpush

package module
v0.0.0-...-c4ed89f Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 0 Imported by: 0

README

jpush

CODE

实现

DEVICE API v3 USAGE

package main

import (
	"github.com/ljun20160606/jpush/v3"
	"github.com/ljun20160606/jpush/v3/deviceApi/model"
	"github.com/ljun20160606/jpush/v3/deviceApi"
)

func main() {
	jp := v3.NewJPusher("appKey", "masterSecret")
	// 查询设备的别名与标签
	_, _ = jp.GetDevices("registrationID")
	// 设置设备的别名与标签
	_ = jp.SetDevices("registrationID", model.SetDeviceOption{
		Tags: model.SetOption{
			Add:    &[]string{},
			Remove: &[]string{},
		},
		Alias:  nil,
		Mobile: nil,
	})
	// 查询别名
	_, _ = jp.GetAlias("alias", deviceApi.IOS)
	// 删除别名
	_ = jp.DeleteAlias("alias", deviceApi.ANDROID)
	// 查询标签列表
	_, _ = jp.GetTags()
	// 重置设备标签
	_ = jp.ResetTag("registration")
	// 设置设备标签
	_ = jp.SetDevicesTag("registration", []string{}, []string{})
	// 更新标签
	_ = jp.SetTag("tag", []string{}, []string{})
	// 删除标签
	_ = jp.DeleteTag("tag", 0)
}

Documentation

Index

Constants

View Source
const (
	JPushDevice = "https://device.jpush.cn"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
example
v3

Jump to

Keyboard shortcuts

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