gpushover: Go wrapper for the Pushover API. https://github.com/johnsonjh/gpushover/

Jeff Johnson 642f961667 Appease Markdownlint 3 years ago
LICENSE 9c9b6ebff2 multi: Binary license, attributions, reformatting. 3 years ago
README.md 1a2bd29d0a Appease Markdownlint 3 years ago
SECURITY.md 2a2d9d6130 Adjust code example formatting. 3 years ago
go.mod 2a2d9d6130 Adjust code example formatting. 3 years ago
go.sum 2a2d9d6130 Adjust code example formatting. 3 years ago
gpushover.go 9c9b6ebff2 multi: Binary license, attributions, reformatting. 3 years ago
gpushover_license_test.go 9c9b6ebff2 multi: Binary license, attributions, reformatting. 3 years ago

README.md

gpushover

Go wrapper for the Pushover API.


Availability

Go Modules

Source Code

Issue Tracking

Security Policy

Original Authors

License

Usage Example

package main

import (
    gp "go.gridfinity.dev/gpushover"
    "fmt"
    "time"
)

func main() {
    p := gp.Pushover{
        "......",  /* User key */
        "......",  /* Application key */
    }

    n := gp.Notification {
        Title:     "gpushover",
        Message:   "Hello from gpushover!",
        Timestamp: time.Now(),
        Priority:  2,
        Retry:     30,
        Expire:    90,
    }

    response, err := p.Notify(
                              n,
                             )

    if err != nil {
        if err != gp.PushoverError {
                                     panic(
                                            err,
                                          )
        } else {
            fmt.Println(
                        err,
                       )
            fmt.Println(
                        response,
                       )
        }
    }
}