Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Francis
Blizzard api
Commits
af98f67a
Commit
af98f67a
authored
Mar 05, 2020
by
Francis
Browse files
Fixed account profile endpoints
parent
25e83f33
Pipeline
#123430340
failed with stage
in 58 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
CHANGELOG.md
CHANGELOG.md
+4
-0
lib/blizzard_api/version.rb
lib/blizzard_api/version.rb
+1
-1
lib/blizzard_api/wow.rb
lib/blizzard_api/wow.rb
+1
-1
lib/blizzard_api/wow/profile/profile.rb
lib/blizzard_api/wow/profile/profile.rb
+7
-5
No files found.
CHANGELOG.md
View file @
af98f67a
Please view this file on the master branch, otherwise it may be outdated
**Version 0.3.4**
Fixed account endpoints
**Version 0.3.3**
Added character profile encounter endpoints:
...
...
lib/blizzard_api/version.rb
View file @
af98f67a
...
...
@@ -2,5 +2,5 @@
module
BlizzardApi
# Gem version
VERSION
=
'0.3.
3
'
VERSION
=
'0.3.
4
'
end
lib/blizzard_api/wow.rb
View file @
af98f67a
...
...
@@ -258,7 +258,7 @@ module BlizzardApi
#
# @return {Profile}
def
self
.
profile
(
token
)
BlizzardApi
::
Wow
::
Profile
.
new
(
token
)
BlizzardApi
::
Wow
::
Account
Profile
.
new
(
token
)
end
##
...
...
lib/blizzard_api/wow/profile/profile.rb
View file @
af98f67a
...
...
@@ -7,7 +7,8 @@ module BlizzardApi
class
AccountProfile
<
Request
##
# @param token [String] A token obtained using the authorization_code flow
def
initialize
(
token
)
def
initialize
(
token
,
region
=
nil
)
super
region
@token
=
token
end
...
...
@@ -17,8 +18,8 @@ module BlizzardApi
# @!macro request_options
#
# @!macro response
def
get
(
_
options
=
{})
api_request
base_url
(
:user_profile
).
to_s
def
get
(
options
=
{})
api_request
base_url
(
:user_profile
).
to_s
,
default_options
.
merge
(
options
)
end
##
...
...
@@ -67,8 +68,9 @@ module BlizzardApi
{
ttl:
CACHE_HOUR
,
namespace: :profile
}
end
def
api_request
(
_uri
,
query_string
=
nil
)
query_string
[
:access_token
]
=
@token
def
api_request
(
_uri
,
query_string
=
{})
query_string
.
merge!
access_token:
@token
super
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment