Module: BnetApi::OAuth
Overview
All API methods requiring OAuth authentication are contained in this module.
Instance Method Summary collapse
-
#account_id(access_token) ⇒ Hash
Retrieves the account ID number for the user with the specified access token.
-
#battletag(access_token) ⇒ Hash
Retrieves the battletag for the user with the specified access token.
-
#sc2_profile(access_token) ⇒ Hash
Retrieves the Starcraft II profile for the user with the specified access token.
-
#wow_profile(access_token) ⇒ Hash
Retrieves the World of Warcraft profile for the user with the specified access token.
Instance Method Details
#account_id(access_token) ⇒ Hash
Retrieves the account ID number for the user with the specified access token.
10 11 12 |
# File 'lib/bnet_api/oauth.rb', line 10 def account_id(access_token) BnetApi.make_request_oauth('/account/user/id', access_token) end |
#battletag(access_token) ⇒ Hash
Retrieves the battletag for the user with the specified access token.
18 19 20 |
# File 'lib/bnet_api/oauth.rb', line 18 def battletag(access_token) BnetApi.make_request_oauth('/account/user/battletag', access_token) end |
#sc2_profile(access_token) ⇒ Hash
Retrieves the Starcraft II profile for the user with the specified access token.
26 27 28 |
# File 'lib/bnet_api/oauth.rb', line 26 def sc2_profile(access_token) BnetApi.make_request_oauth('/sc2/profile/user', access_token) end |
#wow_profile(access_token) ⇒ Hash
Retrieves the World of Warcraft profile for the user with the specified access token.
34 35 36 |
# File 'lib/bnet_api/oauth.rb', line 34 def wow_profile(access_token) BnetApi.make_request_oauth('/wow/user/characters', access_token) end |