line

package
v0.0.0-...-db4472a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line struct {
	// contains filtered or unexported fields
}

Line struct holds info about client and destination ID for communicating with line API

func New

func New(channelSecret, channelAccessToken string) (*Line, error)

New creates a new instance of Line notifier service For more info about line api credential: -> https://github.com/line/line-bot-sdk-go

func (*Line) AddReceivers

func (l *Line) AddReceivers(receiverIDs ...string)

AddReceivers receives user, group or room IDs then add them to internal receivers list

func (*Line) Send

func (l *Line) Send(ctx context.Context, subject, message string) error

Send receives message subject and body then sends it to all receivers set previously Subject will be on the first line followed by message on the next line

type Notify

type Notify struct {
	// contains filtered or unexported fields
}

Line Notify struct holds info about client and destination token for communicating with line API

func NewNotify

func NewNotify() *Notify

New creates a new instance of Line notify service For more info about line notify api: -> https://notify-bot.line.me/doc/en/

func (*Notify) AddReceivers

func (ln *Notify) AddReceivers(receiverTokens ...string)

AddReceivers receives token then add them to internal receivers list

func (*Notify) Send

func (ln *Notify) Send(ctx context.Context, subject, message string) error

Send receives message subject and body then sends it to all receivers set previously Subject will be on the first line followed by message on the next line

Jump to

Keyboard shortcuts

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