Class: Halo::HaloWars2::Stats
Instance Method Summary
collapse
-
#initialize(options = {}) ⇒ Stats
constructor
-
#leaderboard_player_csr(season_id, playlist_id, options = {}) ⇒ Object
-
#match_events(match_id, options = {}) ⇒ Object
-
#match_result(match_id, options = {}) ⇒ Object
-
#player_campaign_progress(player, options = {}) ⇒ Object
-
#player_match_history(player, options = {}) ⇒ Object
-
#player_playlist_ratings(playlist_id, players, options = {}) ⇒ Object
-
#player_season_stats_summary(player, season_id, options = {}) ⇒ Object
-
#player_stats_summary(player, options = {}) ⇒ Object
-
#player_xp(players, options = {}) ⇒ Object
Methods inherited from APIResponse
#cached?, #get_data, #perform_uncached_request, #redis_store, #ttl
Constructor Details
#initialize(options = {}) ⇒ Stats
6
7
8
9
10
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 6
def initialize(options = {})
@endpoint = '/stats/hw2'
super(options)
end
|
Instance Method Details
#leaderboard_player_csr(season_id, playlist_id, options = {}) ⇒ Object
12
13
14
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 12
def leaderboard_player_csr(season_id, playlist_id, options = {})
get_data("#{@endpoint}/player-leaderboards/csr/#{season_id}/#{playlist_id}", options)
end
|
#match_events(match_id, options = {}) ⇒ Object
16
17
18
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 16
def match_events(match_id, options = {})
get_data("#{@endpoint}/matches/#{match_id}/events", options)
end
|
#match_result(match_id, options = {}) ⇒ Object
20
21
22
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 20
def match_result(match_id, options = {})
get_data("#{@endpoint}/matches/#{match_id}", options)
end
|
#player_campaign_progress(player, options = {}) ⇒ Object
24
25
26
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 24
def player_campaign_progress(player, options = {})
get_data("#{@endpoint}/players/#{player}/campaign-progress", options)
end
|
#player_match_history(player, options = {}) ⇒ Object
28
29
30
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 28
def player_match_history(player, options = {})
get_data("#{@endpoint}/players/#{player}/matches", options)
end
|
#player_playlist_ratings(playlist_id, players, options = {}) ⇒ Object
32
33
34
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 32
def player_playlist_ratings(playlist_id, players, options = {})
get_data("#{@endpoint}/playlist/#{playlist_id}/rating", options.merge(players: players))
end
|
#player_season_stats_summary(player, season_id, options = {}) ⇒ Object
36
37
38
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 36
def player_season_stats_summary(player, season_id, options = {})
get_data("#{@endpoint}/players/#{player}/stats/seasons/#{season_id}", options)
end
|
#player_stats_summary(player, options = {}) ⇒ Object
40
41
42
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 40
def player_stats_summary(player, options = {})
get_data("#{@endpoint}/players/#{player}/stats", options)
end
|
#player_xp(players, options = {}) ⇒ Object
44
45
46
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 44
def player_xp(players, options = {})
get_data("#{@endpoint}/xp", options.merge(players: players))
end
|