line-bot-api 1.24.0 → 1.26.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: e6b6ba33d24c43ef8485e0b9de1a5a36b928ec5cc89a259cc813c0952ada238d
4
- data.tar.gz: 2bc49b9ee22a628cc94abfe4193627fc44ca10b02acb03441febb41052d00597
3
+ metadata.gz: 67e9d5e26c8cd5c967d2edf3ba20c16e3aa86925a5706b9d54bc4c1a9866c24e
4
+ data.tar.gz: 3309bc494169784bc4a67dd36fd6918354077f00af650bf87efe18c9e5e28450
5
5
  SHA512:
6
- metadata.gz: 29985c36fc9b6273acbaf53b78ace56a278f16db96c43696dbfb0163638f64c2c567693c127883d7e2bea31a9ea3576972d83c0a8252a0b474be2da50ffb69ef
7
- data.tar.gz: 540067af91254691fe7affa878f5a6197aa33bb0ea1ece0ff11e70bd91c2ebf05c496f226454c304339292f9e1c91fcee34366fbbcb055ea00cbe7a133654937
6
+ metadata.gz: 20933038268c520b4454c1a20fc25c4594d142f4f63c9d77037dd6cc9a53f4a850a9b371a3e4deafff4bc47e1b165585282bf8c721842b34e58e347555eec01c
7
+ data.tar.gz: 5263ec06255883c1852c5dee2f3bf6f04cef03b3cedea8676af7e0a297d5eb875e5b5299b817887c8a2bcab296b4397356351ac608d058fe27435dd629496da2
@@ -15,7 +15,7 @@
15
15
  module Line
16
16
  module Bot
17
17
  module API
18
- VERSION = "1.24.0"
18
+ VERSION = "1.26.0"
19
19
  end
20
20
  end
21
21
  end
@@ -211,7 +211,7 @@ module Line
211
211
  # Push messages to a user using user_id.
212
212
  #
213
213
  # @param user_id [String] User Id
214
- # @param messages [Hash or Array] Message Objects
214
+ # @param messages [Hash, Array] Message Objects
215
215
  # @param headers [Hash] HTTP Headers
216
216
  # @param payload [Hash] Additional request body
217
217
  # @return [Net::HTTPResponse]
@@ -243,7 +243,7 @@ module Line
243
243
  # client.reply_message(event['replyToken'], messages)
244
244
  #
245
245
  # @param token [String] Reply Token
246
- # @param messages [Hash or Array] Message Objects
246
+ # @param messages [Hash, Array] Message Objects
247
247
  # @return [Net::HTTPResponse]
248
248
  def reply_message(token, messages)
249
249
  channel_token_required
@@ -257,8 +257,8 @@ module Line
257
257
 
258
258
  # Send messages to multiple users using userIds.
259
259
  #
260
- # @param to [Array or String] Array of userIds
261
- # @param messages [Hash or Array] Message Objects
260
+ # @param to [Array, String] Array of userIds
261
+ # @param messages [Hash, Array] Message Objects
262
262
  # @param headers [Hash] HTTP Headers
263
263
  # @param payload [Hash] Additional request body
264
264
  # @return [Net::HTTPResponse]
@@ -275,7 +275,7 @@ module Line
275
275
 
276
276
  # Send messages to all friends.
277
277
  #
278
- # @param messages [Hash or Array] Message Objects
278
+ # @param messages [Hash, Array] Message Objects
279
279
  # @param headers [Hash] HTTP Headers
280
280
  #
281
281
  # @return [Net::HTTPResponse]
@@ -294,7 +294,7 @@ module Line
294
294
  # API Documentation is here.
295
295
  # https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message
296
296
  #
297
- # @param messages [Hash or Array]
297
+ # @param messages [Hash, Array]
298
298
  # @param recipient [Hash]
299
299
  # @param filter [Hash]
300
300
  # @param limit [Hash]
@@ -535,6 +535,71 @@ module Line
535
535
  get(endpoint, endpoint_path, credentials)
536
536
  end
537
537
 
