-
v1.0.0
Stablereleased this
2026-04-11 13:41:17 +00:00 | 1 commits to main since this releaseGo client for ntfy.sh
This is a basic client for ntfy.sh service.
Install
go get -u code.thinkaboutit.tech/pandora/ntfysh.gopackExample to use
Send a basic push notification:
package main import ( "fmt" "log/slog" "os" ntfy "code.thinkaboutit.tech/pandora/ntfysh.gopack" ) func main() { client := ntfy.NewNtfyClient("https://ntfy.sh", nil) // Optional, if no authentication setup then no auth will be used. client.SetAuthBasic("myuser", "mypassword") msg := ntfy.Message{ Topic: ntfy.AsPtr("my-topic"), Message: ntfy.AsPtr("my message"), Title: ntfy.AsPtr("my title"), } response, err := client.Push(msg) if err != nil { slog.Error("failed push message", "error", err.Error()) os.Exit(1) } fmt.Printf("%+v\n", response) }Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
Source code (ZIP)