Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toorop/pushover
pushover client library for golang (forked from github.com/thorduri/pushover)
https://github.com/toorop/pushover
Last synced: about 6 hours ago
JSON representation
pushover client library for golang (forked from github.com/thorduri/pushover)
- Host: GitHub
- URL: https://github.com/toorop/pushover
- Owner: toorop
- License: isc
- Created: 2016-08-30T12:27:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-30T12:29:13.000Z (about 8 years ago)
- Last Synced: 2024-06-20T08:20:16.927Z (5 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pushover
pushover implements a go package client interface to the [pushover API](https://pushover.net/api).
## Documentation
See [godoc](http://godoc.org/github.com/thorduri/pushover)## Example
Assuming pushover.go as:
```Go
package mainimport (
"fmt"
"log""github.com/thorduri/pushover"
)const exampleToken = "KzGDORePK8gMaC0QOYAMyEEuzJnyUi"
const exampleUser = "uQiRzpo4DXghDmr9QzzfQu27cmVRsG"func main() {
po, err := pushover.NewPushover(exampleToken, exampleUser)
if err != nil {
log.Fatal(err)
}err = po.Message("Hello Pushover!")
if err != nil {
log.Fatal(err)
}
}
```
Then:
```bash
$ go run pushover.go
```
Will send a the message "Hello Pushover!" over the pushover API using default values for the provided token and user.