line-bot-api 2.8.0 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/line/bot/v2/channel_access_token/api/channel_access_token_client.rb +2 -2
- data/lib/line/bot/v2/channel_access_token/model/error_response.rb +1 -0
- data/lib/line/bot/v2/channel_access_token/model/verify_channel_access_token_response.rb +1 -0
- data/lib/line/bot/v2/insight/model/age_tile.rb +1 -0
- data/lib/line/bot/v2/insight/model/app_type_tile.rb +1 -0
- data/lib/line/bot/v2/insight/model/area_tile.rb +1 -0
- data/lib/line/bot/v2/insight/model/error_detail.rb +1 -0
- data/lib/line/bot/v2/insight/model/gender_tile.rb +1 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response_click.rb +1 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response_message.rb +1 -0
- data/lib/line/bot/v2/insight/model/get_message_event_response_overview.rb +1 -0
- data/lib/line/bot/v2/insight/model/subscription_period_tile.rb +1 -0
- data/lib/line/bot/v2/liff/api/liff_client.rb +6 -4
- data/lib/line/bot/v2/liff/model/add_liff_app_response.rb +1 -0
- data/lib/line/bot/v2/liff/model/get_all_liff_apps_response.rb +1 -0
- data/lib/line/bot/v2/liff/model/liff_app.rb +1 -0
- data/lib/line/bot/v2/liff/model/liff_features.rb +1 -0
- data/lib/line/bot/v2/manage_audience/api/manage_audience_client.rb +12 -8
- data/lib/line/bot/v2/messaging_api/api/messaging_api_blob_client.rb +15 -10
- data/lib/line/bot/v2/messaging_api/api/messaging_api_client.rb +75 -51
- data/lib/line/bot/v2/messaging_api/model/rich_menu_response.rb +1 -0
- data/lib/line/bot/v2/module/api/line_module_client.rb +6 -4
- data/lib/line/bot/v2/module_attach/model/attach_module_response.rb +1 -0
- data/lib/line/bot/v2/utils.rb +25 -0
- data/lib/line/bot/v2/webhook/model/account_link_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/activated_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/attached_module_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/audio_message_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/beacon_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/beacon_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/bot_resumed_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/bot_suspended_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/chat_control.rb +1 -0
- data/lib/line/bot/v2/webhook/model/deactivated_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/detached_module_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/file_message_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/follow_detail.rb +1 -0
- data/lib/line/bot/v2/webhook/model/follow_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/image_message_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/join_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/joined_members.rb +1 -0
- data/lib/line/bot/v2/webhook/model/leave_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/left_members.rb +1 -0
- data/lib/line/bot/v2/webhook/model/link_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/location_message_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/member_joined_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/member_left_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/membership_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/membership_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/message_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/module_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/module_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/pnp_delivery.rb +1 -0
- data/lib/line/bot/v2/webhook/model/pnp_delivery_completion_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/postback_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/postback_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/text_message_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/unfollow_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/unsend_detail.rb +1 -0
- data/lib/line/bot/v2/webhook/model/unsend_event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/video_message_content.rb +1 -0
- data/lib/line/bot/v2/webhook/model/video_play_complete.rb +1 -0
- data/lib/line/bot/v2/webhook/model/video_play_complete_event.rb +1 -0
- data/lib/line/bot/version.rb +1 -1
- data/sig/line/bot/v2/channel_access_token/api/channel_access_token_client.rbs +2 -2
- data/sig/line/bot/v2/channel_access_token/model/error_response.rbs +1 -0
- data/sig/line/bot/v2/channel_access_token/model/verify_channel_access_token_response.rbs +1 -0
- data/sig/line/bot/v2/insight/model/age_tile.rbs +1 -0
- data/sig/line/bot/v2/insight/model/app_type_tile.rbs +1 -0
- data/sig/line/bot/v2/insight/model/area_tile.rbs +1 -0
- data/sig/line/bot/v2/insight/model/error_detail.rbs +1 -0
- data/sig/line/bot/v2/insight/model/gender_tile.rbs +1 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response_click.rbs +1 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response_message.rbs +1 -0
- data/sig/line/bot/v2/insight/model/get_message_event_response_overview.rbs +1 -0
- data/sig/line/bot/v2/insight/model/subscription_period_tile.rbs +1 -0
- data/sig/line/bot/v2/liff/model/add_liff_app_response.rbs +1 -0
- data/sig/line/bot/v2/liff/model/get_all_liff_apps_response.rbs +1 -0
- data/sig/line/bot/v2/liff/model/liff_app.rbs +1 -0
- data/sig/line/bot/v2/liff/model/liff_features.rbs +1 -0
- data/sig/line/bot/v2/messaging_api/model/rich_menu_response.rbs +1 -0
- data/sig/line/bot/v2/module_attach/model/attach_module_response.rbs +1 -0
- data/sig/line/bot/v2/utils.rbs +4 -0
- data/sig/line/bot/v2/webhook/model/account_link_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/activated_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/attached_module_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/audio_message_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/beacon_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/beacon_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/bot_resumed_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/bot_suspended_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/chat_control.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/deactivated_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/detached_module_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/file_message_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/follow_detail.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/follow_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/image_message_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/join_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/joined_members.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/leave_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/left_members.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/link_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/location_message_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/member_joined_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/member_left_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/membership_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/membership_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/message_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/module_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/module_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/pnp_delivery.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/pnp_delivery_completion_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/postback_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/postback_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/text_message_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/unfollow_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/unsend_detail.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/unsend_event.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/video_message_content.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/video_play_complete.rbs +1 -0
- data/sig/line/bot/v2/webhook/model/video_play_complete_event.rbs +1 -0
- metadata +1 -1
data/lib/line/bot/v2/utils.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'uri'
|
|
2
|
+
|
|
1
3
|
module Line
|
|
2
4
|
module Bot
|
|
3
5
|
module V2
|
|
@@ -8,6 +10,29 @@ module Line
|
|
|
8
10
|
# breaking change that does not allow Hash requests will be necessary.
|
|
9
11
|
NO_CAMELIZE_PARENT_KEYS = %w(substitution).freeze
|
|
10
12
|
|
|
13
|
+
# Matches a path that contains a "." or ".." segment (literal or percent-encoded),
|
|
14
|
+
# so a path parameter cannot escape its endpoint. See square/retrofit's RequestBuilder for the same idea.
|
|
15
|
+
PATH_TRAVERSAL = %r{\A(?:.*/)?(?:\.|%2e|%2E){1,2}(?:/.*)?\z}.freeze
|
|
16
|
+
|
|
17
|
+
# NOTE: line-bot-sdk-ruby users should not use this. Breaking changes may occur, so use at your own risk.
|
|
18
|
+
#
|
|
19
|
+
# Substitutes path parameters into a path template and rejects any
|
|
20
|
+
# result that would let a parameter perform path traversal.
|
|
21
|
+
def self.build_path(path_template, params)
|
|
22
|
+
path = path_template
|
|
23
|
+
params.each do |name, value|
|
|
24
|
+
raise ArgumentError, "#{name} is required" if value.nil?
|
|
25
|
+
|
|
26
|
+
path = path.gsub("{#{name}}", URI.encode_uri_component(value.to_s))
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
if PATH_TRAVERSAL.match?(path)
|
|
30
|
+
raise ArgumentError, "Path parameters shouldn't perform path traversal ('.' or '..'): #{path}"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
path
|
|
34
|
+
end
|
|
35
|
+
|
|
11
36
|
# NOTE: line-bot-sdk-ruby users should not use this. Breaking changes may occur, so use at your own risk.
|
|
12
37
|
def self.deep_underscore(hash)
|
|
13
38
|
hash.each_with_object({}) do |(key, value), result| # steep:ignore UnannotatedEmptyCollection
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when a user has linked their LINE account with a provider's service account. You can reply to account link events.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#account-link-event
|
|
17
18
|
class AccountLinkEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# This event indicates that the module channel has been switched to Active Channel by calling the Acquire Control API. Sent to the webhook URL server of the module channel.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#activated-event
|
|
17
18
|
class ActivatedEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when a user enters the range of a LINE Beacon. You can reply to beacon events.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#beacon-event
|
|
17
18
|
class BeaconEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# This event indicates that the LINE Official Account has returned from the suspended state. Sent to the webhook URL server of the module channel.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#botresumed-event
|
|
17
18
|
class BotResumedEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# This event indicates that the LINE Official Account has been suspended (Suspend). Sent to the webhook URL server of the module channel.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#botsuspend-event
|
|
17
18
|
class BotSuspendedEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# This event indicates that the module channel has been switched to Standby Channel by calling Acquire Control API or Release Control API. Sent to the webhook URL server of the module channel.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#deactivated-event
|
|
17
18
|
class DeactivatedEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#follow-event
|
|
14
15
|
class FollowDetail
|
|
15
16
|
# @!attribute [rw] is_unblocked
|
|
16
17
|
# @return [Boolean] Whether a user has added your LINE Official Account as a friend or unblocked.
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when your LINE Official Account is added as a friend (or unblocked). You can reply to follow events.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#follow-event
|
|
17
18
|
class FollowEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when your LINE Official Account joins a group chat or multi-person chat. You can reply to join events.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#join-event
|
|
17
18
|
class JoinEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#member-joined-event
|
|
14
15
|
class JoinedMembers
|
|
15
16
|
# @!attribute [rw] members
|
|
16
17
|
# @return [Array[UserSource]] Users who joined. Array of source user objects.
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when a user removes your LINE Official Account from a group chat or when your LINE Official Account leaves a group chat or multi-person chat.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#leave-event
|
|
17
18
|
class LeaveEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#member-left-event
|
|
14
15
|
class LeftMembers
|
|
15
16
|
# @!attribute [rw] members
|
|
16
17
|
# @return [Array[UserSource]] Users who left. Array of source user objects.
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
14
|
# Content of the account link event.
|
|
15
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#account-link-event
|
|
15
16
|
class LinkContent
|
|
16
17
|
# @!attribute [rw] result
|
|
17
18
|
# @return [String] ('ok'|'failed') One of the following values to indicate whether linking the account was successful or not
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when a user joins a group chat or multi-person chat that the LINE Official Account is in.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#member-joined-event
|
|
17
18
|
class MemberJoinedEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when a user leaves a group chat or multi-person chat that the LINE Official Account is in.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#member-left-event
|
|
17
18
|
class MemberLeftEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
14
|
# Content of the membership event.
|
|
15
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#membership-event
|
|
15
16
|
class MembershipContent
|
|
16
17
|
# @!attribute [rw] type
|
|
17
18
|
# @return [String] Type of membership event.
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# This event indicates that a user has subscribed (joined), unsubscribed (left), or renewed the bot's membership.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#membership-event
|
|
17
18
|
class MembershipEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Webhook event object which contains the sent message.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#message-event
|
|
17
18
|
class MessageEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# This event indicates that the module channel has been attached to the LINE Official Account. Sent to the webhook URL server of the module channel.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#module-channel-specific-webhook-events
|
|
17
18
|
class ModuleEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
14
|
# A delivery object containing a hashed phone number string or a string specified by `X-Line-Delivery-Tag` header
|
|
15
|
+
# @see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/message-sending-complete-webhook-event/#overview-delivery-webhook-event
|
|
15
16
|
class PnpDelivery
|
|
16
17
|
# @!attribute [rw] data
|
|
17
18
|
# @return [String] A hashed phone number string or a string specified by `X-Line-Delivery-Tag` header
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# When a request is made to the LINE notification messages API and delivery of the LINE notification message to the user is completed, a dedicated webhook event (delivery completion event) is sent from the LINE Platform to the webhook URL of the bot server.
|
|
17
|
+
# @see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/message-sending-complete-webhook-event/#overview-delivery-webhook-event
|
|
17
18
|
class PnpDeliveryCompletionEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when a user performs a postback action which initiates a postback. You can reply to postback events.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#postback-event
|
|
17
18
|
class PostbackEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when your LINE Official Account is blocked.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#unfollow-event
|
|
17
18
|
class UnfollowEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event object for when the user unsends a message.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#unsend-event
|
|
17
18
|
class UnsendEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#video-viewing-complete
|
|
14
15
|
class VideoPlayComplete
|
|
15
16
|
# @!attribute [rw] tracking_id
|
|
16
17
|
# @return [String] ID used to identify a video. Returns the same value as the trackingId assigned to the video message.
|
|
@@ -14,6 +14,7 @@ module Line
|
|
|
14
14
|
module V2
|
|
15
15
|
module Webhook
|
|
16
16
|
# Event for when a user finishes viewing a video at least once with the specified trackingId sent by the LINE Official Account.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#video-viewing-complete
|
|
17
18
|
class VideoPlayCompleteEvent < Event
|
|
18
19
|
# @!attribute [r] type
|
|
19
20
|
# @return [String] Type of the event
|
data/lib/line/bot/version.rb
CHANGED
|
@@ -199,7 +199,7 @@ module Line
|
|
|
199
199
|
# This requests to <code>POST https://api.line.me/v2/oauth/revoke</code>
|
|
200
200
|
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
201
201
|
#
|
|
202
|
-
# @param access_token [String]
|
|
202
|
+
# @param access_token [String] A short-lived or long-lived channel access token.
|
|
203
203
|
# @see https://developers.line.biz/en/reference/messaging-api/#revoke-longlived-or-shortlived-channel-access-token
|
|
204
204
|
# @return [Array((String|nil), Integer, Hash{String => String})] when HTTP status code is 200
|
|
205
205
|
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
|
@@ -214,7 +214,7 @@ module Line
|
|
|
214
214
|
# This requests to <code>POST https://api.line.me/v2/oauth/revoke</code>
|
|
215
215
|
# When you want to get HTTP status code or response headers, use {#revoke_channel_token_with_http_info} instead of this.
|
|
216
216
|
#
|
|
217
|
-
# @param access_token [String]
|
|
217
|
+
# @param access_token [String] A short-lived or long-lived channel access token.
|
|
218
218
|
# @see https://developers.line.biz/en/reference/messaging-api/#revoke-longlived-or-shortlived-channel-access-token
|
|
219
219
|
# @return [String, nil] when HTTP status code is 200
|
|
220
220
|
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module ChannelAccessToken
|
|
14
14
|
# Error response of the Channel access token
|
|
15
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#error-responses
|
|
15
16
|
class ErrorResponse
|
|
16
17
|
attr_accessor error: String?
|
|
17
18
|
attr_accessor error_description: String?
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module ChannelAccessToken
|
|
14
14
|
# Verification result
|
|
15
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#verify-channel-access-token-v2-1
|
|
15
16
|
class VerifyChannelAccessTokenResponse
|
|
16
17
|
attr_accessor client_id: String
|
|
17
18
|
attr_accessor expires_in: Integer
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Insight
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-demographic
|
|
14
15
|
class AgeTile
|
|
15
16
|
attr_accessor age: 'from0to14'|'from15to19'|'from20to24'|'from25to29'|'from30to34'|'from35to39'|'from40to44'|'from45to49'|'from50'|'from50to54'|'from55to59'|'from60to64'|'from65to69'|'from70'|'unknown'?
|
|
16
17
|
attr_accessor percentage: Float?
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Insight
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-insight-message-event-response
|
|
14
15
|
class GetMessageEventResponseMessage
|
|
15
16
|
attr_accessor seq: Integer?
|
|
16
17
|
attr_accessor impression: Integer?
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module Insight
|
|
14
14
|
# Summary of message statistics.
|
|
15
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-insight-message-event-response
|
|
15
16
|
class GetMessageEventResponseOverview
|
|
16
17
|
attr_accessor request_id: String?
|
|
17
18
|
attr_accessor timestamp: Integer?
|
|
@@ -11,6 +11,7 @@ module Line
|
|
|
11
11
|
module Bot
|
|
12
12
|
module V2
|
|
13
13
|
module Insight
|
|
14
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-demographic
|
|
14
15
|
class SubscriptionPeriodTile
|
|
15
16
|
attr_accessor subscription_period: 'within7days'|'within30days'|'within90days'|'within180days'|'within365days'|'over365days'|'unknown'?
|
|
16
17
|
attr_accessor percentage: Float?
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module ModuleAttach
|
|
14
14
|
# Attach by operation of the module channel provider
|
|
15
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#link-attach-by-operation-module-channel-provider
|
|
15
16
|
class AttachModuleResponse
|
|
16
17
|
attr_accessor bot_id: String
|
|
17
18
|
attr_accessor scopes: Array[String]
|
data/sig/line/bot/v2/utils.rbs
CHANGED
|
@@ -4,6 +4,10 @@ module Line
|
|
|
4
4
|
module Utils
|
|
5
5
|
NO_CAMELIZE_PARENT_KEYS: Array[String]
|
|
6
6
|
|
|
7
|
+
PATH_TRAVERSAL: Regexp
|
|
8
|
+
|
|
9
|
+
def self.build_path: (String, Hash[Symbol, untyped]) -> String
|
|
10
|
+
|
|
7
11
|
def self.deep_underscore: (Hash[untyped, untyped]) -> Hash[Symbol, untyped]
|
|
8
12
|
|
|
9
13
|
def self.deep_symbolize: (untyped) -> untyped
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
14
|
# Event object for when a user has linked their LINE account with a provider's service account. You can reply to account link events.
|
|
15
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#account-link-event
|
|
15
16
|
class AccountLinkEvent < Event
|
|
16
17
|
attr_reader type: String
|
|
17
18
|
attr_accessor source: Source?
|
|
@@ -12,6 +12,7 @@ module Line
|
|
|
12
12
|
module V2
|
|
13
13
|
module Webhook
|
|
14
14
|
# This event indicates that the module channel has been switched to Active Channel by calling the Acquire Control API. Sent to the webhook URL server of the module channel.
|
|
15
|
+
# @see https://developers.line.biz/en/reference/partner-docs/#activated-event
|
|
15
16
|
class ActivatedEvent < Event
|
|
16
17
|
attr_reader type: String
|
|
17
18
|
attr_accessor source: Source?
|