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 ¶
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 ¶
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.