@machinat/line
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

Line Platform

Receive events and send messages through LINE messaging API.

Install

npm install @machinat/core @machinat/http @machinat/line
# or with yarn
yarn add @machinat/core @machinat/http @machinat/line

Docs

Check the platform document and the package reference.

Setup

import Machinat from '@machinat/core';
import Http from '@machinat/http';
import Line from '@machinat/line';

const {
  LINE_PROVIDER_ID,
  LINE_CHANNEL_ID,
  LINE_ACCESS_TOKEN,
  LINE_CHANNEL_SECRET,
} = process.env;

const app = Machinat.createApp({
  modules: [
    Http.initModule({ /* ... */ }),
  ],
  platforms: [
    Line.intiModule({
      webhookPath: '/webhook/line',
      providerId: LINE_PROVIDER_ID,
      channelId: LINE_CHANNEL_ID,
      accessToken: LINE_ACCESS_TOKEN,
      channelSecret: LINE_CHANNEL_SECRET,
    }),
  ],
});

Readme

Keywords

none

Package Sidebar

Install

npm i @machinat/line

Weekly Downloads

1

Version

0.6.0

License

MIT

Unpacked Size

265 kB

Total Files

127

Last publish

Collaborators

  • lrills0515
  • lrills