npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-line-messaging-api

v0.2.1

Published

Node-REDでLINE Botが作れます。

Downloads

420

Readme

LINE Messagin APIのNode-REDのノードです。

概要

LINE Messagin APIを利用できるNode-REDのノードです。

以下のAPIを利用できます。

  • LINE Messaging API
    • Webhook & Reply Message
    • Push Message
    • BloadCast Message
  • LINE Notify

インストール

npm i node-red-contrib-line-messaging-api

or

AdminタブからInstall

利用イメージ

Webhook & Reply Message

  1. Webhookノードを配置し、ダブルクリックで設定を開き、指定した /path と自身のホスト名の組み合わせ(Webhook URL)を、LINE Developersであらかじめ作成したMessaging APIに登録します。
  2. ReplyMessageノードを配置し、チャネルのシークレットとアクセストークンを設定します。
  3. WebhookノードとReplyMessageノードを接続してLINEにメッセージを送るとオウム返しBotができます。
    Image from Gyazo
  4. WebhookノードとReplyMessageノードの中間で msg.payload をうまく作成すると様々なメッセージが送れます。文字列を指定すると通常のテキストメッセージに、LINEで定義されているメッセージオブジェクトを指定すればそのメッセージを返信することができます。

Push Message

Bloadcast Message

  • 友達全員にメッセージ配信

LINE Notify

LINE Notify_new

過去のものとAPIは変わってないですが、オプション指定ができます。

template nodeにJSONを設定してみてください。

  • 画像とスタンプも送る例
{
    "stickerPackageId": "446",
    "stickerId": "1988",
    "message": "{{payload}}",
    "imageThumbnail": "https://i.gyazo.com/a84c585225af440bd0d5fff881152792.png",
    "imageFullsize": "https://i.gyazo.com/a84c585225af440bd0d5fff881152792.png"
}

LINK

release

  • 2023/12/11: Notify_newを追加。スタンプや画像も送れるように。
  • 2021/8/1: Reply Messageが画像に対応(thanks @ukkz
  • 2020/12/17: Bloadcast Messageに対応、Reply MessageがFlex Messageに対応(thanks @gaomar
  • 2019/2/13: PUSH MessageとLINE Notify対応
  • 2018/10/11: 現状は簡単なリプライのみ実装されています。