stormgate_world 1.0.0 → 1.1.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/Gemfile.lock +73 -0
 - data/README.md +20 -5
 - data/docs/ActivityStatistics.md +24 -0
 - data/docs/ActivityStatisticsActivity.md +20 -0
 - data/docs/ActivityStatisticsEntry.md +24 -0
 - data/docs/Aggregation.md +15 -0
 - data/docs/CountriesStatistics.md +24 -0
 - data/docs/CountriesStatisticsEntry.md +22 -0
 - data/docs/DumpFormat.md +15 -0
 - data/docs/LeaderboardEntriesApi.md +10 -4
 - data/docs/LeaderboardEntryHistory.md +7 -1
 - data/docs/LeaderboardEntryHistoryRow.md +22 -0
 - data/docs/LeaderboardEntryResponse.md +3 -1
 - data/docs/LeaderboardsApi.md +10 -5
 - data/docs/League.md +15 -0
 - data/docs/MatchParticipantPlayerLeaderboardEntryResponse.md +1 -1
 - data/docs/PlayerMatchesResponse.md +2 -0
 - data/docs/PlayerResponse.md +5 -1
 - data/docs/PlayersApi.md +14 -146
 - data/docs/Resolution.md +15 -0
 - data/docs/ServersStatistics.md +24 -0
 - data/docs/ServersStatisticsEntry.md +22 -0
 - data/docs/StatisticsApi.md +205 -2
 - data/docs/StatsByTime.md +1 -1
 - data/lib/stormgate_world/api/leaderboard_entries_api.rb +6 -0
 - data/lib/stormgate_world/api/leaderboards_api.rb +3 -0
 - data/lib/stormgate_world/api/players_api.rb +20 -129
 - data/lib/stormgate_world/api/statistics_api.rb +186 -2
 - data/lib/stormgate_world/models/activity_statistics.rb +269 -0
 - data/lib/stormgate_world/models/activity_statistics_activity.rb +239 -0
 - data/lib/stormgate_world/models/activity_statistics_entry.rb +263 -0
 - data/lib/stormgate_world/models/aggregation.rb +41 -0
 - data/lib/stormgate_world/models/countries_statistics.rb +271 -0
 - data/lib/stormgate_world/models/countries_statistics_entry.rb +241 -0
 - data/lib/stormgate_world/models/dump_format.rb +40 -0
 - data/lib/stormgate_world/models/leaderboard_entry_history.rb +72 -2
 - data/lib/stormgate_world/models/leaderboard_entry_history_row.rb +241 -0
 - data/lib/stormgate_world/models/leaderboard_entry_response.rb +12 -2
 - data/lib/stormgate_world/models/league.rb +45 -0
 - data/lib/stormgate_world/models/match_participant_player_leaderboard_entry_response.rb +23 -1
 - data/lib/stormgate_world/models/player_matches_response.rb +36 -1
 - data/lib/stormgate_world/models/player_response.rb +25 -5
 - data/lib/stormgate_world/models/race.rb +1 -2
 - data/lib/stormgate_world/models/resolution.rb +42 -0
 - data/lib/stormgate_world/models/servers_statistics.rb +271 -0
 - data/lib/stormgate_world/models/servers_statistics_entry.rb +253 -0
 - data/lib/stormgate_world/models/stats_by_time.rb +23 -1
 - data/lib/stormgate_world/version.rb +1 -1
 - data/lib/stormgate_world.rb +12 -2
 - data/pkg/stormgate_world-1.0.0.gem +0 -0
 - data/spec/models/activity_statistics_activity_spec.rb +42 -0
 - data/spec/models/activity_statistics_entry_spec.rb +54 -0
 - data/spec/models/activity_statistics_spec.rb +54 -0
 - data/spec/models/aggregation_spec.rb +30 -0
 - data/spec/models/countries_statistics_entry_spec.rb +48 -0
 - data/spec/models/countries_statistics_spec.rb +54 -0
 - data/spec/models/dump_format_spec.rb +30 -0
 - data/spec/models/leaderboard_entry_history_row_spec.rb +48 -0
 - data/spec/models/league_spec.rb +30 -0
 - data/spec/models/resolution_spec.rb +30 -0
 - data/spec/models/servers_statistics_entry_spec.rb +48 -0
 - data/spec/models/servers_statistics_spec.rb +54 -0
 - data/stormgate_world.json +1 -1
 - metadata +52 -2
 
| 
         @@ -0,0 +1,241 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #api
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            The version of the OpenAPI document: 0.1.1
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://openapi-generator.tech
         
     | 
| 
      
 9 
     | 
    
         
            +
            OpenAPI Generator version: 7.3.0
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'time'
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            module StormgateWorld
         
     | 
| 
      
 17 
     | 
    
         
            +
              class LeaderboardEntryHistoryRow
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :time
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                attr_accessor :mmr
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :points
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 25 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 26 
     | 
    
         
            +
                  {
         
     | 
| 
      
 27 
     | 
    
         
            +
                    :'time' => :'time',
         
     | 
| 
      
 28 
     | 
    
         
            +
                    :'mmr' => :'mmr',
         
     | 
| 
      
 29 
     | 
    
         
            +
                    :'points' => :'points'
         
     | 
| 
      
 30 
     | 
    
         
            +
                  }
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                # Returns all the JSON keys this model knows about
         
     | 
| 
      
 34 
     | 
    
         
            +
                def self.acceptable_attributes
         
     | 
| 
      
 35 
     | 
    
         
            +
                  attribute_map.values
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 39 
     | 
    
         
            +
                def self.openapi_types
         
     | 
