Skip to content

A command tool for line-notify service, including login to get a token and send message.

Notifications You must be signed in to change notification settings

HoMuChen/linenotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linenotify

A command tool for line-notify service, including login to get a token and send message.

Usage

import (
        "log"

        "github.com/HoMuChen/linenotify"
)

func main() {
        client, err := linenotify("id", "secret", "callback")
        if err != nil {
                log.Fatal(err)
        }

        toten, err := client.Login()
        if err != nil {
                log.Fatal(err)
        }

        if err := client.send("token", "hello"); err != nil {
                log.Fatal(err)
        }
}

Command line

Build

go build ./cmd/cli.go

Configuration

export LINE_CLIENT_ID="your client id"
export LINE_CLIENT_SECRET="your client secret"
export LINE_CALLBACK="callback url"

Run

  • Login

    ./cli -action login
  • Send message

    ./cli -action send -token {token} -messgae {message}

About

A command tool for line-notify service, including login to get a token and send message.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages