pushbullet

package
v0.0.0-...-972cdf1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PushBulletURL = "https://api.pushbullet.com/v2/pushes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	// AccessToken for pushing
	AccessToken string

	// Identity for target to receive
	Iden string

	// Email for target to receive, either to their email, or to their account
	Email string
}

type Payload

type Payload struct {
	Type       string `json:"type"`
	Title      string `json:"title"`
	Body       string `json:"body"`
	Email      string `json:"email,omitempty"`
	DeviceIden string `json:"device_iden,omitempty"`
}

type PushBullet

type PushBullet struct {
	Iden Identity

	// Title for the push
	Title string

	// Template for push notification
	NotificationTmpl *tmpl.Template
}

func NewPushBullet

func NewPushBullet(iden Identity, title string, gen *tmpl.Template) *PushBullet

func (*PushBullet) Funcs

func (p *PushBullet) Funcs(fm tmpl.FuncMap) *tmpl.Template

func (*PushBullet) Push

func (p *PushBullet) Push(c ctx.Context, data interface{}) error

func (*PushBullet) PushData

func (p *PushBullet) PushData(c ctx.Context, data Payload) error

func (*PushBullet) Template

func (p *PushBullet) Template() *tmpl.Template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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