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
5
6
7
8
9
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 5
def initialize(options = {})
@endpoint = '/stats/hw2'
super(options)
end
|
Instance Method Details
#leaderboard_player_csr(season_id, playlist_id, options = {}) ⇒ Object
11
12
13
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 11
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
15
16
17
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 15
def match_events(match_id, options = {})
get_data("#{@endpoint}/matches/#{match_id}/events", options)
end
|
#match_result(match_id, options = {}) ⇒ Object
19
20
21
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 19
def match_result(match_id, options = {})
get_data("#{@endpoint}/matches/#{match_id}", options)
end
|
#player_campaign_progress(player, options = {}) ⇒ Object
23
24
25
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 23
def player_campaign_progress(player, options = {})
get_data("#{@endpoint}/players/#{player}/campaign-progress", options)
end
|
#player_match_history(player, options = {}) ⇒ Object
27
28
29
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 27
def player_match_history(player, options = {})
get_data("#{@endpoint}/players/#{player}/matches", options)
end
|
#player_playlist_ratings(playlist_id, players, options = {}) ⇒ Object
31
32
33
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 31
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
35
36
37
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 35
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
39
40
41
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 39
def player_stats_summary(player, options = {})
get_data("#{@endpoint}/players/#{player}/stats", options)
end
|
#player_xp(players, options = {}) ⇒ Object
43
44
45
|
# File 'lib/halo-api/modules/halo_wars2/stats.rb', line 43
def player_xp(players, options = {})
get_data("#{@endpoint}/xp", options.merge(players: players))
end
|