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.



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

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

Instance Method Details

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



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

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

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



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

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

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



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

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



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

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

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



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

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

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



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

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

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



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

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

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



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

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

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



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

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



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

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

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



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

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

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



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

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

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



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

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

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



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

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

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



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

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

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



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

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

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



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

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