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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8d767c67c359d85255fda71dfc5b23dfdbd7ec7703a02843e025c593da2604a
4
- data.tar.gz: d661b2fb934daeb5f28d2189646fb3c09294f3f05db4b3454f3f4c2cc337babd
3
+ metadata.gz: a79a94b140eb840c0a0b4f40f855c69fbb66bb429977154f144ef1e5f1b37729
4
+ data.tar.gz: d712f9760544029301467b699433584ceaddf2faf12a3122475d1de9630ca7ae
5
5
  SHA512:
6
- metadata.gz: 6310df4c2f5a5fcf9a10a1134bbe38860c32fb0ab7af8715c07335152461d8bf8fd1cd1026dd3286a28e80ac31d4e3f9e3d06413ad91d138ba834d26d1773cbb
7
- data.tar.gz: 41ec09de29b07a35735a5f188aabcf7cf29e0e14f9c661caf0f15138efc8c153403edec02346e05d89d2fd3b095367f83f7c747c1ef81920355f9e98b33eb902
6
+ metadata.gz: 23d14322f1451cc839c440cb727a5549439ae5c09f5869e09519db7a6bc0f562426acb200d67b1a11390d8b0a2af047ab60a1e7aea1de59c43a747db7f2c7b20
7
+ data.tar.gz: 53ea20d8432d15b2b64834927d74c1eba36b2912f10654325fbf81456ee68460442f523cc82af9b5077bcb0cc154d27cbac901c58e224e7a2255aa18da1d3d01
data/lib/gemconfig.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TrophyApiClient
4
4
  module Gemconfig
5
- VERSION = "1.0.19"
5
+ VERSION = "1.0.20"
6
6
  AUTHORS = ["Trophy Labs, Inc"].freeze
7
7
  EMAIL = ""
8
8
  SUMMARY = "Ruby library for the Trophy API."
@@ -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, started: OMIT, period_start: OMIT, period_end: 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.")
@@ -1,3 +1,3 @@
1
1
  module MyGem
2
- VERSION = "1.0.19"
2
+ VERSION = "1.0.20"
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.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trophy Labs, Inc