synochat

package module
v0.0.0-...-92412c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 4 Imported by: 0

README

go-synochat

Go Report Card

A Go client for Synology Chat's webhooks API Synology Chat's WebHooks API.

Installation

$ go get -u github.com/azurite928/go-synochat

Usage

Basic text message

webhookURL := "https://DS_IP/webapi/entry.cgi?api=SYNO.Chat.External&XXXXX"
message := synochat.Message{
    Text: "Hello Synology Chat!",
}
err := synochat.Send(webhookURL, message)
if err != nil {
    fmt.Println(err)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(url string, msg Message) error

Types

type Message

type Message struct {
	Text    string `json:"text"`
	FileUrl string `json:"file_url"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL