README.md 4.1 KB

gpushover

Go wrapper for the Pushover API.

License FOSSAStatus GoVersion PkgGoDev GoReportCard GitHubRelease LocCount GitHubCodeSize CodacyBadge LgtmAlerts CodeBeatadge CodeclimateMaintainability TickgitTODOs DeepSource


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,
                       )
        }
    }
}