Documentation
¶
Overview ¶
Package pushover provides a small interface to send messages via the Pushover service using its Message API. There is no client to set up or state to manage; just create a message and send it.
The most basic usage is sending a simple message. For example, to send "Hello World!":
msg := pushover.Message{
User: "abcde12345",
Token: "zxcvb6789",
Message: "Hello World!"
}
if err := pushover.Push(msg); err != nil {
return err
}
To send a message with high priority, with a title:
msg := pushover.Message{
User: "abcde12345",
Token: "zxcvb6789",
Message: "Hello World!",
Title: "Greeting",
Priority: PriorityHigh,
}
if err := pushover.Push(msg); err != nil {
return err
}
For more detailed example usage, see cmd/pover/pover.go
Index ¶
Constants ¶
View Source
const ( PriorityLowest = -2 + iota PriorityLow PriorityNormal PriorityHigh )
View Source
const MaxMsgLength = 1024
View Source
const MaxTitleLength = 250
Variables ¶
This section is empty.
Functions ¶
Types ¶
Source Files
¶
- pushover.go
Click to show internal directories.
Click to hide internal directories.