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.
- package/README.md +39 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,17 +34,52 @@ AdminタブからInstall
|
|
|
34
34
|
|
|
35
35
|
### Push Message
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Pushメッセージを送るときにmsg.payloadにテキストを入れることでテキストメッセージの送信ができます。
|
|
38
|
+
|
|
39
|
+
> 
|
|
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
|
+
> 
|
|
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
|
-

|
|
78
|
+
> 
|
|
44
79
|
|
|
45
|
-
### LINE Notify
|
|
80
|
+
### LINE Notify (2024/12/22追記: API自体が終了するため廃止予定です。)
|
|
46
81
|
|
|
47
|
-

|
|
82
|
+
> 
|
|
48
83
|
|
|
49
84
|
### LINE Notify_new
|
|
50
85
|
|