• v1.1.0 0b2947664c

    v1.1.0
    All checks were successful
    ci/woodpecker/push/ci Pipeline was successful
    ci/woodpecker/tag/release Pipeline was successful
    ci/woodpecker/cron/vulnerability Pipeline was successful
    ci/woodpecker/cron/renovate Pipeline was successful
    ci/woodpecker/cron/auto_merge Pipeline was successful
    Stable

    onlyati released this 2026-04-11 16:26:51 +00:00 | 0 commits to main since this release

    What's new

    Features

    • Add access token authentication (#3)
    Downloads
  • v1.0.0 7d07589354

    v1.0.0
    All checks were successful
    ci/woodpecker/tag/release Pipeline was successful
    ci/woodpecker/cron/renovate Pipeline was successful
    ci/woodpecker/cron/vulnerability Pipeline was successful
    Stable

    onlyati released this 2026-04-11 13:41:17 +00:00 | 1 commits to main since this release

    Go client for ntfy.sh

    This is a basic client for ntfy.sh service.

    Install

    go get -u code.thinkaboutit.tech/pandora/ntfysh.gopack
    

    Example 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