538
+ # Validate message objects of a reply message
539
+ #
540
+ # @param messages [Array] Array of message objects to validate
541
+ #
542
+ # @return [Net::HTTPResponse]
543
+ def validate_reply_message_objects(messages)
544
+ channel_token_required
545
+
546
+ endpoint_path = '/bot/message/validate/reply'
547
+ payload = { messages: messages }.to_json
548
+ post(endpoint, endpoint_path, payload, credentials)
549
+ end
550
+
551
+ # Validate message objects of a push message
552
+ #
553
+ # @param messages [Array] Array of message objects to validate
554
+ #
555
+ # @return [Net::HTTPResponse]
556
+ def validate_push_message_objects(messages)
557
+ channel_token_required
558
+
559
+ endpoint_path = '/bot/message/validate/push'
560
+ payload = { messages: messages }.to_json
561
+ post(endpoint, endpoint_path, payload, credentials)
562
+ end
563
+
564
+ # Validate message objects of a multicast message
565
+ #
566
+ # @param messages [Array] Array of message objects to validate
567
+ #
568
+ # @return [Net::HTTPResponse]
569
+ def validate_multicast_message_objects(messages)
570
+ channel_token_required
571
+
572
+ endpoint_path = '/bot/message/validate/multicast'
573
+ payload = { messages: messages }.to_json
574
+ post(endpoint, endpoint_path, payload, credentials)
575
+ end
576
+
577
+ # Validate message objects of a narrowcast message
578
+ #
579
+ # @param messages [Array] Array of message objects to validate
580
+ #
581
+ # @return [Net::HTTPResponse]
582
+ def validate_narrowcast_message_objects(messages)
583
+ channel_token_required
584
+
585
+ endpoint_path = '/bot/message/validate/narrowcast'
586
+ payload = { messages: messages }.to_json
587
+ post(endpoint, endpoint_path, payload, credentials)
588
+ end
589
+
590
+ # Validate message objects of a broadcast message
591
+ #
592
+ # @param messages [Array] Array of message objects to validate
593
+ #
594
+ # @return [Net::HTTPResponse]
595
+ def validate_broadcast_message_objects(messages)
596
+ channel_token_required
597
+
598
+ endpoint_path = '/bot/message/validate/broadcast'
599
+ payload = { messages: messages }.to_json
600
+ post(endpoint, endpoint_path, payload, credentials)
601
+ end
602
+
538
603
  # Create a rich menu
539
604
  #
540
605
  # @param rich_menu [Hash] The rich menu represented as a rich menu object
@@ -547,6 +612,18 @@ module Line
547
612
  post(endpoint, endpoint_path, rich_menu.to_json, credentials)
548
613
  end
549
614
 
615
+ # Validate a rich menu object
616
+ #
617
+ # @param rich_menu [Hash] The rich menu represented as a rich menu object
618
+ #
619
+ # @return [Net::HTTPResponse]
620
+ def validate_rich_menu_object(rich_menu)
621
+ channel_token_required
622
+
623
+ endpoint_path = '/bot/richmenu/validate'
624
+ post(endpoint, endpoint_path, rich_menu.to_json, credentials)
625
+ end
626
+
550
627
  # Delete a rich menu
551
628
  #
552
629
  # @param rich_menu_id [String] ID of an uploaded rich menu
@@ -1101,7 +1178,7 @@ module Line
1101
1178
  #
1102
1179
  # @param endpoint_base [String]
1103
1180
  # @param endpoint_path [String]
1104
- # @param payload [String or NilClass]
1181
+ # @param payload [String, NilClass]
1105
1182
  # @param headers [Hash]
1106
1183
  #
1107
1184
  # @return [Net::HTTPResponse]
@@ -1114,7 +1191,7 @@ module Line
1114
1191
  #
1115
1192
  # @param endpoint_base [String]
1116
1193
  # @param endpoint_path [String]
1117
- # @param payload [String or NilClass]
1194
+ # @param payload [String, NilClass]
1118
1195
  # @param headers [Hash]
1119
1196
  #
1120
1197
  # @return [Net::HTTPResponse]
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.24.0
4
+ version: 1.26.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: 2022-05-30 00:00:00.000000000 Z
11
+ date: 2022-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable