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
- func Upload(client *http.Client, upload *responses.Upload, reader io.Reader) error
- type Pushbullet
- func (pb *Pushbullet) Client() *http.Client
- func (pb *Pushbullet) GetDevices() ([]*responses.Device, error)
- func (pb *Pushbullet) GetUsersMe() (*responses.User, error)
- func (pb *Pushbullet) PostPushesAddress(a *requests.Address) (*responses.Address, error)
- func (pb *Pushbullet) PostPushesChecklist(c *requests.Checklist) (*responses.Checklist, error)
- func (pb *Pushbullet) PostPushesFile(f *requests.File) (*responses.File, error)
- func (pb *Pushbullet) PostPushesLink(l *requests.Link) (*responses.Link, error)
- func (pb *Pushbullet) PostPushesNote(n *requests.Note) (*responses.Note, error)
- func (pb *Pushbullet) PostUploadRequest(name, mime string) (*responses.Upload, error)
Constants ¶
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 ¶
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 ¶
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 ¶
func (pb *Pushbullet) Client() *http.Client
func (*Pushbullet) GetDevices ¶
func (pb *Pushbullet) GetDevices() ([]*responses.Device, error)
Get the devices thath can be pushed to.
func (*Pushbullet) GetUsersMe ¶
func (pb *Pushbullet) GetUsersMe() (*responses.User, error)
Get the current user.
func (*Pushbullet) PostPushesAddress ¶
Push an address, which consists of the place "name" and "address (searchquery)" for map.
func (*Pushbullet) PostPushesChecklist ¶
Push a checklist, which consists of "title" and the list of items.
func (*Pushbullet) PostPushesFile ¶
Push a file, which consists of "title", "message" and the information of uploaded file.
func (*Pushbullet) PostPushesLink ¶
Push a link, which consists of "title", "message" and "url" strings.
func (*Pushbullet) PostPushesNote ¶
Push a note, which consists of "title" and "message" strings.
func (*Pushbullet) PostUploadRequest ¶
func (pb *Pushbullet) PostUploadRequest(name, mime string) (*responses.Upload, error)
Post the information of file and get the information of upload destination.
Source Files
¶
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. |