Class: Halo::Halo5::Stats

Inherits:
APIResponse show all
Defined in:
lib/halo-api/modules/halo5/stats.rb

Instance Method Summary collapse

Methods inherited from APIResponse

#cached?, #get_data, #perform_uncached_request, #redis_store, #ttl

Constructor Details

#initialize(options = {}) ⇒ Stats

Returns a new instance of Stats.



5
6
7
8
# File 'lib/halo-api/modules/halo5/stats.rb', line 5

def initialize(options = {})
  @endpoint = '/stats/h5'
  super(options)
end

Instance Method Details

#company(company_id, options = {}) ⇒ Object



10
11
12
# File 'lib/halo-api/modules/halo5/stats.rb', line 10

def company(company_id, options = {})
  get_data("#{@endpoint}/companies/#{company_id}", options)
end

#company_commendations(company_id, options = {}) ⇒ Object



14
15
16
# File 'lib/halo-api/modules/halo5/stats.rb', line 14

def company_commendations(company_id, options = {})
  get_data("#{@endpoint}/companies/#{company_id}/commendations", options)
end

#leaderboard_player_csr(season_id, playlist_id, options = {}) ⇒ Object



18
19
20
# File 'lib/halo-api/modules/halo5/stats.rb', line 18

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



22
23
24
# File 'lib/halo-api/modules/halo5/stats.rb', line 22

def match_events(match_id, options = {})
  get_data("#{@endpoint}/matches/#{match_id}/events", options)
end

#match_result_arena(match_id, options = {}) ⇒ Object



26
27
28
# File 'lib/halo-api/modules/halo5/stats.rb', line 26

def match_result_arena(match_id, options = {})
  get_data("#{@endpoint}/arena/matches/#{match_id}", options)
end

#match_result_campaign(match_id, options = {}) ⇒ Object



30
31
32
# File 'lib/halo-api/modules/halo5/stats.rb', line 30

def match_result_campaign(match_id, options = {})
  get_data("#{@endpoint}/campaign/matches/#{match_id}", options)
end

#match_result_custom(match_id, options = {}) ⇒ Object



34
35
36
# File 'lib/halo-api/modules/halo5/stats.rb', line 34

def match_result_custom(match_id, options = {})
  get_data("#{@endpoint}/custom/matches/#{match_id}", options)
end

#match_result_warzone(match_id, options = {}) ⇒ Object



38
39
40
# File 'lib/halo-api/modules/halo5/stats.rb', line 38

def match_result_warzone(match_id, options = {})
  get_data("#{@endpoint}/warzone/matches/#{match_id}", options)
end

#pc_match_result_custom(match_id, options = {}) ⇒ Object



66
67
68
# File 'lib/halo-api/modules/halo5/stats.rb', line 66

def pc_match_result_custom(match_id, options = {})
  get_data("#{@endpoint}pc/custom/matches/#{match_id}", options)
end

#pc_player_match_history(player, options = {}) ⇒ Object



70
71
72
# File 'lib/halo-api/modules/halo5/stats.rb', line 70

def pc_player_match_history(player, options = {})
  get_data("#{@endpoint}pc/players/#{player}/matches", options)
end

#pc_psr_custom(players, options = {}) ⇒ Object



74
75
76
# File 'lib/halo-api/modules/halo5/stats.rb', line 74

def pc_psr_custom(players, options = {})
  get_data("#{@endpoint}pc/servicerecords/custom", options.merge(players: players))
end

#player_commendations(player, options = {}) ⇒ Object



42
43
44
# File 'lib/halo-api/modules/halo5/stats.rb', line 42

def player_commendations(player, options = {})
  get_data("#{@endpoint}/players/#{player}/commendations", options)
end

#player_match_history(player, options = {}) ⇒ Object



46
47
48
# File 'lib/halo-api/modules/halo5/stats.rb', line 46

def player_match_history(player, options = {})
  get_data("#{@endpoint}/players/#{player}/matches", options)
end

#psr_arena(players, options = {}) ⇒ Object



50
51
52
# File 'lib/halo-api/modules/halo5/stats.rb', line 50

def psr_arena(players, options = {})
  get_data("#{@endpoint}/servicerecords/arena", options.merge(players: players))
end

#psr_campaign(players, options = {}) ⇒ Object



54
55
56
# File 'lib/halo-api/modules/halo5/stats.rb', line 54

def psr_campaign(players, options = {})
  get_data("#{@endpoint}/servicerecords/campaign", options.merge(players: players))
end

#psr_custom(players, options = {}) ⇒ Object



58
59
60
# File 'lib/halo-api/modules/halo5/stats.rb', line 58

def psr_custom(players, options = {})
  get_data("#{@endpoint}/servicerecords/custom", options.merge(players: players))
end

#psr_warzone(players, options = {}) ⇒ Object



62
63
64
# File 'lib/halo-api/modules/halo5/stats.rb', line 62

def psr_warzone(players, options = {})
  get_data("#{@endpoint}/servicerecords/warzone", options.merge(players: players))
end