| 
      
 40 
     | 
    
         
            +
                  {
         
     | 
| 
      
 41 
     | 
    
         
            +
                    :'time' => :'Time',
         
     | 
| 
      
 42 
     | 
    
         
            +
                    :'mmr' => :'Float',
         
     | 
| 
      
 43 
     | 
    
         
            +
                    :'points' => :'Float'
         
     | 
| 
      
 44 
     | 
    
         
            +
                  }
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                # List of attributes with nullable: true
         
     | 
| 
      
 48 
     | 
    
         
            +
                def self.openapi_nullable
         
     | 
| 
      
 49 
     | 
    
         
            +
                  Set.new([
         
     | 
| 
      
 50 
     | 
    
         
            +
                    :'mmr',
         
     | 
| 
      
 51 
     | 
    
         
            +
                    :'points'
         
     | 
| 
      
 52 
     | 
    
         
            +
                  ])
         
     | 
| 
      
 53 
     | 
    
         
            +
                end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 56 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 57 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 58 
     | 
    
         
            +
                  if (!attributes.is_a?(Hash))
         
     | 
| 
      
 59 
     | 
    
         
            +
                    fail ArgumentError, "The input argument (attributes) must be a hash in `StormgateWorld::LeaderboardEntryHistoryRow` initialize method"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  # check to see if the attribute exists and convert string to symbol for hash key
         
     | 
| 
      
 63 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}) { |(k, v), h|
         
     | 
| 
      
 64 
     | 
    
         
            +
                    if (!self.class.attribute_map.key?(k.to_sym))
         
     | 
| 
      
 65 
     | 
    
         
            +
                      fail ArgumentError, "`#{k}` is not a valid attribute in `StormgateWorld::LeaderboardEntryHistoryRow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
         
     | 
| 
      
 66 
     | 
    
         
            +
                    end
         
     | 
| 
      
 67 
     | 
    
         
            +
                    h[k.to_sym] = v
         
     | 
| 
      
 68 
     | 
    
         
            +
                  }
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                  if attributes.key?(:'time')
         
     | 
| 
      
 71 
     | 
    
         
            +
                    self.time = attributes[:'time']
         
     | 
| 
      
 72 
     | 
    
         
            +
                  else
         
     | 
| 
      
 73 
     | 
    
         
            +
                    self.time = nil
         
     | 
| 
      
 74 
     | 
    
         
            +
                  end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                  if attributes.key?(:'mmr')
         
     | 
| 
      
 77 
     | 
    
         
            +
                    self.mmr = attributes[:'mmr']
         
     | 
| 
      
 78 
     | 
    
         
            +
                  end
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                  if attributes.key?(:'points')
         
     | 
| 
      
 81 
     | 
    
         
            +
                    self.points = attributes[:'points']
         
     | 
| 
      
 82 
     | 
    
         
            +
                  end
         
     | 
| 
      
 83 
     | 
    
         
            +
                end
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 86 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 87 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 88 
     | 
    
         
            +
                  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
         
     | 
| 
      
 89 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 90 
     | 
    
         
            +
                  if @time.nil?
         
     | 
| 
      
 91 
     | 
    
         
            +
                    invalid_properties.push('invalid value for "time", time cannot be nil.')
         
     | 
| 
      
 92 
     | 
    
         
            +
                  end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                  invalid_properties
         
     | 
| 
      
 95 
     | 
    
         
            +
                end
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 98 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 99 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 100 
     | 
    
         
            +
                  warn '[DEPRECATED] the `valid?` method is obsolete'
         
     | 
| 
      
 101 
     | 
    
         
            +
                  return false if @time.nil?
         
     | 
| 
      
 102 
     | 
    
         
            +
                  true
         
     | 
| 
      
 103 
     | 
    
         
            +
                end
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 106 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 107 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 108 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 109 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 110 
     | 
    
         
            +
                      time == o.time &&
         
     | 
| 
      
 111 
     | 
    
         
            +
                      mmr == o.mmr &&
         
     | 
| 
      
 112 
     | 
    
         
            +
                      points == o.points
         
     | 
| 
      
 113 
     | 
    
         
            +
                end
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
      
 115 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 116 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 117 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 118 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 119 
     | 
    
         
            +
                end
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
      
 121 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 122 
     | 
    
         
            +
                # @return [Integer] Hash code
         
     | 
| 
      
 123 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 124 
     | 
    
         
            +
                  [time, mmr, points].hash
         
     | 
| 
      
 125 
     | 
    
         
            +
                end
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 128 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 129 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 130 
     | 
    
         
            +
                def self.build_from_hash(attributes)
         
     | 
| 
      
 131 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 132 
     | 
    
         
            +
                  attributes = attributes.transform_keys(&:to_sym)
         
     | 
| 
      
 133 
     | 
    
         
            +
                  transformed_hash = {}
         
     | 
| 
      
 134 
     | 
    
         
            +
                  openapi_types.each_pair do |key, type|
         
     | 
| 
      
 135 
     | 
    
         
            +
                    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
         
     | 
| 
      
 136 
     | 
    
         
            +
                      transformed_hash["#{key}"] = nil
         
     | 
