Help us shape the future of Go! Take the 2026 Go Developer Survey

pushbullet

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pushbullet

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

Pushbullet struct holds necessary data to communicate with the Pushbullet API.

func New

func New(apiToken string) *Pushbullet

New returns a new instance of a Pushbullet notification service. For more information about Pushbullet api token:

-> https://docs.pushbullet.com/#api-overview

func (*Pushbullet) AddReceivers

func (pb *Pushbullet) AddReceivers(deviceNicknames ...string)

AddReceivers takes Pushbullet device nicknames and adds them to the internal deviceNicknames list. The Send method will send a given message to all those devices.

func (Pushbullet) Send

func (pb Pushbullet) Send(ctx context.Context, subject, message string) error

Send takes a message subject and a message body and sends them to all valid devices. you will need Pushbullet installed on the relevant devices (android, chrome, firefox, windows) see https://www.pushbullet.com/apps

type SMS

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

SMS struct holds necessary data to communicate with the Pushbullet SMS API.

func NewSMS

func NewSMS(apiToken, deviceNickname string) (*SMS, error)

NewSMS returns a new instance of a SMS notification service tied to an SMS capable device. deviceNickname is the Pushbullet nickname of the sms capable device from which messages are sent. (https://help.pushbullet.com/articles/how-do-i-send-text-messages-from-my-computer/). For more information about Pushbullet api token:

-> https://docs.pushbullet.com/#api-overview

func (*SMS) AddReceivers

func (sms *SMS) AddReceivers(phoneNumbers ...string)

AddReceivers takes phone numbers and adds them to the internal phoneNumbers list. The Send method will send a given message to all registered phone numbers.

func (SMS) Send

func (sms SMS) Send(ctx context.Context, subject, message string) error

Send takes a message subject and a message body and sends them to all phone numbers. see https://help.pushbullet.com/articles/how-do-i-send-text-messages-from-my-computer/

Jump to

Keyboard shortcuts

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