Class: StormgateWorld::StatisticsApi
- Inherits:
-
Object
- Object
- StormgateWorld::StatisticsApi
- Defined in:
- lib/stormgate_world/api/statistics_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #get_statistics(opts = {}) ⇒ StatsByTime
- #get_statistics_activity(opts = {}) ⇒ ActivityStatistics
-
#get_statistics_activity_with_http_info(opts = {}) ⇒ Array<(ActivityStatistics, Integer, Hash)>
ActivityStatistics data, response status code and response headers.
- #get_statistics_countries(opts = {}) ⇒ CountriesStatistics
-
#get_statistics_countries_with_http_info(opts = {}) ⇒ Array<(CountriesStatistics, Integer, Hash)>
CountriesStatistics data, response status code and response headers.
- #get_statistics_servers(opts = {}) ⇒ ServersStatistics
-
#get_statistics_servers_with_http_info(opts = {}) ⇒ Array<(ServersStatistics, Integer, Hash)>
ServersStatistics data, response status code and response headers.
-
#get_statistics_with_http_info(opts = {}) ⇒ Array<(StatsByTime, Integer, Hash)>
StatsByTime data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ StatisticsApi
constructor
A new instance of StatisticsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ StatisticsApi
Returns a new instance of StatisticsApi.
19 20 21 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_statistics(opts = {}) ⇒ StatsByTime
26 27 28 29 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 26 def get_statistics(opts = {}) data, _status_code, _headers = get_statistics_with_http_info(opts) data end |
#get_statistics_activity(opts = {}) ⇒ ActivityStatistics
89 90 91 92 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 89 def get_statistics_activity(opts = {}) data, _status_code, _headers = get_statistics_activity_with_http_info(opts) data end |
#get_statistics_activity_with_http_info(opts = {}) ⇒ Array<(ActivityStatistics, Integer, Hash)>
Returns ActivityStatistics data, response status code and response headers.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 98 def get_statistics_activity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StatisticsApi.get_statistics_activity ...' end # resource path local_var_path = '/v0/statistics/activity' # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActivityStatistics' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"StatisticsApi.get_statistics_activity", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: StatisticsApi#get_statistics_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_statistics_countries(opts = {}) ⇒ CountriesStatistics
148 149 150 151 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 148 def get_statistics_countries(opts = {}) data, _status_code, _headers = get_statistics_countries_with_http_info(opts) data end |
#get_statistics_countries_with_http_info(opts = {}) ⇒ Array<(CountriesStatistics, Integer, Hash)>
Returns CountriesStatistics data, response status code and response headers.
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 157 def get_statistics_countries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StatisticsApi.get_statistics_countries ...' end # resource path local_var_path = '/v0/statistics/countries' # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CountriesStatistics' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"StatisticsApi.get_statistics_countries", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: StatisticsApi#get_statistics_countries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_statistics_servers(opts = {}) ⇒ ServersStatistics
207 208 209 210 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 207 def get_statistics_servers(opts = {}) data, _status_code, _headers = get_statistics_servers_with_http_info(opts) data end |
#get_statistics_servers_with_http_info(opts = {}) ⇒ Array<(ServersStatistics, Integer, Hash)>
Returns ServersStatistics data, response status code and response headers.
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 216 def get_statistics_servers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StatisticsApi.get_statistics_servers ...' end # resource path local_var_path = '/v0/statistics/servers' # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ServersStatistics' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"StatisticsApi.get_statistics_servers", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: StatisticsApi#get_statistics_servers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_statistics_with_http_info(opts = {}) ⇒ Array<(StatsByTime, Integer, Hash)>
Returns StatsByTime data, response status code and response headers.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/stormgate_world/api/statistics_api.rb', line 35 def get_statistics_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StatisticsApi.get_statistics ...' end if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 0 fail ArgumentError, 'invalid value for "opts[:"count"]" when calling StatisticsApi.get_statistics, must be greater than or equal to 0.' end # resource path local_var_path = '/v0/statistics/ranked_1v1' # query parameters query_params = opts[:query_params] || {} query_params[:'league'] = opts[:'league'] if !opts[:'league'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'StatsByTime' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"StatisticsApi.get_statistics", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: StatisticsApi#get_statistics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |