trophy_api_client 1.0.19 → 1.0.20
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/streak_response.rb +10 -2
- 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: a79a94b140eb840c0a0b4f40f855c69fbb66bb429977154f144ef1e5f1b37729
|
4
|
+
data.tar.gz: d712f9760544029301467b699433584ceaddf2faf12a3122475d1de9630ca7ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d14322f1451cc839c440cb727a5549439ae5c09f5869e09519db7a6bc0f562426acb200d67b1a11390d8b0a2af047ab60a1e7aea1de59c43a747db7f2c7b20
|
7
|
+
data.tar.gz: 53ea20d8432d15b2b64834927d74c1eba36b2912f10654325fbf81456ee68460442f523cc82af9b5077bcb0cc154d27cbac901c58e224e7a2255aa18da1d3d01
|
data/lib/gemconfig.rb
CHANGED
@@ -11,6 +11,8 @@ module TrophyApiClient
|
|
11
11
|
# @return [Array<TrophyApiClient::StreakResponseStreakHistoryItem>] A list of the user's past streak periods up through the current period. Each
|
12
12
|
# period includes the start and end dates and the length of the streak.
|
13
13
|
attr_reader :streak_history
|
14
|
+
# @return [Integer] The user's rank across all users. Null if the user has no active streak.
|
15
|
+
attr_reader :rank
|
14
16
|
# @return [Integer] The length of the user's current streak.
|
15
17
|
attr_reader :length
|
16
18
|
# @return [TrophyApiClient::StreakFrequency] The frequency of the streak.
|
@@ -33,6 +35,7 @@ module TrophyApiClient
|
|
33
35
|
|
34
36
|
# @param streak_history [Array<TrophyApiClient::StreakResponseStreakHistoryItem>] A list of the user's past streak periods up through the current period. Each
|
35
37
|
# period includes the start and end dates and the length of the streak.
|
38
|
+
# @param rank [Integer] The user's rank across all users. Null if the user has no active streak.
|
36
39
|
# @param length [Integer] The length of the user's current streak.
|
37
40
|
# @param frequency [TrophyApiClient::StreakFrequency] The frequency of the streak.
|
38
41
|
# @param started [String] The date the streak started.
|
@@ -41,9 +44,10 @@ module TrophyApiClient
|
|
41
44
|
# @param expires [String] The date the streak will expire if the user does not increment a metric.
|
42
45
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
43
46
|
# @return [TrophyApiClient::StreakResponse]
|
44
|
-
def initialize(length:, frequency:, streak_history: OMIT,
|
45
|
-
expires: OMIT, additional_properties: nil)
|
47
|
+
def initialize(length:, frequency:, streak_history: OMIT, rank: OMIT, started: OMIT, period_start: OMIT,
|
48
|
+
period_end: OMIT, expires: OMIT, additional_properties: nil)
|
46
49
|
@streak_history = streak_history if streak_history != OMIT
|
50
|
+
@rank = rank if rank != OMIT
|
47
51
|
@length = length
|
48
52
|
@frequency = frequency
|
49
53
|
@started = started if started != OMIT
|
@@ -53,6 +57,7 @@ module TrophyApiClient
|
|
53
57
|
@additional_properties = additional_properties
|
54
58
|
@_field_set = {
|
55
59
|
"streakHistory": streak_history,
|
60
|
+
"rank": rank,
|
56
61
|
"length": length,
|
57
62
|
"frequency": frequency,
|
58
63
|
"started": started,
|
@@ -75,6 +80,7 @@ module TrophyApiClient
|
|
75
80
|
item = item.to_json
|
76
81
|
TrophyApiClient::StreakResponseStreakHistoryItem.from_json(json_object: item)
|
77
82
|
end
|
83
|
+
rank = parsed_json["rank"]
|
78
84
|
length = parsed_json["length"]
|
79
85
|
frequency = parsed_json["frequency"]
|
80
86
|
started = parsed_json["started"]
|
@@ -83,6 +89,7 @@ module TrophyApiClient
|
|
83
89
|
expires = parsed_json["expires"]
|
84
90
|
new(
|
85
91
|
streak_history: streak_history,
|
92
|
+
rank: rank,
|
86
93
|
length: length,
|
87
94
|
frequency: frequency,
|
88
95
|
started: started,
|
@@ -108,6 +115,7 @@ module TrophyApiClient
|
|
108
115
|
# @return [Void]
|
109
116
|
def self.validate_raw(obj:)
|
110
117
|
obj.streak_history&.is_a?(Array) != false || raise("Passed value for field obj.streak_history is not the expected type, validation failed.")
|
118
|
+
obj.rank&.is_a?(Integer) != false || raise("Passed value for field obj.rank is not the expected type, validation failed.")
|
111
119
|
obj.length.is_a?(Integer) != false || raise("Passed value for field obj.length is not the expected type, validation failed.")
|
112
120
|
obj.frequency.is_a?(TrophyApiClient::StreakFrequency) != false || raise("Passed value for field obj.frequency is not the expected type, validation failed.")
|
113
121
|
obj.started&.is_a?(String) != false || raise("Passed value for field obj.started is not the expected type, validation failed.")
|