Skip to content

meinside/jandi-webhook-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

jandi-webhook-go

Jandi's webhook library for golang.

Sample

Send an incoming webhook

package main

import (
	"log"

	"github.com/meinside/jandi-webhook-go"
)

const (
	webhookURL = "https://wh.jandi.com/connect-api/webhook/000000/abcd1234567890ef"
)

func main() {
	client := jandi.NewIncomingClient(webhookURL)
	client.SetVerbose(true)

	if txt, err := client.SendIncoming(
		"Some text",
		"#FF0000",
		jandi.ConnectInfoFrom("Sample program", "Sent from this sample program.", ""),
	); err == nil {
		log.Printf(">>> success: %s\n", txt)
	} else {
		log.Printf(">>> failure: %s (%s)\n", txt, err)
	}
}

License

MIT

About

Jandi webhook library for golang

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages