Class: BN::API::D3
Overview
The the Diablo 3 API requester.
Instance Method Summary collapse
-
#hero(options = {}) ⇒ HTTPI::Response
Request a hero.
-
#profile(options = {}) ⇒ HTTPI::Response
Request a profile.
Methods inherited from Base
Methods included from Helpers::HasAttributes
included, #initialize, #update_attributes
Constructor Details
This class inherits a constructor from BN::API::Base
Instance Method Details
#hero(options = {}) ⇒ HTTPI::Response
Request a hero.
26 27 28 29 30 31 32 33 |
# File 'lib/bn/api/d3.rb', line 26 def hero(={}) = .to_h battle_tag = sanitize_battle_tag(.delete(:battle_tag)) id = sanitize_id(.delete(:id)) get("/d3/profile/#{battle_tag}/hero/#{id}", ) end |
#profile(options = {}) ⇒ HTTPI::Response
Request a profile.
12 13 14 15 16 17 18 |
# File 'lib/bn/api/d3.rb', line 12 def profile(={}) = .to_h battle_tag = sanitize_battle_tag(.delete(:battle_tag)) get("/d3/profile/#{battle_tag}", ) end |