line-bot-api 1.27.0 → 1.29.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1589af1dd6d0ad4aa9a5b3e2868edc83b11ab33967a4a489725de67b1909c781
4
- data.tar.gz: 01ee321da5257c341dc289bb8252c2e6fc8f88ee182b36d77df17e3f9c718e37
3
+ metadata.gz: 10292429dbd89bc3ecce7eb32bd7112013680cf96a4dc6abc3c7984181247598
4
+ data.tar.gz: 8094eee0946c394c9fcaf0b74da4cbc8240de6063904bd4a08b6fc23634261bd
5
5
  SHA512:
6
- metadata.gz: fa697e899d359d36c72ce15471746559e5c2968ef548552e5fb2bac0826798c62690a6471377c7be1d237921e532d7e1be8b5712ebd85130b0c499a40239fe23
7
- data.tar.gz: 5f94534088ef554d4e801c60058232dff373ddd4bd6f67c05229ab622d3d7459912fa56b732ebb97b484f75ebcaa36454ee56374077e807fb9ed3f70edb1cb33
6
+ metadata.gz: b670c31ba6bf4c11cf3faa02b82b74c22e0e3fccb230433d7a1bd6607f77a93b0fc27d7a396d689f5ad94707cd89c59d0be05e386f6d12834ddb428c57355b8a
7
+ data.tar.gz: ef168567d1c273d0e8d05a35227e4433d0d7d0312c5719316ab7e35a9113522193058916c942f4fa65dea8b6f725109736e68b3e12f294afda78abda35c88ca9
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # LINE Messaging API SDK for Ruby
2
2
 
3
- [![Gem-version](https://img.shields.io/gem/v/line-bot-api.svg)](https://rubygems.org/gems/line-bot-api) [![Build Status](https://travis-ci.org/line/line-bot-sdk-ruby.svg?branch=master)](https://travis-ci.org/line/line-bot-sdk-ruby)
3
+ [![Gem-version](https://img.shields.io/gem/v/line-bot-api.svg)](https://rubygems.org/gems/line-bot-api)
4
4
 
5
5
 
6
6
  ## Introduction
@@ -17,6 +17,9 @@ Also, generated documentation by YARD is available.
17
17
 
18
18
  - https://rubydoc.info/gems/line-bot-api
19
19
 
20
+ ## Requirements
21
+ This library requires Ruby 3.1 or later.
22
+
20
23
  ## Installation
21
24
 
22
25
  Add this line to your application's Gemfile:
@@ -89,12 +92,8 @@ end
89
92
  ## Help and media
90
93
  FAQ: https://developers.line.biz/en/faq/
91
94
 
92
- Community Q&A: https://www.line-community.me/questions
93
-
94
95
  News: https://developers.line.biz/en/news/
95
96
 
96
- Twitter: @LINE_DEV
97
-
98
97
  ## Versioning
99
98
  This project respects semantic versioning.
100
99
 
@@ -15,7 +15,7 @@
15
15
  module Line
16
16
  module Bot
17
17
  module API
18
- VERSION = "1.27.0"
18
+ VERSION = "1.29.0"
19
19
  end
20
20
  end
21
21
  end
@@ -1174,6 +1174,69 @@ module Line
1174
1174
  get(endpoint, endpoint_path, credentials)
1175
1175
  end
1176
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
+
1210
+ # Send a LINE notification message by specifying the user's phone number.
1211
+ #
1212
+ # @param hashed_phone_number [String] Phone number that has been normalized.
1213
+ # @param messages [Hash, Array] Message Objects.
1214
+ # @param headers [Hash] HTTP Headers.
1215
+ # @param payload [Hash] Additional request body.
1216
+ #
1217
+ # @return [Net::HTTPResponse]
1218
+ def push_pnp(hashed_phone_number, messages, headers: {}, payload: {})
1219
+ channel_token_required
1220
+
1221
+ messages = [messages] if messages.is_a?(Hash)
1222
+
1223
+ endpoint_path = '/bot/pnp/push'
1224
+ payload = payload.merge({ to: hashed_phone_number, messages: messages }).to_json
1225
+ post(oauth_endpoint, endpoint_path, payload, credentials.merge(headers))
1226
+ end
1227
+
1228
+ # Get the number of LINE notification messages sent using the /bot/pnp/push endpoint.
1229
+ #
1230
+ # @param date [String] Date the messages were sent (format: yyyyMMdd).
1231
+ #
1232
+ # @return [Net::HTTPResponse]
1233
+ def get_message_delivery_pnp(date)
1234
+ channel_token_required
1235
+
1236
+ endpoint_path = "/bot/message/delivery/pnp?date=#{date}"
1237
+ get(endpoint, endpoint_path, credentials)
1238
+ end
1239
+
1177
1240
  # Fetch data, get content of specified URL.
1178
1241
  #
1179
1242
  # @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.27.0
4
+ version: 1.29.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: 2023-02-08 00:00:00.000000000 Z
11
+ date: 2024-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable