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

0.8.0 • Public • Published

Line Platform

Receive events and send messages through LINE messaging API.

Install

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

Docs

Check the platform document and the package reference.

Setup

import Sociably from '@sociably/core';
import Http from '@sociably/http';
import Line from '@sociably/line';

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @sociably/line

Weekly Downloads

1

Version

0.8.0

License

MIT

Unpacked Size

294 kB

Total Files

156

Last publish

Collaborators

  • lrills