simple-go-line-notify

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT

README

simple golang line notify

PkgGoDev Build Status Go Report Card

Install

go get -u github.com/Frontware/simple-go-line-notify

Usage

package main

import "github.com/Frontware/simple-go-line-notify"

func main() {
    accessToken := "29jWoO****p70eK3AKA********ooHfusvDP6***ZmR"
    message := "hello, world!"

    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)
}

Directories

Path Synopsis
This code only use "Line Notify REST API"
This code only use "Line Notify REST API"

Jump to

Keyboard shortcuts

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