/js-line-notify

Javascript LINE Notify

Primary LanguageJavaScriptMIT LicenseMIT

logo JS LINE Notify

Version 1.0.0 LICENSE Supported node.js versions: 8.11.4

Simple API LINE Notify


Requirement

  • Node.js v8.11.4
  • NPM v6.4.0
  • request
  • request-promise
  • fs

Installation

Installation is simple.

$ git clone https://github.com/albertoanggi/js-line-notify
$ npm install

Generate LINE Notify Token

https://notify-bot.line.me/my/

Usage

Initialization

const LineNotify = require("./src/client");

const ACCESS_TOKEN = "TOKEN_HERE!";
const notify = new LineNotify(`${ACCESS_TOKEN}`);

Example

sendText()

notify.sendText("Halo Enji");

sendImage()

//Image from local computer
notify.sendImage("default_image.png");
//Image from url (HTTPS/HTTP)
notify.sendImage("https://scdn.line-apps.com/n/line_notice/img/og_160829/og_fb.png");

sendSticker()

notify.sendSticker(2, 1);

You can see sticker list in here

status()

notify.status();

revoke()

notify.revoke();