Documentation ¶
Overview ¶
This code only use "Line Notify REST API"
See Also ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendImage ¶ added in v1.1.0
SendImage : send line notify simple text with image
Example ¶
package main import ( "github.com/juunini/simple-go-line-notify/notify" ) func main() { accessToken := "29jWoO****p70eK3AKA********ooHfusvDP6***ZmR" message := "hello, world!" imageURL := "https://d.line-scdn.net/n/line_lp/img/ogimage.png" if err := notify.SendImage(accessToken, message, imageURL); err != nil { panic(err) } }
Output:
func SendLocalImage ¶ added in v1.3.0
SendLocalImage : send line notify simple text with upload local image(jpg, png only)
Example ¶
package main import ( "github.com/juunini/simple-go-line-notify/notify" ) func main() { accessToken := "29jWoO****p70eK3AKA********ooHfusvDP6***ZmR" message := "hello, world!" imagePath := "./sample.png" if err := notify.SendLocalImage(accessToken, message, imagePath); err != nil { panic(err) } }
Output:
func SendSticker ¶ added in v1.2.0
SendSticker : send line notify simple text with sticker
Sticker List ¶
https://devdocs.line.me/files/sticker_list.pdf
Example ¶
package main import ( "github.com/juunini/simple-go-line-notify/notify" ) func main() { accessToken := "29jWoO****p70eK3AKA********ooHfusvDP6***ZmR" message := "hello, world!" stickerPackageId := 1 stickerId := 113 if err := notify.SendSticker(accessToken, message, stickerPackageId, stickerId); err != nil { panic(err) } }
Output:
func SendText ¶ added in v1.0.1
SendText : send line notify simple text
Example ¶
package main import ( "github.com/juunini/simple-go-line-notify/notify" ) func main() { accessToken := "29jWoO****p70eK3AKA********ooHfusvDP6***ZmR" message := "hello, world!" if err := notify.SendText(accessToken, message); err != nil { panic(err) } }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.