LINE
The line package is a deliberately narrow LINE Messaging API wrapper for webhook replies, pushes, and media persistence.
Public HTTPS requirement
LINE delivers inbound events to the application. Start(ctx) first calls GetBotInfo, binds :<port>, and starts an HTTP server at /linebot/webhook by default. The endpoint must be publicly reachable over HTTPS; use a reverse proxy such as ngrok for local testing. WithPath changes the webhook path.
Event handling
The webhook verifies the LINE signature through ParseRequest, returns 400 for an invalid signature, and applies a 30-second context to every received event. Text, image, video, audio, and file messages are mapped to Input; other events are ignored. Sender display names are resolved best-effort through the relevant profile API.
API
| Method | Behavior |
|---|---|
Reply(handler) |
non-empty handler return is sent with the one-time reply token |
Send(ctx, to, text) |
PushMessage to a user, group, or room target |
Save(ctx, messageID, dir) |
stream media to a UUID-named file, capped at 50 MiB |
LINE has no SendInput, select menus, or status abstraction in this package.