notify

package module
v0.0.0-...-cdf8148 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 10 Imported by: 0

README

notify-go

Line Notify For Go

golang line notify

PkgGoDev Build Status Go Report Card

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendImage

func SendImage(accessToken, message, imageURL string) (err error)

SendImage : send line notify simple text with image

func SendLocalImage

func SendLocalImage(accessToken, message, imagePath string) (err error)

SendLocalImage : send line notify simple text with upload local image(jpg, png only)

func SendSticker

func SendSticker(accessToken, message string, stickerPackageId, stickerId int) (err error)

SendSticker : send line notify simple text with sticker

Sticker List

https://devdocs.line.me/files/sticker_list.pdf

func SendText

func SendText(accessToken, message string) (err error)

SendText : send line notify simple text

Types

This section is empty.

Jump to

Keyboard shortcuts

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