trophy_api_client 1.9.1 → 1.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47cc87798ef4a44528e28b7b12da849367e30237f717552a056535bcbf91392b
4
- data.tar.gz: 68803b1980e19b5e3919205bd1bd350fb879f066028ec183431d2c3b72a37d5f
3
+ metadata.gz: 85edf38a9fc0522a22a62f4e7ad27600c2e1b7376c0fc951d67f2ce590a8fe93
4
+ data.tar.gz: a5306d1ea30e6ead932faa97c59ca02dca59106e4364c5e715ff45c319913b36
5
5
  SHA512:
6
- metadata.gz: 0e5876b7c92ba8f450ce00563d140e93fe1875f601f848ecb03b97610ac4d0a19dda56efe3cb2c06cbb4b252478e3e2e6dbc415c5e493f502c32ad8f12161acd
7
- data.tar.gz: 3867fdebbf8e94c652246060549466269fb36256f8f8ad42e1c42722a9d010187a421882a6ebb2221a873f0763a7b9a0502c9ab077e6cdd994385626a954711d
6
+ metadata.gz: f9aaf222f94a5076cd95a0c58285b989557211d858804472ac0742cb17afccf1ebd94c77b637d9cfd3381915c9f9df758a05787ae17a0de57403bdd8747c0c9e
7
+ data.tar.gz: 0bc86ae13782e710a68162a51a7be4e56f7f83bdae39083343d9b9e6b60dad9e3ff7ef1a017ff1ec72a39cd5e104ede0358979d78dd48077dc0c5e7f03883ea2
data/lib/gemconfig.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TrophyApiClient
4
4
  module Gemconfig
5
- VERSION = "1.9.1"
5
+ VERSION = "1.11.0"
6
6
  AUTHORS = ["Trophy Labs, Inc"].freeze
7
7
  EMAIL = ""
8
8
  SUMMARY = "Ruby library for the Trophy API."
@@ -76,8 +76,8 @@ module TrophyApiClient
76
76
  # type. Null for one-time leaderboards.
77
77
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
78
78
  # @return [TrophyApiClient::Leaderboards::LeaderboardsAllResponseItem]
