node-red-contrib-line-messaging-api 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +39 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -34,17 +34,52 @@ AdminタブからInstall
34
34
 
35
35
  ### Push Message
36
36
 
37
- ![](https://i.gyazo.com/1562a3e4539469515c798d9e3c50d052.gif)
37
+ Pushメッセージを送るときにmsg.payloadにテキストを入れることでテキストメッセージの送信ができます。
38
+
39
+ > ![](https://i.gyazo.com/1562a3e4539469515c798d9e3c50d052.gif)
40
+
41
+ #### テキストメッセージv2でユーザーにメンション
42
+
43
+ Pushメッセージを送るときにmsg.payloadに`{hoge}`などのテキストを入れつつ、msg.substitutionを設定することでテキストメッセージv2を使ってユーザーにメンションすることができます。
44
+
45
+ - msg.payload: `Welcome, {user1}! {laugh}\n{everyone} There is a newcomer!`
46
+ - msg.substitution:
47
+
48
+ ```json
49
+ {"user1": {"type": "mention", "mentionee": {"type": "user", "userId": "Uxxxxxxxxxxxx"}},"laugh": {"type": "emoji","productId": "670e0cce840a8236ddd4ee4c","emojiId": "002"},"everyone": {"type": "mention","mentionee": {"type": "all"}}}
50
+ ```
51
+
52
+ > ![](https://i.gyazo.com/3fa696275f53251bf99e7a1354183d72.png)
53
+
54
+ #### 任意のメッセージ
55
+
56
+ msg.payloadに配列や[メッセージオブジェクト](https://developers.line.biz/ja/reference/messaging-api/#message-objects)を設定することで任意のメッセージを送信できます。
57
+
58
+ ```js
59
+ msg.payload = [
60
+ {
61
+ type: "text",
62
+ text: "hogehoge",
63
+ },
64
+ {
65
+ type: "image",
66
+ originalContentUrl: 'https://i.gyazo.com/e772c3b48a07716226f7184d7f417cda.png',
67
+ previewImageUrl: 'https://i.gyazo.com/e772c3b48a07716226f7184d7f417cda.png'
68
+ }
69
+ ]
70
+
71
+ return msg;
72
+ ```
38
73
 
39
74
  ### Bloadcast Message
40
75
 
41
76
  * 友達全員にメッセージ配信
42
77
 
43
- ![](https://i.gyazo.com/ef7c655a74e85e23db5ee156e5490e15.png)
78
+ > ![](https://i.gyazo.com/ef7c655a74e85e23db5ee156e5490e15.png)
44
79
 
45
- ### LINE Notify
80
+ ### LINE Notify (2024/12/22追記: API自体が終了するため廃止予定です。)
46
81
 
47
- ![](https://i.gyazo.com/e64db6a7ee48cea43ed3c70b5fd2f05f.gif)
82
+ > ![](https://i.gyazo.com/e64db6a7ee48cea43ed3c70b5fd2f05f.gif)
48
83
 
49
84
  ### LINE Notify_new
50
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-line-messaging-api",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Node-REDでLINE Botが作れます。",
5
5
  "main": "line.js",
6
6
  "repository": {