commit 37e7600c0fb483ac5b070478952fc1871ae9a1fd from: Oliver Lowe date: Tue Jun 15 08:11:05 2021 UTC Summary package documentation with examples And a little godoc svg badge commit - fbbacff5b7e4a607059e285fb956a39ad57c22ef commit + 37e7600c0fb483ac5b070478952fc1871ae9a1fd blob - 6ec9128c06dcf0348aa57840072b871e618e595d blob + d0a1b5f880178bde3186cb6559eae39751281e89 --- README.md +++ README.md @@ -1,3 +1,10 @@ +# Pushover + +Package pushover provides a small interface to send messages via the Pushover service +using its Message API. + +[![godocs.io](http://godocs.io/git.sr.ht/~otl/pushover?status.svg)](http://godocs.io/git.sr.ht/~otl/pushover) + This repository contains the Go pushover package, the pover command-line utility, and example Icinga2 configuration and scripts to send notifications from Icinga2 using pover. blob - 55b2b71a0bca811b47b52a81aeca95f42e468f1a blob + 3d1c56493e2217c9caba66616a9f01c16e31be1d --- pushover.go +++ pushover.go @@ -1,3 +1,32 @@ +// 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 "Helllo 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 package pushover import (