line-notify-client
v1.0.5
Published
Simple LINE notify client for sending messages to users/groups
Readme
LINE Notify Client
Client library for sending notifications through LINE Notify custom server.
Installation
npm install line-notify-clientUsage
const lineNotify = require('line-notify-client');
// Initialize with user ID and server URL
lineNotify('U1234567890', 'http://localhost:3000')
.notify({
message: '📢 แจ้งเตือนจากระบบ!',
severity: 'warning',
})
.then(() => console.log('✅ ส่งข้อความสำเร็จ'))
.catch((err) => console.error('❌ เกิดข้อผิดพลาด:', err.message));Options
message: Notification content (required)severity: Message severity level (optional)normal: Regular message (default)warning: Important notificationdanger: Critical alert
Server Requirements
Your LINE Notify server must have these endpoints:
- POST
/notify- For sending messages
