line-bot-api 1.26.0 → 1.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/line/bot/api/version.rb +1 -1
- data/lib/line/bot/client.rb +45 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d5c002bd9571e6dc16472a7a6fe465aaf52d3c1fa4964637ce195cde0dae426
|
4
|
+
data.tar.gz: c3a007fa7ca316560612cfef6f7b97a44e6b9d4bbe203516273f9bae6b40cc7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0598b48094499f88f6ca3fe3007de5468a578df0a4207c3aa254c2452674fbd93bcbbb866b146cf20c0b7b21fd0701b41709f7671e621cf950196cc8b8ff075
|
7
|
+
data.tar.gz: 3a6406575a5cec9a7d9e9f04582d0af9be9a83fb998336fa563d0b95f0720f8a28df34c6d48e529dd51b8cf96101a3ef0fb8adac500f7b638c7e2cf12cc7d831
|
data/lib/line/bot/api/version.rb
CHANGED
data/lib/line/bot/client.rb
CHANGED
@@ -1162,6 +1162,51 @@ module Line
|
|
1162
1162
|
get(endpoint, endpoint_path, credentials)
|
1163
1163
|
end
|
1164
1164
|
|
1165
|
+
# Gets the status of a narrowcast message.
|
1166
|
+
#
|
1167
|
+
# @param request_id [String] The narrowcast message's request ID. Each Messaging API request has a request ID. Find it in the response headers.
|
1168
|
+
#
|
1169
|
+
# @return [Net::HTTPResponse]
|
1170
|
+
def get_narrowcast_message_status(request_id)
|
1171
|
+
channel_token_required
|
1172
|
+
|
1173
|
+
endpoint_path = "/bot/message/progress/narrowcast?requestId=#{request_id}"
|
1174
|
+
get(endpoint, endpoint_path, credentials)
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
# Send messages to multiple users using phone numbers.
|
1178
|
+
#
|
1179
|
+
# @param to [Array, String] Array of hashed phone numbers.
|
1180
|
+
# @param messages [Hash, Array] Message Objects.
|
1181
|
+
# @param headers [Hash] HTTP Headers.
|
1182
|
+
# @param payload [Hash] Additional request body.
|
1183
|
+
#
|
1184
|
+
# @return [Net::HTTPResponse]
|
1185
|
+
|
1186
|
+
def multicast_by_phone_numbers(to, messages, headers: {}, payload: {})
|
1187
|
+
channel_token_required
|
1188
|
+
|
1189
|
+
to = [to] if to.is_a?(String)
|
1190
|
+
messages = [messages] if messages.is_a?(Hash)
|
1191
|
+
|
1192
|
+
endpoint_path = 'bot/ad/multicast/phone'
|
1193
|
+
payload = payload.merge({ to: to, messages: messages }).to_json
|
1194
|
+
post(oauth_endpoint, endpoint_path, payload, credentials.merge(headers))
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
# Get the delivery result of the message delivered in Send message using phone number. (`#multicast_by_phone_numbers`)
|
1198
|
+
#
|
1199
|
+
# @param date [String] Date the message was sent in UTC+9 with `yyyyMMdd` format.
|
1200
|
+
#
|
1201
|
+
# @return [Net::HTTPResponse]
|
1202
|
+
|
1203
|
+
def get_delivery_result_sent_by_phone_numbers(date)
|
1204
|
+
channel_token_required
|
1205
|
+
|
1206
|
+
endpoint_path = "/bot/message/delivery/ad_phone?date=#{date}"
|
1207
|
+
get(endpoint, endpoint_path, credentials)
|
1208
|
+
end
|
1209
|
+
|
1165
1210
|
# Fetch data, get content of specified URL.
|
1166
1211
|
#
|
1167
1212
|
# @param endpoint_base [String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: line-bot-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LINE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|