pushbullet

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package "pushbullet" provides interfaces for Pushbullet HTTP API.

Pushbullet is a web service, which makes your devices work better together by allowing you to move things between them easily.

The official url: https://www.pushbullet.com/

Currently, this package supports only "pushes" except file.

See the API documentation for the details: https://docs.pushbullet.com/#http

Index

Constants

View Source
const (
	ENDPOINT_DEVICES   = _BASE_URL + "/v2/devices"
	ENDPOINT_PUSHES    = _BASE_URL + "/v2/pushes"
	ENDPOINT_UPLOADREQ = _BASE_URL + "/v2/upload-request"
	ENDPOINT_USERS_ME  = _BASE_URL + "/v2/users/me"
)

Variables

This section is empty.

Functions

func Upload added in v0.0.3

func Upload(client *http.Client, upload *responses.Upload, reader io.Reader) error

Upload a file to S3 specified with the response of PostUploadRequest.

Types

type Pushbullet

type Pushbullet struct {
	// contains filtered or unexported fields
}

func New

func New(token string) *Pushbullet

Create a client to call Pushbullet HTTP API. This requires the access token. The token is found in account settings.

Account settings: https://www.pushbullet.com/account

func NewClient added in v0.0.6

func NewClient(token string, c *http.Client) *Pushbullet

Create a client to call Pushbullet HTTP API. This requires the access token and an aribitary *http.Client. The token is found in account settings.

Account settings: https://www.pushbullet.com/account

func (*Pushbullet) Client added in v0.0.6

func (pb *Pushbullet) Client() *http.Client

func (*Pushbullet) GetDevices added in v0.0.4

func (pb *Pushbullet) GetDevices() ([]*responses.Device, error)

Get the devices thath can be pushed to.

func (*Pushbullet) GetUsersMe added in v0.0.5

func (pb *Pushbullet) GetUsersMe() (*responses.User, error)

Get the current user.

func (*Pushbullet) PostPushesAddress added in v0.0.2

func (pb *Pushbullet) PostPushesAddress(a *requests.Address) (*responses.Address, error)

Push an address, which consists of the place "name" and "address (searchquery)" for map.

func (*Pushbullet) PostPushesChecklist added in v0.0.5

func (pb *Pushbullet) PostPushesChecklist(c *requests.Checklist) (*responses.Checklist, error)

Push a checklist, which consists of "title" and the list of items.

func (*Pushbullet) PostPushesFile added in v0.0.3

func (pb *Pushbullet) PostPushesFile(f *requests.File) (*responses.File, error)

Push a file, which consists of "title", "message" and the information of uploaded file.

func (pb *Pushbullet) PostPushesLink(l *requests.Link) (*responses.Link, error)

Push a link, which consists of "title", "message" and "url" strings.

func (*Pushbullet) PostPushesNote added in v0.0.2

func (pb *Pushbullet) PostPushesNote(n *requests.Note) (*responses.Note, error)

Push a note, which consists of "title" and "message" strings.

func (*Pushbullet) PostUploadRequest added in v0.0.3

func (pb *Pushbullet) PostUploadRequest(name, mime string) (*responses.Upload, error)

Post the information of file and get the information of upload destination.

Directories

Path Synopsis
Package "request" provides structs to represent the request for Pushbullet HTTP API.
Package "request" provides structs to represent the request for Pushbullet HTTP API.
Package "responses" provides structs to represent the response of Pushbullet HTTP API.
Package "responses" provides structs to represent the response of Pushbullet HTTP API.

Jump to

Keyboard shortcuts

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