Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/homuchen/linenotify
A command tool for line-notify service, including login to get a token and send message.
https://github.com/homuchen/linenotify
Last synced: about 1 month ago
JSON representation
A command tool for line-notify service, including login to get a token and send message.
- Host: GitHub
- URL: https://github.com/homuchen/linenotify
- Owner: HoMuChen
- Created: 2021-10-15T10:34:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-17T12:31:16.000Z (about 3 years ago)
- Last Synced: 2024-06-20T03:32:27.620Z (7 months ago)
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linenotify
A command tool for line-notify service, including login to get a token and send message.## Usage
```go
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
```sh
go build ./cmd/cli.go
```### Configuration
```sh
export LINE_CLIENT_ID="your client id"
export LINE_CLIENT_SECRET="your client secret"
export LINE_CALLBACK="callback url"
```### Run
* Login
```sh
./cli -action login
```* Send message
```sh
./cli -action send -token {token} -messgae {message}
```