line-bot-api 1.28.0 → 1.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -5
- data/lib/line/bot/api/version.rb +1 -1
- data/lib/line/bot/client.rb +30 -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: 10292429dbd89bc3ecce7eb32bd7112013680cf96a4dc6abc3c7984181247598
|
4
|
+
data.tar.gz: 8094eee0946c394c9fcaf0b74da4cbc8240de6063904bd4a08b6fc23634261bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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
|
|
data/lib/line/bot/api/version.rb
CHANGED
data/lib/line/bot/client.rb
CHANGED
@@ -1207,6 +1207,36 @@ module Line
|
|
1207
1207
|
get(endpoint, endpoint_path, credentials)
|
1208
1208
|
end
|
1209
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
|
+
|
1210
1240
|
# Fetch data, get content of specified URL.
|
1211
1241
|
#
|
1212
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.
|
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:
|
11
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|