| 
      
 137 
     | 
    
         
            +
                    elsif type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 138 
     | 
    
         
            +
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
      
 139 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 140 
     | 
    
         
            +
                      if attributes[attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 141 
     | 
    
         
            +
                        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
         
     | 
| 
      
 142 
     | 
    
         
            +
                      end
         
     | 
| 
      
 143 
     | 
    
         
            +
                    elsif !attributes[attribute_map[key]].nil?
         
     | 
| 
      
 144 
     | 
    
         
            +
                      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
         
     | 
| 
      
 145 
     | 
    
         
            +
                    end
         
     | 
| 
      
 146 
     | 
    
         
            +
                  end
         
     | 
| 
      
 147 
     | 
    
         
            +
                  new(transformed_hash)
         
     | 
| 
      
 148 
     | 
    
         
            +
                end
         
     | 
| 
      
 149 
     | 
    
         
            +
             
     | 
| 
      
 150 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 151 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 152 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 153 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 154 
     | 
    
         
            +
                def self._deserialize(type, value)
         
     | 
| 
      
 155 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 156 
     | 
    
         
            +
                  when :Time
         
     | 
| 
      
 157 
     | 
    
         
            +
                    Time.parse(value)
         
     | 
| 
      
 158 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 159 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 160 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 161 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 162 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 163 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 164 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 165 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 166 
     | 
    
         
            +
                  when :Boolean
         
     | 
| 
      
 167 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 168 
     | 
    
         
            +
                      true
         
     | 
| 
      
 169 
     | 
    
         
            +
                    else
         
     | 
| 
      
 170 
     | 
    
         
            +
                      false
         
     | 
| 
      
 171 
     | 
    
         
            +
                    end
         
     | 
| 
      
 172 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 173 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 174 
     | 
    
         
            +
                    value
         
     | 
| 
      
 175 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 176 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 177 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 178 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 179 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 180 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 181 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 182 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 183 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 184 
     | 
    
         
            +
                      end
         
     | 
| 
      
 185 
     | 
    
         
            +
                    end
         
     | 
| 
      
 186 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 187 
     | 
    
         
            +
                    # models (e.g. Pet) or oneOf
         
     | 
| 
      
 188 
     | 
    
         
            +
                    klass = StormgateWorld.const_get(type)
         
     | 
| 
      
 189 
     | 
    
         
            +
                    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
         
     | 
| 
      
 190 
     | 
    
         
            +
                  end
         
     | 
| 
      
 191 
     | 
    
         
            +
                end
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 194 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 195 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 196 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 197 
     | 
    
         
            +
                end
         
     | 
| 
      
 198 
     | 
    
         
            +
             
     | 
| 
      
 199 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 200 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 201 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 202 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 203 
     | 
    
         
            +
                end
         
     | 
| 
      
 204 
     | 
    
         
            +
             
     | 
| 
      
 205 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 206 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 207 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 208 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 209 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 210 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 211 
     | 
    
         
            +
                    if value.nil?
         
     | 
| 
      
 212 
     | 
    
         
            +
                      is_nullable = self.class.openapi_nullable.include?(attr)
         
     | 
| 
      
 213 
     | 
    
         
            +
                      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
         
     | 
| 
      
 214 
     | 
    
         
            +
                    end
         
     | 
| 
      
 215 
     | 
    
         
            +
             
     | 
| 
      
 216 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 217 
     | 
    
         
            +
                  end
         
     | 
| 
      
 218 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 219 
     | 
    
         
            +
                end
         
     | 
| 
      
 220 
     | 
    
         
            +
             
     | 
| 
      
 221 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 222 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 223 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 224 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 225 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 226 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 227 
     | 
    
         
            +
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
      
 228 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 229 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 230 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 231 
     | 
    
         
            +
                    end
         
     | 
| 
      
 232 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 233 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 234 
     | 
    
         
            +
                  else
         
     | 
| 
      
 235 
     | 
    
         
            +
                    value
         
     | 
| 
      
 236 
     | 
    
         
            +
                  end
         
     | 
| 
      
 237 
     | 
    
         
            +
                end
         
     | 
| 
      
 238 
     | 
    
         
            +
             
     | 
| 
      
 239 
     | 
    
         
            +
              end
         
     | 
| 
      
 240 
     | 
    
         
            +
             
     | 
| 
      
 241 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -27,6 +27,8 @@ module StormgateWorld 
     | 
|
| 
       27 
27 
     | 
    
         | 
| 
       28 
28 
     | 
    
         
             
                attr_accessor :nickname_discriminator
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
      
 30 
     | 
    
         
            +
                attr_accessor :avatar_url
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       30 
32 
     | 
    
         
             
                attr_accessor :rank
         
     | 
| 
       31 
33 
     | 
    
         | 
| 
       32 
34 
     | 
    
         
             
                attr_accessor :race
         
     | 
| 
         @@ -82,6 +84,7 @@ module StormgateWorld 
     | 
|
| 
       82 
84 
     | 
    
         
             
                    :'anonymous' => :'anonymous',
         
     | 
| 
       83 
85 
     | 
    
         
             
                    :'nickname' => :'nickname',
         
     | 
| 
       84 
86 
     | 
    
         
             
                    :'nickname_discriminator' => :'nickname_discriminator',
         
     | 
| 
      
 87 
     | 
    
         
            +
                    :'avatar_url' => :'avatar_url',
         
     | 
| 
       85 
88 
     | 
    
         
             
                    :'rank' => :'rank',
         
     | 
| 
       86 
89 
     | 
    
         
             
                    :'race' => :'race',
         
     | 
| 
       87 
90 
     | 
    
         
             
                    :'league' => :'league',
         
     | 
| 
         @@ -111,9 +114,10 @@ module StormgateWorld 
     | 
|
| 
       111 
114 
     | 
    
         
             
                    :'anonymous' => :'Boolean',
         
     | 
| 
       112 
115 
     | 
    
         
             
                    :'nickname' => :'String',
         
     | 
| 
       113 
116 
     | 
    
         
             
                    :'nickname_discriminator' => :'String',
         
     | 
| 
      
 117 
     | 
    
         
            +
                    :'avatar_url' => :'String',
         
     | 
| 
       114 
118 
     | 
    
         
             
                    :'rank' => :'Integer',
         
     | 
| 
       115 
119 
     | 
    
         
             
                    :'race' => :'Race',
         
     | 
| 
       116 
     | 
    
         
            -
                    :'league' => :' 
     | 
| 
      
 120 
     | 
    
         
            +
                    :'league' => :'League',
         
     | 
| 
       117 
121 
     | 
    
         
             
                    :'tier' => :'Integer',
         
     | 
| 
       118 
122 
     | 
    
         
             
                    :'mmr' => :'Float',
         
     | 
| 
       119 
123 
     | 
    
         
             
                    :'max_confirmed_mmr' => :'Float',
         
     | 
| 
         @@ -132,6 +136,7 @@ module StormgateWorld 
     | 
|
| 
       132 
136 
     | 
    
         
             
                    :'player_id',
         
     | 
| 
       133 
137 
     | 
    
         
             
                    :'nickname',
         
     | 
| 
       134 
138 
     | 
    
         
             
                    :'nickname_discriminator',
         
     | 
| 
      
 139 
     | 
    
         
            +
                    :'avatar_url',
         
     | 
| 
       135 
140 
     | 
    
         
             
                    :'rank',
         
     | 
| 
       136 
141 
     | 
    
         
             
                    :'league',
         
     | 
| 
       137 
142 
     | 
    
         
             
                    :'tier',
         
     | 
| 
         @@ -186,6 +191,10 @@ module StormgateWorld 
     | 
|
| 
       186 
191 
     | 
    
         
             
                    self.nickname_discriminator = attributes[:'nickname_discriminator']
         
     | 
| 
       187 
192 
     | 
    
         
             
                  end
         
     | 
| 
       188 
193 
     | 
    
         | 
| 
      
 194 
     | 
    
         
            +
                  if attributes.key?(:'avatar_url')
         
     | 
| 
      
 195 
     | 
    
         
            +
                    self.avatar_url = attributes[:'avatar_url']
         
     | 
| 
      
 196 
     | 
    
         
            +
                  end
         
     | 
| 
      
 197 
     | 
    
         
            +
             
     | 
| 
       189 
198 
     | 
    
         
             
                  if attributes.key?(:'rank')
         
     | 
| 
       190 
199 
     | 
    
         
             
                    self.rank = attributes[:'rank']
         
     | 
| 
       191 
200 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -318,6 +327,7 @@ module StormgateWorld 
     | 
|
| 
       318 
327 
     | 
    
         
             
                      anonymous == o.anonymous &&
         
     | 
| 
       319 
328 
     | 
    
         
             
                      nickname == o.nickname &&
         
     | 
| 
       320 
329 
     | 
    
         
             
                      nickname_discriminator == o.nickname_discriminator &&
         
     | 
| 
      
 330 
     | 
    
         
            +
                      avatar_url == o.avatar_url &&
         
     | 
| 
       321 
331 
     | 
    
         
             
                      rank == o.rank &&
         
     | 
| 
       322 
332 
     | 
    
         
             
                      race == o.race &&
         
     | 
| 
       323 
333 
     | 
    
         
             
                      league == o.league &&
         
     | 
| 
         @@ -341,7 +351,7 @@ module StormgateWorld 
     | 
|
| 
       341 
351 
     | 
    
         
             
                # Calculates hash code according to all attributes.
         
     | 
| 
       342 
352 
     | 
    
         
             
                # @return [Integer] Hash code
         
     | 
| 
       343 
353 
     | 
    
         
             
                def hash
         
     | 
| 
       344 
     | 
    
         
            -
                  [leaderboard_entry_id, leaderboard, player_id, anonymous, nickname, nickname_discriminator, rank, race, league, tier, mmr, max_confirmed_mmr, points, wins, losses, ties, matches, win_rate].hash
         
     | 
| 
      
 354 
     | 
    
         
            +
                  [leaderboard_entry_id, leaderboard, player_id, anonymous, nickname, nickname_discriminator, avatar_url, rank, race, league, tier, mmr, max_confirmed_mmr, points, wins, losses, ties, matches, win_rate].hash
         
     | 
| 
       345 
355 
     | 
    
         
             
                end
         
     | 
| 
       346 
356 
     | 
    
         | 
| 
       347 
357 
     | 
    
         
             
                # Builds the object from hash
         
     | 
| 
         @@ -0,0 +1,45 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #api
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            The version of the OpenAPI document: 0.1.1
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://openapi-generator.tech
         
     | 
| 
      
 9 
     | 
    
         
            +
            OpenAPI Generator version: 7.3.0
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'time'
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            module StormgateWorld
         
     | 
| 
      
 17 
     | 
    
         
            +
              class League
         
     | 
| 
      
 18 
     | 
    
         
            +
                ASPIRANT = "aspirant".freeze
         
     | 
| 
      
 19 
     | 
    
         
            +
                BRONZE = "bronze".freeze
         
     | 
| 
      
 20 
     | 
    
         
            +
                SILVER = "silver".freeze
         
     | 
| 
      
 21 
     | 
    
         
            +
                GOLD = "gold".freeze
         
     | 
| 
      
 22 
     | 
    
         
            +
                PLATINUM = "platinum".freeze
         
     | 
| 
      
 23 
     | 
    
         
            +
                DIAMOND = "diamond".freeze
         
     | 
| 
      
 24 
     | 
    
         
            +
                MASTER = "master".freeze
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                def self.all_vars
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @all_vars ||= [ASPIRANT, BRONZE, SILVER, GOLD, PLATINUM, DIAMOND, MASTER].freeze
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                # Builds the enum from string
         
     | 
| 
      
 31 
     | 
    
         
            +
                # @param [String] The enum value in the form of the string
         
     | 
| 
      
 32 
     | 
    
         
            +
                # @return [String] The enum value
         
     | 
| 
      
 33 
     | 
    
         
            +
                def self.build_from_hash(value)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  new.build_from_hash(value)
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                # Builds the enum from string
         
     | 
| 
      
 38 
     | 
    
         
            +
                # @param [String] The enum value in the form of the string
         
     | 
| 
      
 39 
     | 
    
         
            +
                # @return [String] The enum value
         
     | 
| 
      
 40 
     | 
    
         
            +
                def build_from_hash(value)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  return value if League.all_vars.include?(value)
         
     | 
| 
      
 42 
     | 
    
         
            +
                  raise "Invalid ENUM value #{value} for class #League"
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
      
 44 
     | 
    
         
            +
              end
         
     | 
| 
      
 45 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -31,6 +31,28 @@ module StormgateWorld 
     | 
|
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
                attr_accessor :win_rate
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
      
 34 
     | 
    
         
            +
                class EnumAttributeValidator
         
     | 
| 
      
 35 
     | 
    
         
            +
                  attr_reader :datatype
         
     | 
| 
      
 36 
     | 
    
         
            +
                  attr_reader :allowable_values
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                  def initialize(datatype, allowable_values)
         
     | 
| 
      
 39 
     | 
    
         
            +
                    @allowable_values = allowable_values.map do |value|
         
     | 
| 
      
 40 
     | 
    
         
            +
                      case datatype.to_s
         
     | 
| 
      
 41 
     | 
    
         
            +
                      when /Integer/i
         
     | 
| 
      
 42 
     | 
    
         
            +
                        value.to_i
         
     | 
| 
      
 43 
     | 
    
         
            +
                      when /Float/i
         
     | 
| 
      
 44 
     | 
    
         
            +
                        value.to_f
         
     | 
| 
      
 45 
     | 
    
         
            +
                      else
         
     | 
| 
      
 46 
     | 
    
         
            +
                        value
         
     | 
| 
      
 47 
     | 
    
         
            +
                      end
         
     | 
| 
      
 48 
     | 
    
         
            +
                    end
         
     | 
| 
      
 49 
     | 
    
         
            +
                  end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                  def valid?(value)
         
     | 
| 
      
 52 
     | 
    
         
            +
                    !value || allowable_values.include?(value)
         
     | 
| 
      
 53 
     | 
    
         
            +
                  end
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
       34 
56 
     | 
    
         
             
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
       35 
57 
     | 
    
         
             
                def self.attribute_map
         
     | 
| 
       36 
58 
     | 
    
         
             
                  {
         
     | 
| 
         @@ -54,7 +76,7 @@ module StormgateWorld 
     | 
|
| 
       54 
76 
     | 
    
         
             
                def self.openapi_types
         
     | 
| 
       55 
77 
     | 
    
         
             
                  {
         
     | 
| 
       56 
78 
     | 
    
         
             
                    :'leaderboard_entry_id' => :'String',
         
     | 
| 
       57 
     | 
    
         
            -
                    :'league' => :' 
     | 
| 
      
 79 
     | 
    
         
            +
                    :'league' => :'League',
         
     | 
| 
       58 
80 
     | 
    
         
             
                    :'tier' => :'Integer',
         
     | 
| 
       59 
81 
     | 
    
         
             
                    :'rank' => :'Integer',
         
     | 
| 
       60 
82 
     | 
    
         
             
                    :'wins' => :'Integer',
         
     | 
| 
         @@ -19,6 +19,8 @@ module StormgateWorld 
     | 
|
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                attr_accessor :page
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :total
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
       22 
24 
     | 
    
         
             
                attr_accessor :matches
         
     | 
| 
       23 
25 
     | 
    
         | 
| 
       24 
26 
     | 
    
         
             
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
         @@ -26,6 +28,7 @@ module StormgateWorld 
     | 
|
| 
       26 
28 
     | 
    
         
             
                  {
         
     | 
| 
       27 
29 
     | 
    
         
             
                    :'count' => :'count',
         
     | 
| 
       28 
30 
     | 
    
         
             
                    :'page' => :'page',
         
     | 
| 
      
 31 
     | 
    
         
            +
                    :'total' => :'total',
         
     | 
| 
       29 
32 
     | 
    
         
             
                    :'matches' => :'matches'
         
     | 
| 
       30 
33 
     | 
    
         
             
                  }
         
     | 
| 
       31 
34 
     | 
    
         
             
                end
         
     | 
| 
         @@ -40,6 +43,7 @@ module StormgateWorld 
     | 
|
| 
       40 
43 
     | 
    
         
             
                  {
         
     | 
| 
       41 
44 
     | 
    
         
             
                    :'count' => :'Integer',
         
     | 
| 
       42 
45 
     | 
    
         
             
                    :'page' => :'Integer',
         
     | 
| 
      
 46 
     | 
    
         
            +
                    :'total' => :'Integer',
         
     | 
| 
       43 
47 
     | 
    
         
             
                    :'matches' => :'Array<MatchResponse>'
         
     | 
| 
       44 
48 
     | 
    
         
             
                  }
         
     | 
| 
       45 
49 
     | 
    
         
             
                end
         
     | 
| 
         @@ -77,6 +81,12 @@ module StormgateWorld 
     | 
|
| 
       77 
81 
     | 
    
         
             
                    self.page = nil
         
     | 
| 
       78 
82 
     | 
    
         
             
                  end
         
     | 
| 
       79 
83 
     | 
    
         | 
| 
      
 84 
     | 
    
         
            +
                  if attributes.key?(:'total')
         
     | 
| 
      
 85 
     | 
    
         
            +
                    self.total = attributes[:'total']
         
     | 
| 
      
 86 
     | 
    
         
            +
                  else
         
     | 
| 
      
 87 
     | 
    
         
            +
                    self.total = nil
         
     | 
| 
      
 88 
     | 
    
         
            +
                  end
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
       80 
90 
     | 
    
         
             
                  if attributes.key?(:'matches')
         
     | 
| 
       81 
91 
     | 
    
         
             
                    if (value = attributes[:'matches']).is_a?(Array)
         
     | 
| 
       82 
92 
     | 
    
         
             
                      self.matches = value
         
     | 
| 
         @@ -107,6 +117,14 @@ module StormgateWorld 
     | 
|
| 
       107 
117 
     | 
    
         
             
                    invalid_properties.push('invalid value for "page", must be greater than or equal to 0.')
         
     | 
| 
       108 
118 
     | 
    
         
             
                  end
         
     | 
| 
       109 
119 
     | 
    
         | 
| 
      
 120 
     | 
    
         
            +
                  if @total.nil?
         
     | 
| 
      
 121 
     | 
    
         
            +
                    invalid_properties.push('invalid value for "total", total cannot be nil.')
         
     | 
| 
      
 122 
     | 
    
         
            +
                  end
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
                  if @total < 0
         
     | 
| 
      
 125 
     | 
    
         
            +
                    invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
         
     | 
| 
      
 126 
     | 
    
         
            +
                  end
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
       110 
128 
     | 
    
         
             
                  if @matches.nil?
         
     | 
| 
       111 
129 
     | 
    
         
             
                    invalid_properties.push('invalid value for "matches", matches cannot be nil.')
         
     | 
| 
       112 
130 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -122,6 +140,8 @@ module StormgateWorld 
     | 
|
| 
       122 
140 
     | 
    
         
             
                  return false if @count < 0
         
     | 
| 
       123 
141 
     | 
    
         
             
                  return false if @page.nil?
         
     | 
| 
       124 
142 
     | 
    
         
             
                  return false if @page < 0
         
     | 
| 
      
 143 
     | 
    
         
            +
                  return false if @total.nil?
         
     | 
| 
      
 144 
     | 
    
         
            +
                  return false if @total < 0
         
     | 
| 
       125 
145 
     | 
    
         
             
                  return false if @matches.nil?
         
     | 
| 
       126 
146 
     | 
    
         
             
                  true
         
     | 
| 
       127 
147 
     | 
    
         
             
                end
         
     | 
| 
         @@ -154,6 +174,20 @@ module StormgateWorld 
     | 
|
| 
       154 
174 
     | 
    
         
             
                  @page = page
         
     | 
| 
       155 
175 
     | 
    
         
             
                end
         
     | 
| 
       156 
176 
     | 
    
         | 
| 
      
 177 
     | 
    
         
            +
                # Custom attribute writer method with validation
         
     | 
| 
      
 178 
     | 
    
         
            +
                # @param [Object] total Value to be assigned
         
     | 
| 
      
 179 
     | 
    
         
            +
                def total=(total)
         
     | 
| 
      
 180 
     | 
    
         
            +
                  if total.nil?
         
     | 
| 
      
 181 
     | 
    
         
            +
                    fail ArgumentError, 'total cannot be nil'
         
     | 
| 
      
 182 
     | 
    
         
            +
                  end
         
     | 
| 
      
 183 
     | 
    
         
            +
             
     | 
| 
      
 184 
     | 
    
         
            +
                  if total < 0
         
     | 
| 
      
 185 
     | 
    
         
            +
                    fail ArgumentError, 'invalid value for "total", must be greater than or equal to 0.'
         
     | 
| 
      
 186 
     | 
    
         
            +
                  end
         
     | 
| 
      
 187 
     | 
    
         
            +
             
     | 
| 
      
 188 
     | 
    
         
            +
                  @total = total
         
     | 
| 
      
 189 
     | 
    
         
            +
                end
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
       157 
191 
     | 
    
         
             
                # Checks equality by comparing each attribute.
         
     | 
| 
       158 
192 
     | 
    
         
             
                # @param [Object] Object to be compared
         
     | 
| 
       159 
193 
     | 
    
         
             
                def ==(o)
         
     | 
| 
         @@ -161,6 +195,7 @@ module StormgateWorld 
     | 
|
| 
       161 
195 
     | 
    
         
             
                  self.class == o.class &&
         
     | 
| 
       162 
196 
     | 
    
         
             
                      count == o.count &&
         
     | 
| 
       163 
197 
     | 
    
         
             
                      page == o.page &&
         
     | 
| 
      
 198 
     | 
    
         
            +
                      total == o.total &&
         
     | 
| 
       164 
199 
     | 
    
         
             
                      matches == o.matches
         
     | 
| 
       165 
200 
     | 
    
         
             
                end
         
     | 
| 
       166 
201 
     | 
    
         | 
| 
         @@ -173,7 +208,7 @@ module StormgateWorld 
     | 
|
| 
       173 
208 
     | 
    
         
             
                # Calculates hash code according to all attributes.
         
     | 
| 
       174 
209 
     | 
    
         
             
                # @return [Integer] Hash code
         
     | 
| 
       175 
210 
     | 
    
         
             
                def hash
         
     | 
| 
       176 
     | 
    
         
            -
                  [count, page, matches].hash
         
     | 
| 
      
 211 
     | 
    
         
            +
                  [count, page, total, matches].hash
         
     | 
| 
       177 
212 
     | 
    
         
             
                end
         
     | 
| 
       178 
213 
     | 
    
         | 
| 
       179 
214 
     | 
    
         
             
                # Builds the object from hash
         
     | 
| 
         @@ -23,10 +23,14 @@ module StormgateWorld 
     | 
|
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                attr_accessor :nickname_discriminator
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :avatar_url
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
       26 
28 
     | 
    
         
             
                attr_accessor :leaderboard_entries
         
     | 
| 
       27 
29 
     | 
    
         | 
| 
       28 
30 
     | 
    
         
             
                attr_accessor :last_match_ended_at
         
     | 
| 
       29 
31 
     | 
    
         | 
| 
      
 32 
     | 
    
         
            +
                attr_accessor :last_match_started_at
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
       30 
34 
     | 
    
         
             
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
       31 
35 
     | 
    
         
             
                def self.attribute_map
         
     | 
| 
       32 
36 
     | 
    
         
             
                  {
         
     | 
| 
         @@ -34,8 +38,10 @@ module StormgateWorld 
     | 
|
| 
       34 
38 
     | 
    
         
             
                    :'anonymous' => :'anonymous',
         
     | 
| 
       35 
39 
     | 
    
         
             
                    :'nickname' => :'nickname',
         
     | 
| 
       36 
40 
     | 
    
         
             
                    :'nickname_discriminator' => :'nickname_discriminator',
         
     | 
| 
      
 41 
     | 
    
         
            +
                    :'avatar_url' => :'avatar_url',
         
     | 
| 
       37 
42 
     | 
    
         
             
                    :'leaderboard_entries' => :'leaderboard_entries',
         
     | 
| 
       38 
     | 
    
         
            -
                    :'last_match_ended_at' => :'last_match_ended_at'
         
     | 
| 
      
 43 
     | 
    
         
            +
                    :'last_match_ended_at' => :'last_match_ended_at',
         
     | 
| 
      
 44 
     | 
    
         
            +
                    :'last_match_started_at' => :'last_match_started_at'
         
     | 
| 
       39 
45 
     | 
    
         
             
                  }
         
     | 
| 
       40 
46 
     | 
    
         
             
                end
         
     | 
| 
       41 
47 
     | 
    
         | 
| 
         @@ -51,8 +57,10 @@ module StormgateWorld 
     | 
|
| 
       51 
57 
     | 
    
         
             
                    :'anonymous' => :'Boolean',
         
     | 
| 
       52 
58 
     | 
    
         
             
                    :'nickname' => :'String',
         
     | 
| 
       53 
59 
     | 
    
         
             
                    :'nickname_discriminator' => :'String',
         
     | 
| 
      
 60 
     | 
    
         
            +
                    :'avatar_url' => :'String',
         
     | 
| 
       54 
61 
     | 
    
         
             
                    :'leaderboard_entries' => :'Array<LeaderboardEntryResponse>',
         
     | 
| 
       55 
     | 
    
         
            -
                    :'last_match_ended_at' => :'Time'
         
     | 
| 
      
 62 
     | 
    
         
            +
                    :'last_match_ended_at' => :'Time',
         
     | 
| 
      
 63 
     | 
    
         
            +
                    :'last_match_started_at' => :'Time'
         
     | 
| 
       56 
64 
     | 
    
         
             
                  }
         
     | 
| 
       57 
65 
     | 
    
         
             
                end
         
     | 
| 
       58 
66 
     | 
    
         | 
| 
         @@ -61,7 +69,9 @@ module StormgateWorld 
     | 
|
| 
       61 
69 
     | 
    
         
             
                  Set.new([
         
     | 
| 
       62 
70 
     | 
    
         
             
                    :'nickname',
         
     | 
| 
       63 
71 
     | 
    
         
             
                    :'nickname_discriminator',
         
     | 
| 
       64 
     | 
    
         
            -
                    :' 
     | 
| 
      
 72 
     | 
    
         
            +
                    :'avatar_url',
         
     | 
| 
      
 73 
     | 
    
         
            +
                    :'last_match_ended_at',
         
     | 
| 
      
 74 
     | 
    
         
            +
                    :'last_match_started_at'
         
     | 
| 
       65 
75 
     | 
    
         
             
                  ])
         
     | 
| 
       66 
76 
     | 
    
         
             
                end
         
     | 
| 
       67 
77 
     | 
    
         | 
| 
         @@ -100,6 +110,10 @@ module StormgateWorld 
     | 
|
| 
       100 
110 
     | 
    
         
             
                    self.nickname_discriminator = attributes[:'nickname_discriminator']
         
     | 
| 
       101 
111 
     | 
    
         
             
                  end
         
     | 
| 
       102 
112 
     | 
    
         | 
| 
      
 113 
     | 
    
         
            +
                  if attributes.key?(:'avatar_url')
         
     | 
| 
      
 114 
     | 
    
         
            +
                    self.avatar_url = attributes[:'avatar_url']
         
     | 
| 
      
 115 
     | 
    
         
            +
                  end
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
       103 
117 
     | 
    
         
             
                  if attributes.key?(:'leaderboard_entries')
         
     | 
| 
       104 
118 
     | 
    
         
             
                    if (value = attributes[:'leaderboard_entries']).is_a?(Array)
         
     | 
| 
       105 
119 
     | 
    
         
             
                      self.leaderboard_entries = value
         
     | 
| 
         @@ -111,6 +125,10 @@ module StormgateWorld 
     | 
|
| 
       111 
125 
     | 
    
         
             
                  if attributes.key?(:'last_match_ended_at')
         
     | 
| 
       112 
126 
     | 
    
         
             
                    self.last_match_ended_at = attributes[:'last_match_ended_at']
         
     | 
| 
       113 
127 
     | 
    
         
             
                  end
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                  if attributes.key?(:'last_match_started_at')
         
     | 
| 
      
 130 
     | 
    
         
            +
                    self.last_match_started_at = attributes[:'last_match_started_at']
         
     | 
| 
      
 131 
     | 
    
         
            +
                  end
         
     | 
| 
       114 
132 
     | 
    
         
             
                end
         
     | 
| 
       115 
133 
     | 
    
         | 
| 
       116 
134 
     | 
    
         
             
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
         @@ -152,8 +170,10 @@ module StormgateWorld 
     | 
|
| 
       152 
170 
     | 
    
         
             
                      anonymous == o.anonymous &&
         
     | 
| 
       153 
171 
     | 
    
         
             
                      nickname == o.nickname &&
         
     | 
| 
       154 
172 
     | 
    
         
             
                      nickname_discriminator == o.nickname_discriminator &&
         
     | 
| 
      
 173 
     | 
    
         
            +
                      avatar_url == o.avatar_url &&
         
     | 
| 
       155 
174 
     | 
    
         
             
                      leaderboard_entries == o.leaderboard_entries &&
         
     | 
| 
       156 
     | 
    
         
            -
                      last_match_ended_at == o.last_match_ended_at
         
     | 
| 
      
 175 
     | 
    
         
            +
                      last_match_ended_at == o.last_match_ended_at &&
         
     | 
| 
      
 176 
     | 
    
         
            +
                      last_match_started_at == o.last_match_started_at
         
     | 
| 
       157 
177 
     | 
    
         
             
                end
         
     | 
| 
       158 
178 
     | 
    
         | 
| 
       159 
179 
     | 
    
         
             
                # @see the `==` method
         
     | 
| 
         @@ -165,7 +185,7 @@ module StormgateWorld 
     | 
|
| 
       165 
185 
     | 
    
         
             
                # Calculates hash code according to all attributes.
         
     | 
| 
       166 
186 
     | 
    
         
             
                # @return [Integer] Hash code
         
     | 
| 
       167 
187 
     | 
    
         
             
                def hash
         
     | 
| 
       168 
     | 
    
         
            -
                  [id, anonymous, nickname, nickname_discriminator, leaderboard_entries, last_match_ended_at].hash
         
     | 
| 
      
 188 
     | 
    
         
            +
                  [id, anonymous, nickname, nickname_discriminator, avatar_url, leaderboard_entries, last_match_ended_at, last_match_started_at].hash
         
     | 
| 
       169 
189 
     | 
    
         
             
                end
         
     | 
| 
       170 
190 
     | 
    
         | 
| 
       171 
191 
     | 
    
         
             
                # Builds the object from hash
         
     | 
| 
         @@ -17,10 +17,9 @@ module StormgateWorld 
     | 
|
| 
       17 
17 
     | 
    
         
             
              class Race
         
     | 
| 
       18 
18 
     | 
    
         
             
                INFERNALS = "infernals".freeze
         
     | 
| 
       19 
19 
     | 
    
         
             
                VANGUARD = "vanguard".freeze
         
     | 
| 
       20 
     | 
    
         
            -
                RANDOM = "random".freeze
         
     | 
| 
       21 
20 
     | 
    
         | 
| 
       22 
21 
     | 
    
         
             
                def self.all_vars
         
     | 
| 
       23 
     | 
    
         
            -
                  @all_vars ||= [INFERNALS, VANGUARD 
     | 
| 
      
 22 
     | 
    
         
            +
                  @all_vars ||= [INFERNALS, VANGUARD].freeze
         
     | 
| 
       24 
23 
     | 
    
         
             
                end
         
     | 
| 
       25 
24 
     | 
    
         | 
| 
       26 
25 
     | 
    
         
             
                # Builds the enum from string
         
     | 
| 
         @@ -0,0 +1,42 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #api
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            The version of the OpenAPI document: 0.1.1
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://openapi-generator.tech
         
     | 
| 
      
 9 
     | 
    
         
            +
            OpenAPI Generator version: 7.3.0
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
            require 'time'
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            module StormgateWorld
         
     | 
| 
      
 17 
     | 
    
         
            +
              class Resolution
         
     | 
| 
      
 18 
     | 
    
         
            +
                MINUTE = "minute".freeze
         
     | 
| 
      
 19 
     | 
    
         
            +
                HOUR = "hour".freeze
         
     | 
| 
      
 20 
     | 
    
         
            +
                DAY = "day".freeze
         
     | 
| 
      
 21 
     | 
    
         
            +
                WEEK = "week".freeze
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                def self.all_vars
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @all_vars ||= [MINUTE, HOUR, DAY, WEEK].freeze
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                # Builds the enum from string
         
     | 
| 
      
 28 
     | 
    
         
            +
                # @param [String] The enum value in the form of the string
         
     | 
| 
      
 29 
     | 
    
         
            +
                # @return [String] The enum value
         
     | 
| 
      
 30 
     | 
    
         
            +
                def self.build_from_hash(value)
         
     | 
| 
      
 31 
     | 
    
         
            +
                  new.build_from_hash(value)
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                # Builds the enum from string
         
     | 
| 
      
 35 
     | 
    
         
            +
                # @param [String] The enum value in the form of the string
         
     | 
| 
      
 36 
     | 
    
         
            +
                # @return [String] The enum value
         
     | 
| 
      
 37 
     | 
    
         
            +
                def build_from_hash(value)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  return value if Resolution.all_vars.include?(value)
         
     | 
| 
      
 39 
     | 
    
         
            +
                  raise "Invalid ENUM value #{value} for class #Resolution"
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
              end
         
     | 
| 
      
 42 
     | 
    
         
            +
            end
         
     |