diff --git a/README.md b/README.md index ca4786f..58dcc11 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,18 @@ A userId can be saved from `event.source.userId` when added as a friend (follow event), or during the chat (message event). `message` can be a string, an array of string, -a [Send message][send-message-url] object, +a [Send message][send-message-url] object, +or an array of [Send message][send-message-url] objects. + +## LineBot.multicast(to, message) + +Send push message to multiple users (Max: 150 users). +This is more efficient than `push` as it will make api call only once. + +`to` is an array of userId. + +`message` can be a string, an array of string, +a [Send message][send-message-url] object, or an array of [Send message][send-message-url] objects. ## LineBot.leaveGroup(groupId) @@ -123,7 +134,7 @@ Leave a room. Respond to the event. `message` can be a string, an array of string, -a [Send message][send-message-url] object, +a [Send message][send-message-url] object, or an array of [Send message][send-message-url] objects. Return a [Promise][promise-url] object from [`node-fetch`][node-fetch-url] module. @@ -164,10 +175,10 @@ event.reply({ event.reply({ type: 'location', - title: 'my location', - address: '〒150-0002 東京都渋谷区渋谷2丁目21−1', - latitude: 35.65910807942215, - longitude: 139.70372892916203 + title: 'my location', + address: '〒150-0002 東京都渋谷区渋谷2丁目21−1', + latitude: 35.65910807942215, + longitude: 139.70372892916203 }); event.reply({ diff --git a/examples/demo.js b/examples/demo.js index 17c9aeb..764c096 100644 --- a/examples/demo.js +++ b/examples/demo.js @@ -35,6 +35,9 @@ bot.on('message', function (event) { case 'Push': bot.push('U6350b7606935db981705282747c82ee1', ['Hey!', 'สวัสดี ' + String.fromCharCode(0xD83D, 0xDE01)]); break; + case 'Push2': + bot.push(['U6350b7606935db981705282747c82ee1', 'U6350b7606935db981705282747c82ee1'], ['Hey!', 'สวัสดี ' + String.fromCharCode(0xD83D, 0xDE01)]); + break; case 'Multicast': bot.push(['U6350b7606935db981705282747c82ee1', 'U6350b7606935db981705282747c82ee1'], 'Multicast!'); break; diff --git a/package.json b/package.json index 5f7d5f0..6ca43d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linebot", - "version": "1.2.1", + "version": "1.3.0", "description": "Node.js SDK for the LINE Messaging API", "main": "index.js", "files": [