Commit cc2813c4 authored by Francis's avatar Francis
Browse files

Fix D3 profile URLs

parent 28ce3e28
Pipeline #137002807 passed with stage
in 5 minutes
Please view this file on the master branch, otherwise it may be outdated
**Version 0.3.9**
Fix D3 profile URLs.
**Version 0.3.8**
Added new profession endpoints.
https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-api-patch-notes-20200414/5680
......
PATH
remote: .
specs:
blizzard_api (0.3.7)
blizzard_api (0.3.9)
redis (~> 4.1, >= 4.1.0)
GEM
......
......@@ -22,7 +22,7 @@ module BlizzardApi
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
def index(battletag, oauth_token, options = {})
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
api_request "#{base_url(:community)}/data/profile/#{parse_battle_tag(battletag)}", opts
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}", opts
end
##
......@@ -38,7 +38,7 @@ module BlizzardApi
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
def hero(battletag, oauth_token, hero_id, options = {})
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
api_request "#{base_url(:community)}/data/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}", opts
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}", opts
end
##
......@@ -54,7 +54,7 @@ module BlizzardApi
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
def hero_items(battletag, oauth_token, hero_id, options = {})
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
api_request "#{base_url(:community)}/data/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/items", opts
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/items", opts
end
##
......@@ -70,7 +70,7 @@ module BlizzardApi
# @see https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow
def hero_follower_items(battletag, oauth_token, hero_id, options = {})
opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge(options)
api_request "#{base_url(:community)}/data/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/follower-items", opts
api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/follower-items", opts
end
private
......
......@@ -2,5 +2,5 @@
module BlizzardApi
# Gem version
VERSION = '0.3.8'
VERSION = '0.3.9'
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment