Categorygithub.com/AliRamadhans/notify-go
repositorypackage
0.0.0-20230111015048-cdf8148b3fe2
Repository: https://github.com/aliramadhans/notify-go.git
Documentation: pkg.go.dev

# README

notify-go

Line Notify For Go

golang line notify

PkgGoDev Build Status Go Report Card License: MIT

Install

go get -u github.com/AliRamadhans/notify-go

Usage

package main

import "github.com/AliRamadhans/notify-go"

func main() {
    accessToken := "Here_your_oauth_notify"
    message := "LeeVersion an BotLine  Example For  LineNotify!"

    if err := notify.SendText(accessToken, message); err != nil {
        panic(err)
    }
}

Send Notify With Online Image

accessToken := "your-access-token"
message := "your message. must not be empty"
imageURL := "image url. ex) https://..."

if err := notify.SendImage(accessToken, message, imageURL); err != nil {
    panic(err)
}

Send Notify With Local Image (only jpg, png)

accessToken := "your-access-token"
message := "your message. must not be empty"
imagePath := "/your/image/path.png"

if err := notify.SendLocalImage(accessToken, message, imagePath); err != nil {
    panic(err)
}

Send Notify With Sticker

Sticker List is See Here

accessToken := "your-access-token"
message := "your message. must not be empty"
stickerPackageId := 1
stickerId := 113

if err := notify.SendSticker(accessToken, message, stickerPackageId, stickerId); err != nil {
    panic(err)
}