Class: Halo::Halo5::Ugc
Instance Method Summary
collapse
Methods inherited from APIResponse
#cached?, #get_data, #perform_uncached_request, #redis_store, #ttl
Constructor Details
#initialize(options = {}) ⇒ Ugc
Returns a new instance of Ugc.
6
7
8
9
10
11
|
# File 'lib/halo-api/modules/halo5/ugc.rb', line 6
def initialize(options = {})
@player = options.delete(:player)
@endpoint = "/ugc/h5/players/#{@player}"
super(options)
end
|
Instance Method Details
#player_game_variant(variant, options = {}) ⇒ Object
13
14
15
|
# File 'lib/halo-api/modules/halo5/ugc.rb', line 13
def player_game_variant(variant, options = {})
get_data("#{@endpoint}/gamevariants/#{variant}", options)
end
|
#player_game_variants(options = {}) ⇒ Object
17
18
19
|
# File 'lib/halo-api/modules/halo5/ugc.rb', line 17
def player_game_variants(options = {})
get_data("#{@endpoint}/gamevariants", options)
end
|
#player_map_variant(variant, options = {}) ⇒ Object
21
22
23
|
# File 'lib/halo-api/modules/halo5/ugc.rb', line 21
def player_map_variant(variant, options = {})
get_data("#{@endpoint}/mapvariants/#{variant}", options)
end
|
#player_map_variants(options = {}) ⇒ Object
25
26
27
|
# File 'lib/halo-api/modules/halo5/ugc.rb', line 25
def player_map_variants(options = {})
get_data("#{@endpoint}/mapvariants", options)
end
|