deviceApi

package
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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IOS platform = iota
	ANDROID
	ALL
)
View Source
const (
	VersionV3 = jpush.JPushDevice + "/v3"
)

Variables

View Source
var (
	JPushUrls = [...]string{
		UrlDevice: VersionV3 + "/devices/",
		UrlTag:    VersionV3 + "/tags/",
		UrlAlias:  VersionV3 + "/alias/",
	}
)

Functions

func ResultGet

func ResultGet(resp *httpclient.HttpResponse, dest interface{}) error

func ResultSet

func ResultSet(resp *httpclient.HttpResponse) error

Types

type Device

type Device interface {
	GetDevices(registrationID string) (model.Devices, error)              // 查询设备的别名与标签
	SetDevices(registrationID string, option model.SetDeviceOption) error // 设置设备的别名与标签
	GetAlias(alias string, pl platform) (model.AliasDevices, error)       // 查询别名
	DeleteAlias(alias string, pl platform) error                          // 删除别名
	GetTags() (model.Tags, error)                                         // 查询标签列表
	ResetTag(registrationID string) error                                 // 重置设备标签
	SetDevicesTag(registrationID string, add, remove []string) error      // 设置设备标签
	SetTag(tag string, add, remove []string) error                        // 更新标签
	DeleteTag(tag string, pl platform) error                              // 删除标签
}

func NewDevice

func NewDevice(authorization string) Device

type JPushUrl

type JPushUrl int
const (
	UrlDevice JPushUrl = iota
	UrlTag
	UrlAlias
)

func (JPushUrl) String

func (j JPushUrl) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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