line-bot-api 2.8.3 → 2.10.0
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/insight/api/insight_client.rb +166 -0
- data/lib/line/bot/v2/insight/core.rb +10 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_daily_response.rb +97 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_bounds.rb +85 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_click.rb +79 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_daily_metrics.rb +79 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_impression.rb +73 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_summary_response.rb +97 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_bounds.rb +85 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_click.rb +73 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_impression.rb +67 -0
- data/lib/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_metrics.rb +73 -0
- data/lib/line/bot/v2/manage_audience/model/audience_group.rb +2 -2
- data/lib/line/bot/v2/webhook/core.rb +1 -0
- data/lib/line/bot/v2/webhook/model/event.rb +1 -0
- data/lib/line/bot/v2/webhook/model/message_edited_event.rb +110 -0
- data/lib/line/bot/version.rb +1 -1
- data/sig/line/bot/v2/insight/api/insight_client.rbs +92 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_daily_response.rbs +52 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_bounds.rbs +49 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_click.rbs +43 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_daily_metrics.rbs +46 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_daily_response_impression.rbs +40 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_summary_response.rbs +52 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_bounds.rbs +49 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_click.rbs +43 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_impression.rbs +40 -0
- data/sig/line/bot/v2/insight/model/get_rich_menu_insight_summary_response_metrics.rbs +43 -0
- data/sig/line/bot/v2/manage_audience/model/audience_group.rbs +3 -3
- data/sig/line/bot/v2/webhook/model/message_edited_event.rbs +60 -0
- metadata +23 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# LINE Messaging API(Insight)
|
|
2
|
+
# This document describes LINE Messaging API(Insight).
|
|
3
|
+
#
|
|
4
|
+
# The version of the OpenAPI document: 0.0.1
|
|
5
|
+
#
|
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
# https://openapi-generator.tech
|
|
8
|
+
# Do not edit the class manually.
|
|
9
|
+
|
|
10
|
+
module Line
|
|
11
|
+
module Bot
|
|
12
|
+
module V2
|
|
13
|
+
module Insight
|
|
14
|
+
# Summary of impression and click statistics for a rich menu created via the Messaging API.
|
|
15
|
+
class GetRichMenuInsightSummaryResponse
|
|
16
|
+
# @!attribute [rw] rich_menu_id
|
|
17
|
+
# @return [String] Rich menu ID.
|
|
18
|
+
attr_accessor :rich_menu_id
|
|
19
|
+
# @!attribute [rw] metrics_from
|
|
20
|
+
# @return [String,nil] Start date (JST) of the period actually covered by the returned metrics. Format: yyyyMMdd (e.g. 20260213).
|
|
21
|
+
attr_accessor :metrics_from
|
|
22
|
+
# @!attribute [rw] metrics_to
|
|
23
|
+
# @return [String,nil] End date (JST) of the period actually covered by the returned metrics. Format: yyyyMMdd (e.g. 20260215).
|
|
24
|
+
attr_accessor :metrics_to
|
|
25
|
+
# @!attribute [rw] impression
|
|
26
|
+
# @return [GetRichMenuInsightSummaryResponseImpression,nil]
|
|
27
|
+
attr_accessor :impression
|
|
28
|
+
# @!attribute [rw] clicks
|
|
29
|
+
# @return [Array[GetRichMenuInsightSummaryResponseClick],nil] Click metrics for each tappable area of the rich menu.
|
|
30
|
+
attr_accessor :clicks
|
|
31
|
+
|
|
32
|
+
# @param rich_menu_id [String] Rich menu ID.
|
|
33
|
+
# @param metrics_from [String,nil] Start date (JST) of the period actually covered by the returned metrics. Format: yyyyMMdd (e.g. 20260213).
|
|
34
|
+
# @param metrics_to [String,nil] End date (JST) of the period actually covered by the returned metrics. Format: yyyyMMdd (e.g. 20260215).
|
|
35
|
+
# @param impression [GetRichMenuInsightSummaryResponseImpression, Hash[Symbol, untyped], nil]
|
|
36
|
+
# @param clicks [Array[GetRichMenuInsightSummaryResponseClick, Hash[Symbol, untyped]],nil] Click metrics for each tappable area of the rich menu.
|
|
37
|
+
def initialize(
|
|
38
|
+
rich_menu_id:,
|
|
39
|
+
metrics_from: nil,
|
|
40
|
+
metrics_to: nil,
|
|
41
|
+
impression: nil,
|
|
42
|
+
clicks: nil,
|
|
43
|
+
**dynamic_attributes
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
@rich_menu_id = rich_menu_id
|
|
47
|
+
@metrics_from = metrics_from
|
|
48
|
+
@metrics_to = metrics_to
|
|
49
|
+
@impression = impression.is_a?(Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseImpression) || impression.nil? ? impression : Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseImpression.create(**impression)
|
|
50
|
+
@clicks = clicks&.map do |item|
|
|
51
|
+
if item.is_a?(Hash)
|
|
52
|
+
Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseClick.create(**item)
|
|
53
|
+
else
|
|
54
|
+
item
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
dynamic_attributes.each do |key, value|
|
|
59
|
+
self.class.attr_accessor key
|
|
60
|
+
|
|
61
|
+
if value.is_a?(Hash)
|
|
62
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
63
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
64
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
65
|
+
else
|
|
66
|
+
instance_variable_set("@#{key}", value)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Create an instance of the class from a hash
|
|
72
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
73
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponse] Instance of the class
|
|
74
|
+
def self.create(args)
|
|
75
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
76
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @param other [Object] Object to compare
|
|
80
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
81
|
+
def ==(other)
|
|
82
|
+
return false unless self.class == other.class
|
|
83
|
+
|
|
84
|
+
instance_variables.all? do |var|
|
|
85
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# @return [Integer] Hash code of the object
|
|
90
|
+
def hash
|
|
91
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# LINE Messaging API(Insight)
|
|
2
|
+
# This document describes LINE Messaging API(Insight).
|
|
3
|
+
#
|
|
4
|
+
# The version of the OpenAPI document: 0.0.1
|
|
5
|
+
#
|
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
# https://openapi-generator.tech
|
|
8
|
+
# Do not edit the class manually.
|
|
9
|
+
|
|
10
|
+
module Line
|
|
11
|
+
module Bot
|
|
12
|
+
module V2
|
|
13
|
+
module Insight
|
|
14
|
+
# Target area of the metrics, represented by the top-left coordinate, width, and height.
|
|
15
|
+
class GetRichMenuInsightSummaryResponseBounds
|
|
16
|
+
# @!attribute [rw] x
|
|
17
|
+
# @return [Integer] The x coordinate of the top-left corner of the target area.
|
|
18
|
+
attr_accessor :x
|
|
19
|
+
# @!attribute [rw] y
|
|
20
|
+
# @return [Integer] The y coordinate of the top-left corner of the target area.
|
|
21
|
+
attr_accessor :y
|
|
22
|
+
# @!attribute [rw] width
|
|
23
|
+
# @return [Integer] The width of the target area.
|
|
24
|
+
attr_accessor :width
|
|
25
|
+
# @!attribute [rw] height
|
|
26
|
+
# @return [Integer] The height of the target area.
|
|
27
|
+
attr_accessor :height
|
|
28
|
+
|
|
29
|
+
# @param x [Integer] The x coordinate of the top-left corner of the target area.
|
|
30
|
+
# @param y [Integer] The y coordinate of the top-left corner of the target area.
|
|
31
|
+
# @param width [Integer] The width of the target area.
|
|
32
|
+
# @param height [Integer] The height of the target area.
|
|
33
|
+
def initialize(
|
|
34
|
+
x:,
|
|
35
|
+
y:,
|
|
36
|
+
width:,
|
|
37
|
+
height:,
|
|
38
|
+
**dynamic_attributes
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
@x = x
|
|
42
|
+
@y = y
|
|
43
|
+
@width = width
|
|
44
|
+
@height = height
|
|
45
|
+
|
|
46
|
+
dynamic_attributes.each do |key, value|
|
|
47
|
+
self.class.attr_accessor key
|
|
48
|
+
|
|
49
|
+
if value.is_a?(Hash)
|
|
50
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
51
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
52
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
53
|
+
else
|
|
54
|
+
instance_variable_set("@#{key}", value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Create an instance of the class from a hash
|
|
60
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
61
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseBounds] Instance of the class
|
|
62
|
+
def self.create(args)
|
|
63
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
64
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @param other [Object] Object to compare
|
|
68
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
69
|
+
def ==(other)
|
|
70
|
+
return false unless self.class == other.class
|
|
71
|
+
|
|
72
|
+
instance_variables.all? do |var|
|
|
73
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @return [Integer] Hash code of the object
|
|
78
|
+
def hash
|
|
79
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# LINE Messaging API(Insight)
|
|
2
|
+
# This document describes LINE Messaging API(Insight).
|
|
3
|
+
#
|
|
4
|
+
# The version of the OpenAPI document: 0.0.1
|
|
5
|
+
#
|
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
# https://openapi-generator.tech
|
|
8
|
+
# Do not edit the class manually.
|
|
9
|
+
|
|
10
|
+
module Line
|
|
11
|
+
module Bot
|
|
12
|
+
module V2
|
|
13
|
+
module Insight
|
|
14
|
+
# Click metrics for a single tappable area of the rich menu.
|
|
15
|
+
class GetRichMenuInsightSummaryResponseClick
|
|
16
|
+
# @!attribute [rw] bounds
|
|
17
|
+
# @return [GetRichMenuInsightSummaryResponseBounds]
|
|
18
|
+
attr_accessor :bounds
|
|
19
|
+
# @!attribute [rw] metrics
|
|
20
|
+
# @return [GetRichMenuInsightSummaryResponseMetrics]
|
|
21
|
+
attr_accessor :metrics
|
|
22
|
+
|
|
23
|
+
# @param bounds [GetRichMenuInsightSummaryResponseBounds, Hash[Symbol, untyped]]
|
|
24
|
+
# @param metrics [GetRichMenuInsightSummaryResponseMetrics, Hash[Symbol, untyped]]
|
|
25
|
+
def initialize(
|
|
26
|
+
bounds:,
|
|
27
|
+
metrics:,
|
|
28
|
+
**dynamic_attributes
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
@bounds = bounds.is_a?(Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseBounds) ? bounds : Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseBounds.create(**bounds)
|
|
32
|
+
@metrics = metrics.is_a?(Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseMetrics) ? metrics : Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseMetrics.create(**metrics)
|
|
33
|
+
|
|
34
|
+
dynamic_attributes.each do |key, value|
|
|
35
|
+
self.class.attr_accessor key
|
|
36
|
+
|
|
37
|
+
if value.is_a?(Hash)
|
|
38
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
39
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
40
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
41
|
+
else
|
|
42
|
+
instance_variable_set("@#{key}", value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Create an instance of the class from a hash
|
|
48
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
49
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseClick] Instance of the class
|
|
50
|
+
def self.create(args)
|
|
51
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
52
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# @param other [Object] Object to compare
|
|
56
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
57
|
+
def ==(other)
|
|
58
|
+
return false unless self.class == other.class
|
|
59
|
+
|
|
60
|
+
instance_variables.all? do |var|
|
|
61
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @return [Integer] Hash code of the object
|
|
66
|
+
def hash
|
|
67
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# LINE Messaging API(Insight)
|
|
2
|
+
# This document describes LINE Messaging API(Insight).
|
|
3
|
+
#
|
|
4
|
+
# The version of the OpenAPI document: 0.0.1
|
|
5
|
+
#
|
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
# https://openapi-generator.tech
|
|
8
|
+
# Do not edit the class manually.
|
|
9
|
+
|
|
10
|
+
module Line
|
|
11
|
+
module Bot
|
|
12
|
+
module V2
|
|
13
|
+
module Insight
|
|
14
|
+
# Impression metrics for the whole rich menu.
|
|
15
|
+
class GetRichMenuInsightSummaryResponseImpression
|
|
16
|
+
# @!attribute [rw] metrics
|
|
17
|
+
# @return [GetRichMenuInsightSummaryResponseMetrics]
|
|
18
|
+
attr_accessor :metrics
|
|
19
|
+
|
|
20
|
+
# @param metrics [GetRichMenuInsightSummaryResponseMetrics, Hash[Symbol, untyped]]
|
|
21
|
+
def initialize(
|
|
22
|
+
metrics:,
|
|
23
|
+
**dynamic_attributes
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
@metrics = metrics.is_a?(Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseMetrics) ? metrics : Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseMetrics.create(**metrics)
|
|
27
|
+
|
|
28
|
+
dynamic_attributes.each do |key, value|
|
|
29
|
+
self.class.attr_accessor key
|
|
30
|
+
|
|
31
|
+
if value.is_a?(Hash)
|
|
32
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
33
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
34
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
35
|
+
else
|
|
36
|
+
instance_variable_set("@#{key}", value)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Create an instance of the class from a hash
|
|
42
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
43
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseImpression] Instance of the class
|
|
44
|
+
def self.create(args)
|
|
45
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
46
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# @param other [Object] Object to compare
|
|
50
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
51
|
+
def ==(other)
|
|
52
|
+
return false unless self.class == other.class
|
|
53
|
+
|
|
54
|
+
instance_variables.all? do |var|
|
|
55
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# @return [Integer] Hash code of the object
|
|
60
|
+
def hash
|
|
61
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# LINE Messaging API(Insight)
|
|
2
|
+
# This document describes LINE Messaging API(Insight).
|
|
3
|
+
#
|
|
4
|
+
# The version of the OpenAPI document: 0.0.1
|
|
5
|
+
#
|
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
# https://openapi-generator.tech
|
|
8
|
+
# Do not edit the class manually.
|
|
9
|
+
|
|
10
|
+
module Line
|
|
11
|
+
module Bot
|
|
12
|
+
module V2
|
|
13
|
+
module Insight
|
|
14
|
+
# Aggregated number of events and unique users over the whole period.
|
|
15
|
+
class GetRichMenuInsightSummaryResponseMetrics
|
|
16
|
+
# @!attribute [rw] count
|
|
17
|
+
# @return [Integer] Number of impressions or clicks.
|
|
18
|
+
attr_accessor :count
|
|
19
|
+
# @!attribute [rw] unique_users
|
|
20
|
+
# @return [Integer] Approximate number of unique users who triggered an impression or click.
|
|
21
|
+
attr_accessor :unique_users
|
|
22
|
+
|
|
23
|
+
# @param count [Integer] Number of impressions or clicks.
|
|
24
|
+
# @param unique_users [Integer] Approximate number of unique users who triggered an impression or click.
|
|
25
|
+
def initialize(
|
|
26
|
+
count:,
|
|
27
|
+
unique_users:,
|
|
28
|
+
**dynamic_attributes
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
@count = count
|
|
32
|
+
@unique_users = unique_users
|
|
33
|
+
|
|
34
|
+
dynamic_attributes.each do |key, value|
|
|
35
|
+
self.class.attr_accessor key
|
|
36
|
+
|
|
37
|
+
if value.is_a?(Hash)
|
|
38
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
39
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
40
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
41
|
+
else
|
|
42
|
+
instance_variable_set("@#{key}", value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Create an instance of the class from a hash
|
|
48
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
49
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponseMetrics] Instance of the class
|
|
50
|
+
def self.create(args)
|
|
51
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
52
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# @param other [Object] Object to compare
|
|
56
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
57
|
+
def ==(other)
|
|
58
|
+
return false unless self.class == other.class
|
|
59
|
+
|
|
60
|
+
instance_variables.all? do |var|
|
|
61
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @return [Integer] Hash code of the object
|
|
66
|
+
def hash
|
|
67
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -26,7 +26,7 @@ module Line
|
|
|
26
26
|
# @return [String,nil] ('IN_PROGRESS'|'READY'|'FAILED'|'EXPIRED'|'INACTIVE'|'ACTIVATING')
|
|
27
27
|
attr_accessor :status
|
|
28
28
|
# @!attribute [rw] failed_type
|
|
29
|
-
# @return [String,nil] ('AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT'|'INTERNAL_ERROR'
|
|
29
|
+
# @return [String,nil] ('AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT'|'INTERNAL_ERROR')
|
|
30
30
|
attr_accessor :failed_type
|
|
31
31
|
# @!attribute [rw] audience_count
|
|
32
32
|
# @return [Integer,nil] The number of users included in the audience.
|
|
@@ -54,7 +54,7 @@ module Line
|
|
|
54
54
|
# @param type [String,nil] ('UPLOAD'|'CLICK'|'IMP'|'CHAT_TAG'|'FRIEND_PATH'|'RESERVATION'|'APP_EVENT'|'VIDEO_VIEW'|'WEBTRAFFIC'|'IMAGE_CLICK'|'RICHMENU_IMP'|'RICHMENU_CLICK'|'POP_AD_IMP'|'TRACKINGTAG_WEBTRAFFIC')
|
|
55
55
|
# @param description [String,nil] The audience's name.
|
|
56
56
|
# @param status [String,nil] ('IN_PROGRESS'|'READY'|'FAILED'|'EXPIRED'|'INACTIVE'|'ACTIVATING')
|
|
57
|
-
# @param failed_type [String,nil] ('AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT'|'INTERNAL_ERROR'
|
|
57
|
+
# @param failed_type [String,nil] ('AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT'|'INTERNAL_ERROR')
|
|
58
58
|
# @param audience_count [Integer,nil] The number of users included in the audience.
|
|
59
59
|
# @param created [Integer,nil] When the audience was created (in UNIX time).
|
|
60
60
|
# @param request_id [String,nil] The request ID that was specified when the audience was created. This is only included when `audienceGroup.type` is CLICK or IMP.
|
|
@@ -48,6 +48,7 @@ require_relative './model/membership_event'
|
|
|
48
48
|
require_relative './model/mention'
|
|
49
49
|
require_relative './model/mentionee'
|
|
50
50
|
require_relative './model/message_content'
|
|
51
|
+
require_relative './model/message_edited_event'
|
|
51
52
|
require_relative './model/message_event'
|
|
52
53
|
require_relative './model/module_content'
|
|
53
54
|
require_relative './model/module_event'
|
|
@@ -109,6 +109,7 @@ module Line
|
|
|
109
109
|
memberJoined: Line::Bot::V2::Webhook::MemberJoinedEvent,
|
|
110
110
|
memberLeft: Line::Bot::V2::Webhook::MemberLeftEvent,
|
|
111
111
|
membership: Line::Bot::V2::Webhook::MembershipEvent,
|
|
112
|
+
messageEdited: Line::Bot::V2::Webhook::MessageEditedEvent,
|
|
112
113
|
message: Line::Bot::V2::Webhook::MessageEvent,
|
|
113
114
|
module: Line::Bot::V2::Webhook::ModuleEvent,
|
|
114
115
|
delivery: Line::Bot::V2::Webhook::PnpDeliveryCompletionEvent,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Webhook Type Definition
|
|
2
|
+
# Webhook event definition of the LINE Messaging API
|
|
3
|
+
#
|
|
4
|
+
# The version of the OpenAPI document: 1.0.0
|
|
5
|
+
#
|
|
6
|
+
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
# https://openapi-generator.tech
|
|
8
|
+
# Do not edit the class manually.
|
|
9
|
+
|
|
10
|
+
require_relative './event'
|
|
11
|
+
|
|
12
|
+
module Line
|
|
13
|
+
module Bot
|
|
14
|
+
module V2
|
|
15
|
+
module Webhook
|
|
16
|
+
# Webhook event object which contains the edited message. This event is triggered when a user edits a text message. Currently, message editing is not available in one-on-one chats with LINE Official Accounts, so this event is only triggered in group chats. Multiple messageEdited webhook events may arrive out of order. The event with the largest timestamp represents the latest edit state.
|
|
17
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#edit-event
|
|
18
|
+
class MessageEditedEvent < Event
|
|
19
|
+
# @!attribute [r] type
|
|
20
|
+
# @return [String] Type of the event
|
|
21
|
+
attr_reader :type
|
|
22
|
+
# @!attribute [rw] source
|
|
23
|
+
# @return [Source,nil]
|
|
24
|
+
attr_accessor :source
|
|
25
|
+
# @!attribute [rw] timestamp
|
|
26
|
+
# @return [Integer] Time of the event in milliseconds.
|
|
27
|
+
attr_accessor :timestamp
|
|
28
|
+
# @!attribute [rw] mode
|
|
29
|
+
# @return [String] ('active'|'standby')
|
|
30
|
+
attr_accessor :mode
|
|
31
|
+
# @!attribute [rw] webhook_event_id
|
|
32
|
+
# @return [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
|
|
33
|
+
attr_accessor :webhook_event_id
|
|
34
|
+
# @!attribute [rw] delivery_context
|
|
35
|
+
# @return [DeliveryContext]
|
|
36
|
+
attr_accessor :delivery_context
|
|
37
|
+
# @!attribute [rw] reply_token
|
|
38
|
+
# @return [String,nil]
|
|
39
|
+
attr_accessor :reply_token
|
|
40
|
+
# @!attribute [rw] message
|
|
41
|
+
# @return [MessageContent]
|
|
42
|
+
attr_accessor :message
|
|
43
|
+
|
|
44
|
+
# @param source [Source, Hash[Symbol, untyped], nil]
|
|
45
|
+
# @param timestamp [Integer] Time of the event in milliseconds.
|
|
46
|
+
# @param mode [String] ('active'|'standby')
|
|
47
|
+
# @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
|
|
48
|
+
# @param delivery_context [DeliveryContext, Hash[Symbol, untyped]]
|
|
49
|
+
# @param reply_token [String,nil]
|
|
50
|
+
# @param message [MessageContent, Hash[Symbol, untyped]]
|
|
51
|
+
def initialize(
|
|
52
|
+
source: nil,
|
|
53
|
+
timestamp:,
|
|
54
|
+
mode:,
|
|
55
|
+
webhook_event_id:,
|
|
56
|
+
delivery_context:,
|
|
57
|
+
reply_token: nil,
|
|
58
|
+
message:,
|
|
59
|
+
**dynamic_attributes
|
|
60
|
+
)
|
|
61
|
+
@type = "messageEdited"
|
|
62
|
+
|
|
63
|
+
@source = source.is_a?(Line::Bot::V2::Webhook::Source) || source.nil? ? source : Line::Bot::V2::Webhook::Source.create(**source)
|
|
64
|
+
@timestamp = timestamp
|
|
65
|
+
@mode = mode
|
|
66
|
+
@webhook_event_id = webhook_event_id
|
|
67
|
+
@delivery_context = delivery_context.is_a?(Line::Bot::V2::Webhook::DeliveryContext) ? delivery_context : Line::Bot::V2::Webhook::DeliveryContext.create(**delivery_context)
|
|
68
|
+
@reply_token = reply_token
|
|
69
|
+
@message = message.is_a?(Line::Bot::V2::Webhook::MessageContent) ? message : Line::Bot::V2::Webhook::MessageContent.create(**message)
|
|
70
|
+
|
|
71
|
+
dynamic_attributes.each do |key, value|
|
|
72
|
+
self.class.attr_accessor key
|
|
73
|
+
|
|
74
|
+
if value.is_a?(Hash)
|
|
75
|
+
struct_klass = Struct.new(*value.keys.map(&:to_sym))
|
|
76
|
+
struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v }
|
|
77
|
+
instance_variable_set("@#{key}", struct_klass.new(*struct_values))
|
|
78
|
+
else
|
|
79
|
+
instance_variable_set("@#{key}", value)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Create an instance of the class from a hash
|
|
85
|
+
# @param args [Hash] Hash containing all the required attributes
|
|
86
|
+
# @return [Line::Bot::V2::Webhook::MessageEditedEvent] Instance of the class
|
|
87
|
+
def self.create(args)
|
|
88
|
+
symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args)
|
|
89
|
+
return new(**symbolized_args) # steep:ignore InsufficientKeywordArguments
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# @param other [Object] Object to compare
|
|
93
|
+
# @return [Boolean] true if the objects are equal, false otherwise
|
|
94
|
+
def ==(other)
|
|
95
|
+
return false unless self.class == other.class
|
|
96
|
+
|
|
97
|
+
instance_variables.all? do |var|
|
|
98
|
+
instance_variable_get(var) == other.instance_variable_get(var)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# @return [Integer] Hash code of the object
|
|
103
|
+
def hash
|
|
104
|
+
[self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
data/lib/line/bot/version.rb
CHANGED
|
@@ -152,6 +152,98 @@ module Line
|
|
|
152
152
|
| String? # otherwise
|
|
153
153
|
)
|
|
154
154
|
|
|
155
|
+
# Gets rich menu statistics broken down by day for the specified period, for a rich menu created via the Messaging API. Returns the daily impression count for the whole rich menu and the daily click count for each tappable area. When the total number of unique clicks during the period is below the privacy threshold, only `richMenuId` is returned and the other fields are omitted.
|
|
156
|
+
# This requests to <code>GET https://api.line.me/v2/bot/insight/richmenu/{richMenuId}/daily</code>
|
|
157
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
158
|
+
#
|
|
159
|
+
# @param rich_menu_id [String] ID of the rich menu created via the Messaging API.
|
|
160
|
+
# @param from [String] Start date of the aggregation period (inclusive). Must be within the most recent 3 years. Format: yyyyMMdd (e.g. 20260213) Time zone: UTC+9
|
|
161
|
+
# @param to [String] End date of the aggregation period (inclusive). The end date can be specified for up to 99 days after the start date. Format: yyyyMMdd (e.g. 20260215) Time zone: UTC+9
|
|
162
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-insight-daily
|
|
163
|
+
# @return [Array(Line::Bot::V2::Insight::GetRichMenuInsightDailyResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
|
164
|
+
# @return [Array(Line::Bot::V2::Insight::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
|
165
|
+
# @return [Array(Line::Bot::V2::Insight::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
|
|
166
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
|
167
|
+
def get_rich_menu_insight_daily_with_http_info: (
|
|
168
|
+
rich_menu_id: String,
|
|
169
|
+
from: String,
|
|
170
|
+
to: String
|
|
171
|
+
) -> (
|
|
172
|
+
[GetRichMenuInsightDailyResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
|
|
173
|
+
| [ErrorResponse, 400, Hash[untyped, untyped]] # when HTTP status code is 400
|
|
174
|
+
| [ErrorResponse, 404, Hash[untyped, untyped]] # when HTTP status code is 404
|
|
175
|
+
| [String?, Integer, Hash[untyped, untyped]] # otherwise
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
# Gets rich menu statistics broken down by day for the specified period, for a rich menu created via the Messaging API. Returns the daily impression count for the whole rich menu and the daily click count for each tappable area. When the total number of unique clicks during the period is below the privacy threshold, only `richMenuId` is returned and the other fields are omitted.
|
|
179
|
+
# This requests to <code>GET https://api.line.me/v2/bot/insight/richmenu/{richMenuId}/daily</code>
|
|
180
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_insight_daily_with_http_info} instead of this.
|
|
181
|
+
#
|
|
182
|
+
# @param rich_menu_id [String] ID of the rich menu created via the Messaging API.
|
|
183
|
+
# @param from [String] Start date of the aggregation period (inclusive). Must be within the most recent 3 years. Format: yyyyMMdd (e.g. 20260213) Time zone: UTC+9
|
|
184
|
+
# @param to [String] End date of the aggregation period (inclusive). The end date can be specified for up to 99 days after the start date. Format: yyyyMMdd (e.g. 20260215) Time zone: UTC+9
|
|
185
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-insight-daily
|
|
186
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightDailyResponse] when HTTP status code is 200
|
|
187
|
+
# @return [Line::Bot::V2::Insight::ErrorResponse] when HTTP status code is 400
|
|
188
|
+
# @return [Line::Bot::V2::Insight::ErrorResponse] when HTTP status code is 404
|
|
189
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
|
190
|
+
def get_rich_menu_insight_daily: (
|
|
191
|
+
rich_menu_id: String,
|
|
192
|
+
from: String,
|
|
193
|
+
to: String
|
|
194
|
+
) -> (
|
|
195
|
+
GetRichMenuInsightDailyResponse # when HTTP status code is 200
|
|
196
|
+
| ErrorResponse # when HTTP status code is 400
|
|
197
|
+
| ErrorResponse # when HTTP status code is 404
|
|
198
|
+
| String? # otherwise
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
# Gets a summary of rich menu statistics for the specified period, for a rich menu created via the Messaging API. Returns the total impression count for the whole rich menu and the click count for each tappable area, aggregated over the entire period as a single result. When the total number of unique clicks during the period is below the privacy threshold, only `richMenuId` is returned and the other fields are omitted.
|
|
202
|
+
# This requests to <code>GET https://api.line.me/v2/bot/insight/richmenu/{richMenuId}/summary</code>
|
|
203
|
+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|
|
204
|
+
#
|
|
205
|
+
# @param rich_menu_id [String] ID of the rich menu created via the Messaging API.
|
|
206
|
+
# @param from [String] Start date of the aggregation period (inclusive). Must be within the most recent 3 years. Format: yyyyMMdd (e.g. 20260213) Time zone: UTC+9
|
|
207
|
+
# @param to [String] End date of the aggregation period (inclusive). The end date can be specified for up to 396 days after the start date. Format: yyyyMMdd (e.g. 20260215) Time zone: UTC+9
|
|
208
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-insight-summary
|
|
209
|
+
# @return [Array(Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponse, Integer, Hash{String => String})] when HTTP status code is 200
|
|
210
|
+
# @return [Array(Line::Bot::V2::Insight::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400
|
|
211
|
+
# @return [Array(Line::Bot::V2::Insight::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 404
|
|
212
|
+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
|
|
213
|
+
def get_rich_menu_insight_summary_with_http_info: (
|
|
214
|
+
rich_menu_id: String,
|
|
215
|
+
from: String,
|
|
216
|
+
to: String
|
|
217
|
+
) -> (
|
|
218
|
+
[GetRichMenuInsightSummaryResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
|
|
219
|
+
| [ErrorResponse, 400, Hash[untyped, untyped]] # when HTTP status code is 400
|
|
220
|
+
| [ErrorResponse, 404, Hash[untyped, untyped]] # when HTTP status code is 404
|
|
221
|
+
| [String?, Integer, Hash[untyped, untyped]] # otherwise
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
# Gets a summary of rich menu statistics for the specified period, for a rich menu created via the Messaging API. Returns the total impression count for the whole rich menu and the click count for each tappable area, aggregated over the entire period as a single result. When the total number of unique clicks during the period is below the privacy threshold, only `richMenuId` is returned and the other fields are omitted.
|
|
225
|
+
# This requests to <code>GET https://api.line.me/v2/bot/insight/richmenu/{richMenuId}/summary</code>
|
|
226
|
+
# When you want to get HTTP status code or response headers, use {#get_rich_menu_insight_summary_with_http_info} instead of this.
|
|
227
|
+
#
|
|
228
|
+
# @param rich_menu_id [String] ID of the rich menu created via the Messaging API.
|
|
229
|
+
# @param from [String] Start date of the aggregation period (inclusive). Must be within the most recent 3 years. Format: yyyyMMdd (e.g. 20260213) Time zone: UTC+9
|
|
230
|
+
# @param to [String] End date of the aggregation period (inclusive). The end date can be specified for up to 396 days after the start date. Format: yyyyMMdd (e.g. 20260215) Time zone: UTC+9
|
|
231
|
+
# @see https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-insight-summary
|
|
232
|
+
# @return [Line::Bot::V2::Insight::GetRichMenuInsightSummaryResponse] when HTTP status code is 200
|
|
233
|
+
# @return [Line::Bot::V2::Insight::ErrorResponse] when HTTP status code is 400
|
|
234
|
+
# @return [Line::Bot::V2::Insight::ErrorResponse] when HTTP status code is 404
|
|
235
|
+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
|
|
236
|
+
def get_rich_menu_insight_summary: (
|
|
237
|
+
rich_menu_id: String,
|
|
238
|
+
from: String,
|
|
239
|
+
to: String
|
|
240
|
+
) -> (
|
|
241
|
+
GetRichMenuInsightSummaryResponse # when HTTP status code is 200
|
|
242
|
+
| ErrorResponse # when HTTP status code is 400
|
|
243
|
+
| ErrorResponse # when HTTP status code is 404
|
|
244
|
+
| String? # otherwise
|
|
245
|
+
)
|
|
246
|
+
|
|
155
247
|
# You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.
|
|
156
248
|
# This requests to <code>GET https://api.line.me/v2/bot/insight/message/event/aggregation</code>
|
|
157
249
|
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
|