trophy_api_client 1.1.0 → 1.1.2
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/gemconfig.rb +1 -1
- data/lib/trophy_api_client/types/achievement_response.rb +11 -1
- data/lib/trophy_api_client/types/achievement_response_trigger.rb +1 -0
- data/lib/trophy_api_client/types/achievement_with_stats_response.rb +11 -1
- data/lib/trophy_api_client/types/user_achievement_response.rb +11 -1
- data/lib/trophy_api_client/types/user_achievement_with_stats_response.rb +11 -1
- data/lib/trophy_api_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97da192c802d186875e81388f3968949a9b0f024a8478ee8d5baf28e1c219175
|
|
4
|
+
data.tar.gz: d1edd13e0be799fff70fc6e57d8d1bee94c293263e7f010ef413c48a019c4318
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 443da8a6cc5b0c65e11fcbe5966fe2e2db448626153288d46348c00369c4eac5d1a04a136bcc15a121da46e2fec33e2f37f614601b9faa7448b51d39c2e7fdf1
|
|
7
|
+
data.tar.gz: cc7f1ed682b50720fc52356c3985aa24f7b68da236bdd1fc2a5e0b8ba3087ed19f4f0db232366c6886a5cd6b061d1dc73973a12885a523f545743c97515242cb
|
data/lib/gemconfig.rb
CHANGED
|
@@ -24,6 +24,9 @@ module TrophyApiClient
|
|
|
24
24
|
# @return [Integer] The length of the streak required to complete the achievement (only applicable
|
|
25
25
|
# if trigger = 'streak')
|
|
26
26
|
attr_reader :streak_length
|
|
27
|
+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
28
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
29
|
+
attr_reader :achievement_ids
|
|
27
30
|
# @return [String] The ID of the metric associated with this achievement (only applicable if
|
|
28
31
|
# trigger = 'metric')
|
|
29
32
|
attr_reader :metric_id
|
|
@@ -56,6 +59,8 @@ module TrophyApiClient
|
|
|
56
59
|
# trigger = 'api')
|
|
57
60
|
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
|
|
58
61
|
# if trigger = 'streak')
|
|
62
|
+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
63
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
59
64
|
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
|
|
60
65
|
# trigger = 'metric')
|
|
61
66
|
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
|
|
@@ -69,7 +74,7 @@ module TrophyApiClient
|
|
|
69
74
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
70
75
|
# @return [TrophyApiClient::AchievementResponse]
|
|
71
76
|
def initialize(id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OMIT, streak_length: OMIT,
|
|
72
|
-
metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
77
|
+
achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
73
78
|
@id = id
|
|
74
79
|
@name = name
|
|
75
80
|
@trigger = trigger
|
|
@@ -77,6 +82,7 @@ module TrophyApiClient
|
|
|
77
82
|
@badge_url = badge_url if badge_url != OMIT
|
|
78
83
|
@key = key if key != OMIT
|
|
79
84
|
@streak_length = streak_length if streak_length != OMIT
|
|
85
|
+
@achievement_ids = achievement_ids if achievement_ids != OMIT
|
|
80
86
|
@metric_id = metric_id if metric_id != OMIT
|
|
81
87
|
@metric_value = metric_value if metric_value != OMIT
|
|
82
88
|
@metric_name = metric_name if metric_name != OMIT
|
|
@@ -91,6 +97,7 @@ module TrophyApiClient
|
|
|
91
97
|
"badgeUrl": badge_url,
|
|
92
98
|
"key": key,
|
|
93
99
|
"streakLength": streak_length,
|
|
100
|
+
"achievementIds": achievement_ids,
|
|
94
101
|
"metricId": metric_id,
|
|
95
102
|
"metricValue": metric_value,
|
|
96
103
|
"metricName": metric_name,
|
|
@@ -115,6 +122,7 @@ module TrophyApiClient
|
|
|
115
122
|
badge_url = parsed_json["badgeUrl"]
|
|
116
123
|
key = parsed_json["key"]
|
|
117
124
|
streak_length = parsed_json["streakLength"]
|
|
125
|
+
achievement_ids = parsed_json["achievementIds"]
|
|
118
126
|
metric_id = parsed_json["metricId"]
|
|
119
127
|
metric_value = parsed_json["metricValue"]
|
|
120
128
|
metric_name = parsed_json["metricName"]
|
|
@@ -136,6 +144,7 @@ module TrophyApiClient
|
|
|
136
144
|
badge_url: badge_url,
|
|
137
145
|
key: key,
|
|
138
146
|
streak_length: streak_length,
|
|
147
|
+
achievement_ids: achievement_ids,
|
|
139
148
|
metric_id: metric_id,
|
|
140
149
|
metric_value: metric_value,
|
|
141
150
|
metric_name: metric_name,
|
|
@@ -166,6 +175,7 @@ module TrophyApiClient
|
|
|
166
175
|
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
|
|
167
176
|
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
168
177
|
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
|
|
178
|
+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
|
|
169
179
|
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
|
|
170
180
|
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
|
|
171
181
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
@@ -28,6 +28,9 @@ module TrophyApiClient
|
|
|
28
28
|
# @return [Integer] The length of the streak required to complete the achievement (only applicable
|
|
29
29
|
# if trigger = 'streak')
|
|
30
30
|
attr_reader :streak_length
|
|
31
|
+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
32
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
33
|
+
attr_reader :achievement_ids
|
|
31
34
|
# @return [String] The ID of the metric associated with this achievement (only applicable if
|
|
32
35
|
# trigger = 'metric')
|
|
33
36
|
attr_reader :metric_id
|
|
@@ -62,6 +65,8 @@ module TrophyApiClient
|
|
|
62
65
|
# trigger = 'api')
|
|
63
66
|
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
|
|
64
67
|
# if trigger = 'streak')
|
|
68
|
+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
69
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
65
70
|
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
|
|
66
71
|
# trigger = 'metric')
|
|
67
72
|
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
|
|
@@ -75,7 +80,7 @@ module TrophyApiClient
|
|
|
75
80
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
76
81
|
# @return [TrophyApiClient::AchievementWithStatsResponse]
|
|
77
82
|
def initialize(completions:, rarity:, id:, name:, trigger:, description: OMIT, badge_url: OMIT, key: OMIT,
|
|
78
|
-
streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
83
|
+
streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
79
84
|
@completions = completions
|
|
80
85
|
@rarity = rarity
|
|
81
86
|
@id = id
|
|
@@ -85,6 +90,7 @@ module TrophyApiClient
|
|
|
85
90
|
@badge_url = badge_url if badge_url != OMIT
|
|
86
91
|
@key = key if key != OMIT
|
|
87
92
|
@streak_length = streak_length if streak_length != OMIT
|
|
93
|
+
@achievement_ids = achievement_ids if achievement_ids != OMIT
|
|
88
94
|
@metric_id = metric_id if metric_id != OMIT
|
|
89
95
|
@metric_value = metric_value if metric_value != OMIT
|
|
90
96
|
@metric_name = metric_name if metric_name != OMIT
|
|
@@ -101,6 +107,7 @@ module TrophyApiClient
|
|
|
101
107
|
"badgeUrl": badge_url,
|
|
102
108
|
"key": key,
|
|
103
109
|
"streakLength": streak_length,
|
|
110
|
+
"achievementIds": achievement_ids,
|
|
104
111
|
"metricId": metric_id,
|
|
105
112
|
"metricValue": metric_value,
|
|
106
113
|
"metricName": metric_name,
|
|
@@ -127,6 +134,7 @@ module TrophyApiClient
|
|
|
127
134
|
badge_url = parsed_json["badgeUrl"]
|
|
128
135
|
key = parsed_json["key"]
|
|
129
136
|
streak_length = parsed_json["streakLength"]
|
|
137
|
+
achievement_ids = parsed_json["achievementIds"]
|
|
130
138
|
metric_id = parsed_json["metricId"]
|
|
131
139
|
metric_value = parsed_json["metricValue"]
|
|
132
140
|
metric_name = parsed_json["metricName"]
|
|
@@ -150,6 +158,7 @@ module TrophyApiClient
|
|
|
150
158
|
badge_url: badge_url,
|
|
151
159
|
key: key,
|
|
152
160
|
streak_length: streak_length,
|
|
161
|
+
achievement_ids: achievement_ids,
|
|
153
162
|
metric_id: metric_id,
|
|
154
163
|
metric_value: metric_value,
|
|
155
164
|
metric_name: metric_name,
|
|
@@ -182,6 +191,7 @@ module TrophyApiClient
|
|
|
182
191
|
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
|
|
183
192
|
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
184
193
|
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
|
|
194
|
+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
|
|
185
195
|
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
|
|
186
196
|
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
|
|
187
197
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
@@ -28,6 +28,9 @@ module TrophyApiClient
|
|
|
28
28
|
# @return [Integer] The length of the streak required to complete the achievement (only applicable
|
|
29
29
|
# if trigger = 'streak')
|
|
30
30
|
attr_reader :streak_length
|
|
31
|
+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
32
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
33
|
+
attr_reader :achievement_ids
|
|
31
34
|
# @return [String] The ID of the metric associated with this achievement (only applicable if
|
|
32
35
|
# trigger = 'metric')
|
|
33
36
|
attr_reader :metric_id
|
|
@@ -62,6 +65,8 @@ module TrophyApiClient
|
|
|
62
65
|
# trigger = 'api')
|
|
63
66
|
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
|
|
64
67
|
# if trigger = 'streak')
|
|
68
|
+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
69
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
65
70
|
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
|
|
66
71
|
# trigger = 'metric')
|
|
67
72
|
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
|
|
@@ -75,7 +80,7 @@ module TrophyApiClient
|
|
|
75
80
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
76
81
|
# @return [TrophyApiClient::UserAchievementResponse]
|
|
77
82
|
def initialize(id:, name:, trigger:, achieved_at: OMIT, description: OMIT, badge_url: OMIT, key: OMIT,
|
|
78
|
-
streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
83
|
+
streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
79
84
|
@achieved_at = achieved_at if achieved_at != OMIT
|
|
80
85
|
@id = id
|
|
81
86
|
@name = name
|
|
@@ -84,6 +89,7 @@ module TrophyApiClient
|
|
|
84
89
|
@badge_url = badge_url if badge_url != OMIT
|
|
85
90
|
@key = key if key != OMIT
|
|
86
91
|
@streak_length = streak_length if streak_length != OMIT
|
|
92
|
+
@achievement_ids = achievement_ids if achievement_ids != OMIT
|
|
87
93
|
@metric_id = metric_id if metric_id != OMIT
|
|
88
94
|
@metric_value = metric_value if metric_value != OMIT
|
|
89
95
|
@metric_name = metric_name if metric_name != OMIT
|
|
@@ -99,6 +105,7 @@ module TrophyApiClient
|
|
|
99
105
|
"badgeUrl": badge_url,
|
|
100
106
|
"key": key,
|
|
101
107
|
"streakLength": streak_length,
|
|
108
|
+
"achievementIds": achievement_ids,
|
|
102
109
|
"metricId": metric_id,
|
|
103
110
|
"metricValue": metric_value,
|
|
104
111
|
"metricName": metric_name,
|
|
@@ -124,6 +131,7 @@ module TrophyApiClient
|
|
|
124
131
|
badge_url = parsed_json["badgeUrl"]
|
|
125
132
|
key = parsed_json["key"]
|
|
126
133
|
streak_length = parsed_json["streakLength"]
|
|
134
|
+
achievement_ids = parsed_json["achievementIds"]
|
|
127
135
|
metric_id = parsed_json["metricId"]
|
|
128
136
|
metric_value = parsed_json["metricValue"]
|
|
129
137
|
metric_name = parsed_json["metricName"]
|
|
@@ -146,6 +154,7 @@ module TrophyApiClient
|
|
|
146
154
|
badge_url: badge_url,
|
|
147
155
|
key: key,
|
|
148
156
|
streak_length: streak_length,
|
|
157
|
+
achievement_ids: achievement_ids,
|
|
149
158
|
metric_id: metric_id,
|
|
150
159
|
metric_value: metric_value,
|
|
151
160
|
metric_name: metric_name,
|
|
@@ -177,6 +186,7 @@ module TrophyApiClient
|
|
|
177
186
|
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
|
|
178
187
|
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
179
188
|
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
|
|
189
|
+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
|
|
180
190
|
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
|
|
181
191
|
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
|
|
182
192
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|
|
@@ -32,6 +32,9 @@ module TrophyApiClient
|
|
|
32
32
|
# @return [Integer] The length of the streak required to complete the achievement (only applicable
|
|
33
33
|
# if trigger = 'streak')
|
|
34
34
|
attr_reader :streak_length
|
|
35
|
+
# @return [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
36
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
37
|
+
attr_reader :achievement_ids
|
|
35
38
|
# @return [String] The ID of the metric associated with this achievement (only applicable if
|
|
36
39
|
# trigger = 'metric')
|
|
37
40
|
attr_reader :metric_id
|
|
@@ -68,6 +71,8 @@ module TrophyApiClient
|
|
|
68
71
|
# trigger = 'api')
|
|
69
72
|
# @param streak_length [Integer] The length of the streak required to complete the achievement (only applicable
|
|
70
73
|
# if trigger = 'streak')
|
|
74
|
+
# @param achievement_ids [Array<String>] The IDs of the prerequisite achievements that must be completed to earn this
|
|
75
|
+
# achievement (only applicable if trigger = 'achievement')
|
|
71
76
|
# @param metric_id [String] The ID of the metric associated with this achievement (only applicable if
|
|
72
77
|
# trigger = 'metric')
|
|
73
78
|
# @param metric_value [Float] The value of the metric required to complete the achievement (only applicable if
|
|
@@ -81,7 +86,7 @@ module TrophyApiClient
|
|
|
81
86
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
82
87
|
# @return [TrophyApiClient::UserAchievementWithStatsResponse]
|
|
83
88
|
def initialize(completions:, rarity:, id:, name:, trigger:, achieved_at: OMIT, description: OMIT, badge_url: OMIT,
|
|
84
|
-
key: OMIT, streak_length: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
89
|
+
key: OMIT, streak_length: OMIT, achievement_ids: OMIT, metric_id: OMIT, metric_value: OMIT, metric_name: OMIT, user_attributes: OMIT, event_attribute: OMIT, additional_properties: nil)
|
|
85
90
|
@achieved_at = achieved_at if achieved_at != OMIT
|
|
86
91
|
@completions = completions
|
|
87
92
|
@rarity = rarity
|
|
@@ -92,6 +97,7 @@ module TrophyApiClient
|
|
|
92
97
|
@badge_url = badge_url if badge_url != OMIT
|
|
93
98
|
@key = key if key != OMIT
|
|
94
99
|
@streak_length = streak_length if streak_length != OMIT
|
|
100
|
+
@achievement_ids = achievement_ids if achievement_ids != OMIT
|
|
95
101
|
@metric_id = metric_id if metric_id != OMIT
|
|
96
102
|
@metric_value = metric_value if metric_value != OMIT
|
|
97
103
|
@metric_name = metric_name if metric_name != OMIT
|
|
@@ -109,6 +115,7 @@ module TrophyApiClient
|
|
|
109
115
|
"badgeUrl": badge_url,
|
|
110
116
|
"key": key,
|
|
111
117
|
"streakLength": streak_length,
|
|
118
|
+
"achievementIds": achievement_ids,
|
|
112
119
|
"metricId": metric_id,
|
|
113
120
|
"metricValue": metric_value,
|
|
114
121
|
"metricName": metric_name,
|
|
@@ -136,6 +143,7 @@ module TrophyApiClient
|
|
|
136
143
|
badge_url = parsed_json["badgeUrl"]
|
|
137
144
|
key = parsed_json["key"]
|
|
138
145
|
streak_length = parsed_json["streakLength"]
|
|
146
|
+
achievement_ids = parsed_json["achievementIds"]
|
|
139
147
|
metric_id = parsed_json["metricId"]
|
|
140
148
|
metric_value = parsed_json["metricValue"]
|
|
141
149
|
metric_name = parsed_json["metricName"]
|
|
@@ -160,6 +168,7 @@ module TrophyApiClient
|
|
|
160
168
|
badge_url: badge_url,
|
|
161
169
|
key: key,
|
|
162
170
|
streak_length: streak_length,
|
|
171
|
+
achievement_ids: achievement_ids,
|
|
163
172
|
metric_id: metric_id,
|
|
164
173
|
metric_value: metric_value,
|
|
165
174
|
metric_name: metric_name,
|
|
@@ -193,6 +202,7 @@ module TrophyApiClient
|
|
|
193
202
|
obj.badge_url&.is_a?(String) != false || raise("Passed value for field obj.badge_url is not the expected type, validation failed.")
|
|
194
203
|
obj.key&.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
|
195
204
|
obj.streak_length&.is_a?(Integer) != false || raise("Passed value for field obj.streak_length is not the expected type, validation failed.")
|
|
205
|
+
obj.achievement_ids&.is_a?(Array) != false || raise("Passed value for field obj.achievement_ids is not the expected type, validation failed.")
|
|
196
206
|
obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
|
|
197
207
|
obj.metric_value&.is_a?(Float) != false || raise("Passed value for field obj.metric_value is not the expected type, validation failed.")
|
|
198
208
|
obj.metric_name&.is_a?(String) != false || raise("Passed value for field obj.metric_name is not the expected type, validation failed.")
|