Skip to content

Latest commit

 

History

History
145 lines (96 loc) · 3.36 KB

LeaderboardsApi.md

File metadata and controls

145 lines (96 loc) · 3.36 KB

StormgateWorld::LeaderboardsApi

All URIs are relative to https://api.stormgateworld.com

Method HTTP request Description
get_leaderboard GET /v0/leaderboards/ranked_1v1
get_leaderboard_dump GET /v0/leaderboards/ranked_1v1/dump

get_leaderboard

get_leaderboard(opts)

Examples

require 'time'
require 'stormgate_world'

api_instance = StormgateWorld::LeaderboardsApi.new
opts = {
  race: StormgateWorld::Race::INFERNALS, # Race | 
  page: 789, # Integer | 
  count: 789, # Integer | 
  order: StormgateWorld::LeaderboardOrder::POINTS, # LeaderboardOrder | 
  query: 'query_example' # String | 
}

begin
  
  result = api_instance.get_leaderboard(opts)
  p result
rescue StormgateWorld::ApiError => e
  puts "Error when calling LeaderboardsApi->get_leaderboard: #{e}"
end

Using the get_leaderboard_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_leaderboard_with_http_info(opts)

begin
  
  data, status_code, headers = api_instance.get_leaderboard_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <LeaderboardResponse>
rescue StormgateWorld::ApiError => e
  puts "Error when calling LeaderboardsApi->get_leaderboard_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
race Race [optional]
page Integer [optional]
count Integer [optional]
order LeaderboardOrder [optional]
query String [optional]

Return type

LeaderboardResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_leaderboard_dump

get_leaderboard_dump(opts)

Examples

require 'time'
require 'stormgate_world'

api_instance = StormgateWorld::LeaderboardsApi.new
opts = {
  format: StormgateWorld::DumpFormat::JSON # DumpFormat | 
}

begin
  
  result = api_instance.get_leaderboard_dump(opts)
  p result
rescue StormgateWorld::ApiError => e
  puts "Error when calling LeaderboardsApi->get_leaderboard_dump: #{e}"
end

Using the get_leaderboard_dump_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_leaderboard_dump_with_http_info(opts)

begin
  
  data, status_code, headers = api_instance.get_leaderboard_dump_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <LeaderboardDumpResponse>
rescue StormgateWorld::ApiError => e
  puts "Error when calling LeaderboardsApi->get_leaderboard_dump_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
format DumpFormat [optional]

Return type

LeaderboardDumpResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json