79
- def initialize(status:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, breakdown_attribute: OMIT,
80
- metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
79
+ def initialize(status:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, breakdown_attribute: OMIT,
80
+ metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
81
81
  @status = status
82
82
  @id = id
83
83
  @name = name
@@ -92,7 +92,7 @@ module TrophyApiClient
92
92
  @description = description if description != OMIT
93
93
  @start = start
94
94
  @end_ = end_ if end_ != OMIT
95
- @max_participants = max_participants
95
+ @max_participants = max_participants if max_participants != OMIT
96
96
  @run_unit = run_unit if run_unit != OMIT
97
97
  @run_interval = run_interval if run_interval != OMIT
98
98
  @additional_properties = additional_properties
@@ -193,7 +193,7 @@ module TrophyApiClient
193
193
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
194
194
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
195
195
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
196
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
196
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
197
197
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
198
198
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
199
199
  end
@@ -61,8 +61,8 @@ module TrophyApiClient
61
61
  # @param run_interval [Integer] The number of recurrence units between leaderboard runs.
62
62
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
63
63
  # @return [TrophyApiClient::AdminLeaderboard]
64
- def initialize(id:, name:, key:, status:, rank_by:, max_participants:, start:, breakdown_attributes:,
65
- description: OMIT, metric_id: OMIT, points_system_id: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
64
+ def initialize(id:, name:, key:, status:, rank_by:, start:, breakdown_attributes:, description: OMIT, metric_id: OMIT, points_system_id: OMIT,
65
+ max_participants: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
66
66
  @id = id
67
67
  @name = name
68
68
  @key = key
@@ -71,7 +71,7 @@ module TrophyApiClient
71
71
  @rank_by = rank_by
72
72
  @metric_id = metric_id if metric_id != OMIT
73
73
  @points_system_id = points_system_id if points_system_id != OMIT
74
- @max_participants = max_participants
74
+ @max_participants = max_participants if max_participants != OMIT
75
75
  @start = start
76
76
  @end_ = end_ if end_ != OMIT
77
77
  @breakdown_attributes = breakdown_attributes
@@ -160,7 +160,7 @@ module TrophyApiClient
160
160
  obj.rank_by.is_a?(TrophyApiClient::AdminLeaderboardRankBy) != false || raise("Passed value for field obj.rank_by is not the expected type, validation failed.")
161
161
  obj.metric_id&.is_a?(String) != false || raise("Passed value for field obj.metric_id is not the expected type, validation failed.")
162
162
  obj.points_system_id&.is_a?(String) != false || raise("Passed value for field obj.points_system_id is not the expected type, validation failed.")
163
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
163
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
164
164
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
165
165
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
166
166
  obj.breakdown_attributes.is_a?(Array) != false || raise("Passed value for field obj.breakdown_attributes is not the expected type, validation failed.")
@@ -5,9 +5,12 @@ require "ostruct"
5
5
  require "json"
6
6
 
7
7
  module TrophyApiClient
8
- # A leaderboard event representing a change in a user's rank or value.
8
+ # A daily leaderboard snapshot entry representing the user's rank/value state and
9
+ # the previous persisted state.
9
10
  class LeaderboardEvent
10
- # @return [DateTime] The timestamp when the event occurred.
11
+ # @return [String] The leaderboard snapshot date in YYYY-MM-DD format.
12
+ attr_reader :date
13
+ # @return [DateTime] Deprecated ISO timestamp for the snapshot day boundary. Use `date` instead.
11
14
  attr_reader :timestamp
12
15
  # @return [Integer] The user's rank before this event, or null if they were not on the leaderboard.
13
16
  attr_reader :previous_rank
@@ -27,7 +30,8 @@ module TrophyApiClient
27
30
 
28
31
  OMIT = Object.new
29
32
 
30
- # @param timestamp [DateTime] The timestamp when the event occurred.
33
+ # @param date [String] The leaderboard snapshot date in YYYY-MM-DD format.
34
+ # @param timestamp [DateTime] Deprecated ISO timestamp for the snapshot day boundary. Use `date` instead.
31
35
  # @param previous_rank [Integer] The user's rank before this event, or null if they were not on the leaderboard.
32
36
  # @param rank [Integer] The user's rank after this event, or null if they are no longer on the
33
37
  # leaderboard.
@@ -36,15 +40,17 @@ module TrophyApiClient
36
40
  # leaderboard.
37
41
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
38
42
  # @return [TrophyApiClient::LeaderboardEvent]
39
- def initialize(timestamp: OMIT, previous_rank: OMIT, rank: OMIT, previous_value: OMIT, value: OMIT,
43
+ def initialize(date:, timestamp:, previous_rank: OMIT, rank: OMIT, previous_value: OMIT, value: OMIT,
40
44
  additional_properties: nil)
41
- @timestamp = timestamp if timestamp != OMIT
45
+ @date = date
46
+ @timestamp = timestamp
42
47
  @previous_rank = previous_rank if previous_rank != OMIT
43
48
  @rank = rank if rank != OMIT
44
49
  @previous_value = previous_value if previous_value != OMIT
45
50
  @value = value if value != OMIT
46
51
  @additional_properties = additional_properties
47
52
  @_field_set = {
53
+ "date": date,
48
54
  "timestamp": timestamp,
49
55
  "previousRank": previous_rank,
50
56
  "rank": rank,
@@ -62,12 +68,14 @@ module TrophyApiClient
62
68
  def self.from_json(json_object:)
63
69
  struct = JSON.parse(json_object, object_class: OpenStruct)
64
70
  parsed_json = JSON.parse(json_object)
71
+ date = parsed_json["date"]
65
72
  timestamp = (DateTime.parse(parsed_json["timestamp"]) unless parsed_json["timestamp"].nil?)
66
73
  previous_rank = parsed_json["previousRank"]
67
74
  rank = parsed_json["rank"]
68
75
  previous_value = parsed_json["previousValue"]
69
76
  value = parsed_json["value"]
70
77
  new(
78
+ date: date,
71
79
  timestamp: timestamp,
72
80
  previous_rank: previous_rank,
73
81
  rank: rank,
@@ -91,7 +99,8 @@ module TrophyApiClient
91
99
  # @param obj [Object]
92
100
  # @return [Void]
93
101
  def self.validate_raw(obj:)
94
- obj.timestamp&.is_a?(DateTime) != false || raise("Passed value for field obj.timestamp is not the expected type, validation failed.")
102
+ obj.date.is_a?(String) != false || raise("Passed value for field obj.date is not the expected type, validation failed.")
103
+ obj.timestamp.is_a?(DateTime) != false || raise("Passed value for field obj.timestamp is not the expected type, validation failed.")
95
104
  obj.previous_rank&.is_a?(Integer) != false || raise("Passed value for field obj.previous_rank is not the expected type, validation failed.")
96
105
  obj.rank&.is_a?(Integer) != false || raise("Passed value for field obj.rank is not the expected type, validation failed.")
97
106
  obj.previous_value&.is_a?(Integer) != false || raise("Passed value for field obj.previous_value is not the expected type, validation failed.")
@@ -72,8 +72,8 @@ module TrophyApiClient
72
72
  # type. Null for one-time leaderboards.
73
73
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
74
74
  # @return [TrophyApiClient::LeaderboardResponse]
75
- def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, breakdown_attribute: OMIT, metric_key: OMIT,
76
- metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
75
+ def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, breakdown_attribute: OMIT, metric_key: OMIT,
76
+ metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
77
77
  @id = id
78
78
  @name = name
79
79
  @key = key
@@ -87,7 +87,7 @@ module TrophyApiClient
87
87
  @description = description if description != OMIT
88
88
  @start = start
89
89
  @end_ = end_ if end_ != OMIT
90
- @max_participants = max_participants
90
+ @max_participants = max_participants if max_participants != OMIT
91
91
  @run_unit = run_unit if run_unit != OMIT
92
92
  @run_interval = run_interval if run_interval != OMIT
93
93
  @additional_properties = additional_properties
@@ -184,7 +184,7 @@ module TrophyApiClient
184
184
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
185
185
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
186
186
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
187
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
187
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
188
188
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
189
189
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
190
190
  end
@@ -79,8 +79,8 @@ module TrophyApiClient
79
79
  # type. Null for one-time leaderboards.
80
80
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
81
81
  # @return [TrophyApiClient::LeaderboardResponseWithRankings]
82
- def initialize(status:, rankings:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, breakdown_attribute: OMIT,
83
- metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
82
+ def initialize(status:, rankings:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, breakdown_attribute: OMIT,
83
+ metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
84
84
  @status = status
85
85
  @rankings = rankings
86
86
  @id = id
@@ -96,7 +96,7 @@ module TrophyApiClient
96
96
  @description = description if description != OMIT
97
97
  @start = start
98
98
  @end_ = end_ if end_ != OMIT
99
- @max_participants = max_participants
99
+ @max_participants = max_participants if max_participants != OMIT
100
100
  @run_unit = run_unit if run_unit != OMIT
101
101
  @run_interval = run_interval if run_interval != OMIT
102
102
  @additional_properties = additional_properties
@@ -204,7 +204,7 @@ module TrophyApiClient
204
204
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
205
205
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
206
206
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
207
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
207
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
208
208
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
209
209
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
210
210
  end
@@ -97,8 +97,8 @@ module TrophyApiClient
97
97
  # type. Null for one-time leaderboards.
98
98
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
99
99
  # @return [TrophyApiClient::MetricEventLeaderboardResponse]
100
- def initialize(threshold:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, end_: OMIT, rank: OMIT, previous_rank: OMIT, breakdown_attribute_value: OMIT,
101
- breakdown_attribute_values: OMIT, breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
100
+ def initialize(threshold:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, end_: OMIT, rank: OMIT, previous_rank: OMIT, breakdown_attribute_value: OMIT,
101
+ breakdown_attribute_values: OMIT, breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
102
102
  @end_ = end_ if end_ != OMIT
103
103
  @rank = rank if rank != OMIT
104
104
  @previous_rank = previous_rank if previous_rank != OMIT
@@ -117,7 +117,7 @@ module TrophyApiClient
117
117
  @points_system_name = points_system_name if points_system_name != OMIT
118
118
  @description = description if description != OMIT
119
119
  @start = start
120
- @max_participants = max_participants
120
+ @max_participants = max_participants if max_participants != OMIT
121
121
  @run_unit = run_unit if run_unit != OMIT
122
122
  @run_interval = run_interval if run_interval != OMIT
123
123
  @additional_properties = additional_properties
@@ -237,7 +237,7 @@ module TrophyApiClient
237
237
  obj.points_system_name&.is_a?(String) != false || raise("Passed value for field obj.points_system_name is not the expected type, validation failed.")
238
238
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
239
239
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
240
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
240
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
241
241
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
242
242
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
243
243
  end
@@ -82,8 +82,8 @@ module TrophyApiClient
82
82
  # type. Null for one-time leaderboards.
83
83
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
84
84
  # @return [TrophyApiClient::UserLeaderboardResponse]
85
- def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, rank: OMIT,
86
- value: OMIT, breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
85
+ def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, rank: OMIT, value: OMIT,
86
+ breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
87
87
  @rank = rank if rank != OMIT
88
88
  @value = value if value != OMIT
89
89
  @id = id
@@ -99,7 +99,7 @@ module TrophyApiClient
99
99
  @description = description if description != OMIT
100
100
  @start = start
101
101
  @end_ = end_ if end_ != OMIT
102
- @max_participants = max_participants
102
+ @max_participants = max_participants if max_participants != OMIT
103
103
  @run_unit = run_unit if run_unit != OMIT
104
104
  @run_interval = run_interval if run_interval != OMIT
105
105
  @additional_properties = additional_properties
@@ -204,7 +204,7 @@ module TrophyApiClient
204
204
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
205
205
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
206
206
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
207
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
207
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
208
208
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
209
209
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
210
210
  end
@@ -9,7 +9,7 @@ require "json"
9
9
  module TrophyApiClient
10
10
  # A user's data for a specific leaderboard including rank, value, and history.
11
11
  class UserLeaderboardResponseWithHistory
12
- # @return [Array<TrophyApiClient::LeaderboardEvent>] An array of events showing the user's rank and value changes over time.
12
+ # @return [Array<TrophyApiClient::LeaderboardEvent>] An array of daily change events showing the user's rank and value over time.
13
13
  attr_reader :history
14
14
  # @return [Integer] The user's current rank in this leaderboard. Null if the user is not on the
15
15
  # leaderboard.
@@ -60,7 +60,7 @@ module TrophyApiClient
60
60
 
61
61
  OMIT = Object.new
62
62
 
63
- # @param history [Array<TrophyApiClient::LeaderboardEvent>] An array of events showing the user's rank and value changes over time.
63
+ # @param history [Array<TrophyApiClient::LeaderboardEvent>] An array of daily change events showing the user's rank and value over time.
64
64
  # @param rank [Integer] The user's current rank in this leaderboard. Null if the user is not on the
65
65
  # leaderboard.
66
66
  # @param value [Integer] The user's current value in this leaderboard. Null if the user is not on the
@@ -86,8 +86,8 @@ module TrophyApiClient
86
86
  # type. Null for one-time leaderboards.
87
87
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
88
88
  # @return [TrophyApiClient::UserLeaderboardResponseWithHistory]
89
- def initialize(history:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, rank: OMIT,
90
- value: OMIT, breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
89
+ def initialize(history:, id:, name:, key:, rank_by:, breakdown_attributes:, start:, rank: OMIT, value: OMIT,
90
+ breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
91
91
  @history = history
92
92
  @rank = rank if rank != OMIT
93
93
  @value = value if value != OMIT
@@ -104,7 +104,7 @@ module TrophyApiClient
104
104
  @description = description if description != OMIT
105
105
  @start = start
106
106
  @end_ = end_ if end_ != OMIT
107
- @max_participants = max_participants
107
+ @max_participants = max_participants if max_participants != OMIT
108
108
  @run_unit = run_unit if run_unit != OMIT
109
109
  @run_interval = run_interval if run_interval != OMIT
110
110
  @additional_properties = additional_properties
@@ -216,7 +216,7 @@ module TrophyApiClient
216
216
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
217
217
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
218
218
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
219
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
219
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
220
220
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
221
221
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
222
222
  end
@@ -88,8 +88,8 @@ module TrophyApiClient
88
88
  # type. Null for one-time leaderboards.
89
89
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
90
90
  # @return [TrophyApiClient::WebhookUserLeaderboardResponse]
91
- def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, max_participants:, previous_rank: OMIT, previous_value: OMIT, rank: OMIT, value: OMIT,
92
- breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
91
+ def initialize(id:, name:, key:, rank_by:, breakdown_attributes:, start:, previous_rank: OMIT, previous_value: OMIT, rank: OMIT, value: OMIT,
92
+ breakdown_attribute: OMIT, metric_key: OMIT, metric_name: OMIT, points_system_key: OMIT, points_system_name: OMIT, description: OMIT, end_: OMIT, max_participants: OMIT, run_unit: OMIT, run_interval: OMIT, additional_properties: nil)
93
93
  @previous_rank = previous_rank if previous_rank != OMIT
94
94
  @previous_value = previous_value if previous_value != OMIT
95
95
  @rank = rank if rank != OMIT
@@ -107,7 +107,7 @@ module TrophyApiClient
107
107
  @description = description if description != OMIT
108
108
  @start = start
109
109
  @end_ = end_ if end_ != OMIT
110
- @max_participants = max_participants
110
+ @max_participants = max_participants if max_participants != OMIT
111
111
  @run_unit = run_unit if run_unit != OMIT
112
112
  @run_interval = run_interval if run_interval != OMIT
113
113
  @additional_properties = additional_properties
@@ -220,7 +220,7 @@ module TrophyApiClient
220
220
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
221
221
  obj.start.is_a?(String) != false || raise("Passed value for field obj.start is not the expected type, validation failed.")
222
222
  obj.end_&.is_a?(String) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.")
223
- obj.max_participants.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
223
+ obj.max_participants&.is_a?(Integer) != false || raise("Passed value for field obj.max_participants is not the expected type, validation failed.")
224
224
  obj.run_unit&.is_a?(TrophyApiClient::LeaderboardResponseRunUnit) != false || raise("Passed value for field obj.run_unit is not the expected type, validation failed.")
225
225
  obj.run_interval&.is_a?(Integer) != false || raise("Passed value for field obj.run_interval is not the expected type, validation failed.")
226
226
  end
@@ -582,13 +582,13 @@ module TrophyApiClient
582
582
  end
583
583
  end
584
584
 
585
- # Get a user's rank, value, and history for a specific leaderboard.
585
+ # Get a user's rank, value, and daily ranking history for a specific leaderboard.
586
586
  #
587
587
  # @param id [String] The user's ID in your database.
588
588
  # @param key [String] Unique key of the leaderboard as set when created.
589
589
  # @param run [String] Specific run date in YYYY-MM-DD format. If not provided, returns the current
590
590
  # run.
591
- # @param num_events [Integer] The number of events to return in the history array.
591
+ # @param num_events [Integer] The number of days to return in the leaderboard history for the user.
592
592
  # @param request_options [TrophyApiClient::RequestOptions]
593
593
  # @return [TrophyApiClient::UserLeaderboardResponseWithHistory]
594
594
  # @example
@@ -1252,13 +1252,13 @@ module TrophyApiClient
1252
1252
  end
1253
1253
  end
1254
1254
 
1255
- # Get a user's rank, value, and history for a specific leaderboard.
1255
+ # Get a user's rank, value, and daily ranking history for a specific leaderboard.
1256
1256
  #
1257
1257
  # @param id [String] The user's ID in your database.
1258
1258
  # @param key [String] Unique key of the leaderboard as set when created.
1259
1259
  # @param run [String] Specific run date in YYYY-MM-DD format. If not provided, returns the current
1260
1260
  # run.
1261
- # @param num_events [Integer] The number of events to return in the history array.
1261
+ # @param num_events [Integer] The number of days to return in the leaderboard history for the user.
1262
1262
  # @param request_options [TrophyApiClient::RequestOptions]
1263
1263
  # @return [TrophyApiClient::UserLeaderboardResponseWithHistory]
1264
1264
  # @example
@@ -1,3 +1,3 @@
1
1
  module MyGem
2
- VERSION = "1.9.1"
2
+ VERSION = "1.11.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trophy_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trophy Labs, Inc