blizzard_api 0.5.6 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +6 -2
- data/blizzard_api.gemspec +2 -1
- data/lib/blizzard_api/configuration.rb +10 -34
- data/lib/blizzard_api/diablo/community/act.rb +2 -2
- data/lib/blizzard_api/diablo/community/artisan.rb +2 -2
- data/lib/blizzard_api/diablo/community/character.rb +2 -2
- data/lib/blizzard_api/diablo/community/follower.rb +1 -1
- data/lib/blizzard_api/diablo/community/item.rb +1 -1
- data/lib/blizzard_api/diablo/community/item_type.rb +2 -2
- data/lib/blizzard_api/diablo/community/profile.rb +4 -4
- data/lib/blizzard_api/diablo/game_data/generic_data_endpoint.rb +3 -3
- data/lib/blizzard_api/hearthstone/game_data/back.rb +1 -1
- data/lib/blizzard_api/hearthstone/game_data/card.rb +2 -2
- data/lib/blizzard_api/hearthstone/game_data/generic_data_endpoint.rb +2 -2
- data/lib/blizzard_api/request.rb +24 -7
- data/lib/blizzard_api/starcraft.rb +1 -1
- data/lib/blizzard_api/starcraft/community/account.rb +1 -1
- data/lib/blizzard_api/starcraft/community/ladder.rb +2 -2
- data/lib/blizzard_api/starcraft/community/legacy.rb +3 -4
- data/lib/blizzard_api/starcraft/community/profile.rb +5 -5
- data/lib/blizzard_api/starcraft/game_data/league.rb +1 -1
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow/game_data/achievement.rb +3 -3
- data/lib/blizzard_api/wow/game_data/auction.rb +20 -2
- data/lib/blizzard_api/wow/game_data/azerite_essence.rb +1 -1
- data/lib/blizzard_api/wow/game_data/covenant.rb +5 -5
- data/lib/blizzard_api/wow/game_data/creature.rb +13 -7
- data/lib/blizzard_api/wow/game_data/generic_data_endpoint.rb +20 -8
- data/lib/blizzard_api/wow/game_data/guild_crest.rb +4 -2
- data/lib/blizzard_api/wow/game_data/item.rb +10 -6
- data/lib/blizzard_api/wow/game_data/journal.rb +8 -8
- data/lib/blizzard_api/wow/game_data/modified_crafting.rb +4 -4
- data/lib/blizzard_api/wow/game_data/mythic_keystone.rb +6 -6
- data/lib/blizzard_api/wow/game_data/mythic_keystone_affix.rb +1 -1
- data/lib/blizzard_api/wow/game_data/mythic_keystone_leaderboard.rb +2 -2
- data/lib/blizzard_api/wow/game_data/mythic_raid_leaderboard.rb +1 -1
- data/lib/blizzard_api/wow/game_data/pet.rb +4 -4
- data/lib/blizzard_api/wow/game_data/playable_class.rb +10 -8
- data/lib/blizzard_api/wow/game_data/playable_specialization.rb +8 -8
- data/lib/blizzard_api/wow/game_data/profession.rb +4 -4
- data/lib/blizzard_api/wow/game_data/pvp_season.rb +5 -3
- data/lib/blizzard_api/wow/game_data/pvp_tier.rb +1 -1
- data/lib/blizzard_api/wow/game_data/quest.rb +6 -6
- data/lib/blizzard_api/wow/game_data/reputation.rb +4 -4
- data/lib/blizzard_api/wow/game_data/spell.rb +1 -1
- data/lib/blizzard_api/wow/game_data/talent.rb +2 -2
- data/lib/blizzard_api/wow/game_data/tech_talent.rb +3 -3
- data/lib/blizzard_api/wow/game_data/wow_token.rb +1 -1
- data/lib/blizzard_api/wow/profile/character_profile.rb +27 -27
- data/lib/blizzard_api/wow/profile/guild.rb +5 -5
- data/lib/blizzard_api/wow/profile/profile.rb +6 -6
- data/lib/blizzard_api/wow/search/search_composer.rb +2 -2
- data/lib/blizzard_api/wow/search/search_request.rb +1 -1
- metadata +18 -4
@@ -16,7 +16,7 @@ module BlizzardApi
|
|
16
16
|
# @param [Integer] account_id Account ID
|
17
17
|
# @!macro request_options
|
18
18
|
def player(account_id, **options)
|
19
|
-
api_request "#{base_url(:community)}/player/#{account_id}", { ttl: CACHE_DAY }.merge(options)
|
19
|
+
api_request "#{base_url(:community)}/player/#{account_id}", **{ ttl: CACHE_DAY }.merge(options)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -17,7 +17,7 @@ module BlizzardApi
|
|
17
17
|
# @!macro request_options
|
18
18
|
def grandmaster(region_id, **options)
|
19
19
|
reg = resolve_region(region_id)
|
20
|
-
api_request "#{base_url(:community)}/ladder/grandmaster/#{reg}", { ttl: CACHE_DAY }.merge(options)
|
20
|
+
api_request "#{base_url(:community)}/ladder/grandmaster/#{reg}", **{ ttl: CACHE_DAY }.merge(options)
|
21
21
|
end
|
22
22
|
|
23
23
|
##
|
@@ -27,7 +27,7 @@ module BlizzardApi
|
|
27
27
|
# @!macro request_options
|
28
28
|
def season(region_id, **options)
|
29
29
|
reg = resolve_region(region_id)
|
30
|
-
api_request "#{base_url(:community)}/ladder/season/#{reg}", { ttl: CACHE_DAY }.merge(options)
|
30
|
+
api_request "#{base_url(:community)}/ladder/season/#{reg}", **{ ttl: CACHE_DAY }.merge(options)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -10,7 +10,6 @@ module BlizzardApi
|
|
10
10
|
# You can get an instance of this class using the default region as follows:
|
11
11
|
# api_instance = BlizzardApi::Starcraft.legacy
|
12
12
|
class Legacy < Starcraft::Request
|
13
|
-
|
14
13
|
##
|
15
14
|
# Profile data
|
16
15
|
#
|
@@ -49,7 +48,7 @@ module BlizzardApi
|
|
49
48
|
opts = { ttl: CACHE_DAY }.merge(options)
|
50
49
|
api_request "#{base_url(:community)}/legacy/profile/#{reg}/#{realm_id}/#{profile_id}/matches", opts
|
51
50
|
end
|
52
|
-
|
51
|
+
|
53
52
|
##
|
54
53
|
# Ladder
|
55
54
|
#
|
@@ -61,7 +60,7 @@ module BlizzardApi
|
|
61
60
|
opts = { ttl: CACHE_DAY }.merge(options)
|
62
61
|
api_request "#{base_url(:community)}/legacy/ladder/#{reg}/#{ladder_id}", opts
|
63
62
|
end
|
64
|
-
|
63
|
+
|
65
64
|
##
|
66
65
|
# Achievement data
|
67
66
|
#
|
@@ -72,7 +71,7 @@ module BlizzardApi
|
|
72
71
|
opts = { ttl: CACHE_DAY }.merge(options)
|
73
72
|
api_request "#{base_url(:community)}/legacy/data/achievements/#{reg}", opts
|
74
73
|
end
|
75
|
-
|
74
|
+
|
76
75
|
##
|
77
76
|
# Rewards data
|
78
77
|
#
|
@@ -17,7 +17,7 @@ module BlizzardApi
|
|
17
17
|
# @!macro request_options
|
18
18
|
def static(region_id, **options)
|
19
19
|
reg = resolve_region(region_id)
|
20
|
-
api_request "#{base_url(:community)}/static/profile/#{reg}", { ttl: CACHE_DAY }.merge(options)
|
20
|
+
api_request "#{base_url(:community)}/static/profile/#{reg}", **{ ttl: CACHE_DAY }.merge(options)
|
21
21
|
end
|
22
22
|
|
23
23
|
##
|
@@ -30,7 +30,7 @@ module BlizzardApi
|
|
30
30
|
def metadata(region_id, realm_id, profile_id, **options)
|
31
31
|
reg = resolve_region(region_id)
|
32
32
|
opts = { ttl: CACHE_DAY }.merge(options)
|
33
|
-
api_request "#{base_url(:community)}/metadata/profile/#{reg}/#{realm_id}/#{profile_id}", opts
|
33
|
+
api_request "#{base_url(:community)}/metadata/profile/#{reg}/#{realm_id}/#{profile_id}", **opts
|
34
34
|
end
|
35
35
|
|
36
36
|
##
|
@@ -43,7 +43,7 @@ module BlizzardApi
|
|
43
43
|
def profile(region_id, realm_id, profile_id, **options)
|
44
44
|
reg = resolve_region(region_id)
|
45
45
|
opts = { ttl: CACHE_DAY }.merge(options)
|
46
|
-
api_request "#{base_url(:community)}/profile/#{reg}/#{realm_id}/#{profile_id}", opts
|
46
|
+
api_request "#{base_url(:community)}/profile/#{reg}/#{realm_id}/#{profile_id}", **opts
|
47
47
|
end
|
48
48
|
|
49
49
|
##
|
@@ -56,7 +56,7 @@ module BlizzardApi
|
|
56
56
|
def ladder_summary(region_id, realm_id, profile_id, **options)
|
57
57
|
reg = resolve_region(region_id)
|
58
58
|
opts = { ttl: CACHE_DAY }.merge(options)
|
59
|
-
api_request "#{base_url(:community)}profile/#{reg}/#{realm_id}/#{profile_id}/ladder/summary ", opts
|
59
|
+
api_request "#{base_url(:community)}profile/#{reg}/#{realm_id}/#{profile_id}/ladder/summary ", **opts
|
60
60
|
end
|
61
61
|
|
62
62
|
##
|
@@ -69,7 +69,7 @@ module BlizzardApi
|
|
69
69
|
def ladder(region_id, realm_id, profile_id, ladder_id, **options)
|
70
70
|
reg = resolve_region(region_id)
|
71
71
|
opts = { ttl: CACHE_DAY }.merge(options)
|
72
|
-
api_request "#{base_url(:community)}/profile/#{reg}/#{realm_id}/#{profile_id}/ladder/#{ladder_id}", opts
|
72
|
+
api_request "#{base_url(:community)}/profile/#{reg}/#{realm_id}/#{profile_id}/ladder/#{ladder_id}", **opts
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
@@ -20,7 +20,7 @@ module BlizzardApi
|
|
20
20
|
# @!macro request_options
|
21
21
|
def get(season_id, queue_id, team_type, league_id, **options)
|
22
22
|
opts = { ttl: CACHE_DAY }.merge(options)
|
23
|
-
api_request "#{base_url(:game_data)}/league/#{season_id}/#{queue_id}/#{team_type}/#{league_id}", opts
|
23
|
+
api_request "#{base_url(:game_data)}/league/#{season_id}/#{queue_id}/#{team_type}/#{league_id}", **opts
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/blizzard_api/version.rb
CHANGED
@@ -25,7 +25,7 @@ module BlizzardApi
|
|
25
25
|
#
|
26
26
|
# @!macro response
|
27
27
|
def categories(**options)
|
28
|
-
api_request "#{endpoint_uri('category')}/index", default_options.merge(options)
|
28
|
+
api_request "#{endpoint_uri('category')}/index", **default_options.merge(options)
|
29
29
|
end
|
30
30
|
|
31
31
|
##
|
@@ -35,7 +35,7 @@ module BlizzardApi
|
|
35
35
|
#
|
36
36
|
# @!macro response
|
37
37
|
def category(id, **options)
|
38
|
-
api_request "#{endpoint_uri('category')}/#{id}", default_options.merge(options)
|
38
|
+
api_request "#{endpoint_uri('category')}/#{id}", **default_options.merge(options)
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -45,7 +45,7 @@ module BlizzardApi
|
|
45
45
|
#
|
46
46
|
# @!macro response
|
47
47
|
def media(id, **options)
|
48
|
-
api_request "#{base_url(:media)}/achievement/#{id}", default_options.merge(options)
|
48
|
+
api_request "#{base_url(:media)}/achievement/#{id}", **default_options.merge(options)
|
49
49
|
end
|
50
50
|
|
51
51
|
protected
|
@@ -10,16 +10,34 @@ module BlizzardApi
|
|
10
10
|
# You can get an instance of this class using the default region as follows:
|
11
11
|
# api_instance = BlizzardApi::Wow.auction
|
12
12
|
class Auction < Wow::Request
|
13
|
+
##
|
14
|
+
# Return all auction houses for the specified connected realm. Classic only.
|
15
|
+
#
|
16
|
+
# @param connected_realm_id [Integer] A valid connected realm id
|
17
|
+
# @!macro request_options
|
18
|
+
#
|
19
|
+
# @!macro response
|
20
|
+
def index(connected_realm_id, **options)
|
21
|
+
opts = { ttl: CACHE_HOUR, namespace: :dynamic }.merge(options)
|
22
|
+
api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions/index", **opts
|
23
|
+
end
|
24
|
+
|
13
25
|
##
|
14
26
|
# Return all active auctions for the specified connected realm
|
15
27
|
#
|
16
28
|
# @param connected_realm_id [Integer] A valid connected realm id
|
17
29
|
# @!macro request_options
|
30
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
18
31
|
#
|
19
32
|
# @!macro response
|
20
|
-
def get(connected_realm_id, **options)
|
33
|
+
def get(connected_realm_id, auction_house_id = nil, **options)
|
21
34
|
opts = { ttl: CACHE_HOUR, namespace: :dynamic }.merge(options)
|
22
|
-
|
35
|
+
|
36
|
+
unless auction_house_id.nil?
|
37
|
+
return api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions/#{auction_house_id}", **opts
|
38
|
+
end
|
39
|
+
|
40
|
+
api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions", **opts
|
23
41
|
end
|
24
42
|
end
|
25
43
|
end
|
@@ -21,7 +21,7 @@ module BlizzardApi
|
|
21
21
|
#
|
22
22
|
# @!macro response
|
23
23
|
def media(id, **options)
|
24
|
-
api_request "#{base_url(:media)}/azerite-essence/#{id}", default_options.merge(options)
|
24
|
+
api_request "#{base_url(:media)}/azerite-essence/#{id}", **default_options.merge(options)
|
25
25
|
end
|
26
26
|
|
27
27
|
protected
|
@@ -19,7 +19,7 @@ module BlizzardApi
|
|
19
19
|
#
|
20
20
|
# @!macro response
|
21
21
|
def media(id, **options)
|
22
|
-
api_request "#{base_url(:media)}/covenant/#{id}", default_options.merge(options)
|
22
|
+
api_request "#{base_url(:media)}/covenant/#{id}", **default_options.merge(options)
|
23
23
|
end
|
24
24
|
|
25
25
|
##
|
@@ -29,7 +29,7 @@ module BlizzardApi
|
|
29
29
|
#
|
30
30
|
# @!macro response
|
31
31
|
def soulbinds(**options)
|
32
|
-
api_request "#{base_url(:game_data)}/covenant/soulbind/index", default_options.merge(options)
|
32
|
+
api_request "#{base_url(:game_data)}/covenant/soulbind/index", **default_options.merge(options)
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -41,7 +41,7 @@ module BlizzardApi
|
|
41
41
|
#
|
42
42
|
# @!macro response
|
43
43
|
def soulbind(id, **options)
|
44
|
-
api_request "#{base_url(:game_data)}/covenant/soulbind/#{id}", default_options.merge(options)
|
44
|
+
api_request "#{base_url(:game_data)}/covenant/soulbind/#{id}", **default_options.merge(options)
|
45
45
|
end
|
46
46
|
|
47
47
|
##
|
@@ -51,7 +51,7 @@ module BlizzardApi
|
|
51
51
|
#
|
52
52
|
# @!macro response
|
53
53
|
def conduits(**options)
|
54
|
-
api_request "#{base_url(:game_data)}/covenant/conduit/index", default_options.merge(options)
|
54
|
+
api_request "#{base_url(:game_data)}/covenant/conduit/index", **default_options.merge(options)
|
55
55
|
end
|
56
56
|
|
57
57
|
##
|
@@ -63,7 +63,7 @@ module BlizzardApi
|
|
63
63
|
#
|
64
64
|
# @!macro response
|
65
65
|
def conduit(id, **options)
|
66
|
-
api_request "#{base_url(:game_data)}/covenant/conduit/#{id}", default_options.merge(options)
|
66
|
+
api_request "#{base_url(:game_data)}/covenant/conduit/#{id}", **default_options.merge(options)
|
67
67
|
end
|
68
68
|
|
69
69
|
protected
|
@@ -13,7 +13,7 @@ module BlizzardApi
|
|
13
13
|
include BlizzardApi::Wow::Searchable
|
14
14
|
|
15
15
|
def index
|
16
|
-
raise BlizzardApi::ApiException, 'Creatures endpoint doesn\'t have
|
16
|
+
raise BlizzardApi::ApiException, 'Creatures endpoint doesn\'t have an index method'
|
17
17
|
end
|
18
18
|
|
19
19
|
def complete
|
@@ -25,10 +25,11 @@ module BlizzardApi
|
|
25
25
|
#
|
26
26
|
# @!macro request_options
|
27
27
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
28
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
28
29
|
#
|
29
30
|
# @!macro response
|
30
31
|
def families(**options)
|
31
|
-
api_request "#{endpoint_uri('family')}/index", default_options.merge(options)
|
32
|
+
api_request "#{endpoint_uri('family')}/index", **default_options.merge(options)
|
32
33
|
end
|
33
34
|
|
34
35
|
##
|
@@ -38,10 +39,11 @@ module BlizzardApi
|
|
38
39
|
#
|
39
40
|
# @!macro request_options
|
40
41
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
42
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
41
43
|
#
|
42
44
|
# @!macro response
|
43
45
|
def family(id, **options)
|
44
|
-
api_request "#{endpoint_uri('family')}/#{id}", default_options.merge(options)
|
46
|
+
api_request "#{endpoint_uri('family')}/#{id}", **default_options.merge(options)
|
45
47
|
end
|
46
48
|
|
47
49
|
##
|
@@ -51,10 +53,11 @@ module BlizzardApi
|
|
51
53
|
#
|
52
54
|
# @!macro request_options
|
53
55
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
56
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
54
57
|
#
|
55
58
|
# @!macro response
|
56
59
|
def family_media(id, **options)
|
57
|
-
api_request "#{base_url(:media)}/creature-family/#{id}", default_options.merge(options)
|
60
|
+
api_request "#{base_url(:media)}/creature-family/#{id}", **default_options.merge(options)
|
58
61
|
end
|
59
62
|
|
60
63
|
##
|
@@ -62,10 +65,11 @@ module BlizzardApi
|
|
62
65
|
#
|
63
66
|
# @!macro request_options
|
64
67
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
68
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
65
69
|
#
|
66
70
|
# @!macro response
|
67
71
|
def types(**options)
|
68
|
-
api_request "#{endpoint_uri('type')}/index", default_options.merge(options)
|
72
|
+
api_request "#{endpoint_uri('type')}/index", **default_options.merge(options)
|
69
73
|
end
|
70
74
|
|
71
75
|
##
|
@@ -75,10 +79,11 @@ module BlizzardApi
|
|
75
79
|
#
|
76
80
|
# @!macro request_options
|
77
81
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
82
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
78
83
|
#
|
79
84
|
# @!macro response
|
80
85
|
def type(id, **options)
|
81
|
-
api_request "#{endpoint_uri('type')}/#{id}", default_options.merge(options)
|
86
|
+
api_request "#{endpoint_uri('type')}/#{id}", **default_options.merge(options)
|
82
87
|
end
|
83
88
|
|
84
89
|
##
|
@@ -88,10 +93,11 @@ module BlizzardApi
|
|
88
93
|
#
|
89
94
|
# @!macro request_options
|
90
95
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
96
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
91
97
|
#
|
92
98
|
# @!macro response
|
93
99
|
def display_media(id, **options)
|
94
|
-
api_request "#{base_url(:media)}/creature-display/#{id}", default_options.merge(options)
|
100
|
+
api_request "#{base_url(:media)}/creature-display/#{id}", **default_options.merge(options)
|
95
101
|
end
|
96
102
|
|
97
103
|
protected
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'thwait'
|
4
|
+
|
3
5
|
module BlizzardApi
|
4
6
|
module Wow
|
5
7
|
##
|
@@ -19,7 +21,7 @@ module BlizzardApi
|
|
19
21
|
# @!macro request_options
|
20
22
|
# @!macro response
|
21
23
|
def index(**options)
|
22
|
-
api_request "#{endpoint_uri}/index", default_options.merge(options)
|
24
|
+
api_request "#{endpoint_uri}/index", **default_options.merge(options)
|
23
25
|
end
|
24
26
|
|
25
27
|
##
|
@@ -30,20 +32,30 @@ module BlizzardApi
|
|
30
32
|
#
|
31
33
|
# @!macro response
|
32
34
|
def get(id, **options)
|
33
|
-
api_request "#{endpoint_uri}/#{id}", default_options.merge(options)
|
35
|
+
api_request "#{endpoint_uri}/#{id}", **default_options.merge(options)
|
34
36
|
end
|
35
37
|
|
36
38
|
##
|
37
39
|
# @!macro complete
|
38
40
|
def complete(**options)
|
39
|
-
[].tap do |complete_data|
|
40
|
-
index_data = index
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
payload = [].tap do |complete_data|
|
42
|
+
index_data = index(**options)
|
43
|
+
threads = []
|
44
|
+
|
45
|
+
concurrency = options.key?(:concurrency) ? options[:concurrency].to_i : BlizzardApi.concurrency
|
46
|
+
concurrency.times do
|
47
|
+
threads << Thread.new do
|
48
|
+
while index_data[@collection.to_sym].size.positive?
|
49
|
+
item = index_data[@collection.to_sym].pop
|
50
|
+
link = item.key?(:key) ? item[:key][:href] : item[:href]
|
51
|
+
item_data = request link
|
52
|
+
complete_data.push item_data
|
53
|
+
end
|
54
|
+
end
|
45
55
|
end
|
56
|
+
ThreadsWait.all_waits threads
|
46
57
|
end
|
58
|
+
payload.sort { |a, b| a[:id] <=> b[:id] }
|
47
59
|
end
|
48
60
|
|
49
61
|
protected
|
@@ -21,10 +21,11 @@ module BlizzardApi
|
|
21
21
|
#
|
22
22
|
# @!macro request_options
|
23
23
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
24
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
24
25
|
#
|
25
26
|
# @!macro response
|
26
27
|
def border_media(id, **options)
|
27
|
-
api_request "#{base_url(:media)}/#{@endpoint}/border/#{id}", default_options.merge(options)
|
28
|
+
api_request "#{base_url(:media)}/#{@endpoint}/border/#{id}", **default_options.merge(options)
|
28
29
|
end
|
29
30
|
|
30
31
|
##
|
@@ -32,12 +33,13 @@ module BlizzardApi
|
|
32
33
|
#
|
33
34
|
# @param id [Integer] Emblem id
|
34
35
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
36
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
35
37
|
#
|
36
38
|
# @!macro request_options
|
37
39
|
#
|
38
40
|
# @!macro response
|
39
41
|
def emblem_media(id, **options)
|
40
|
-
api_request "#{base_url(:media)}/#{@endpoint}/emblem/#{id}", default_options.merge(options)
|
42
|
+
api_request "#{base_url(:media)}/#{@endpoint}/emblem/#{id}", **default_options.merge(options)
|
41
43
|
end
|
42
44
|
|
43
45
|
protected
|
@@ -33,10 +33,11 @@ module BlizzardApi
|
|
33
33
|
#
|
34
34
|
# @!macro request_options
|
35
35
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
36
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
36
37
|
#
|
37
38
|
# @!macro response
|
38
39
|
def classes(**options)
|
39
|
-
api_request "#{endpoint_uri('class')}/index", default_options.merge(options)
|
40
|
+
api_request "#{endpoint_uri('class')}/index", **default_options.merge(options)
|
40
41
|
end
|
41
42
|
|
42
43
|
##
|
@@ -45,10 +46,11 @@ module BlizzardApi
|
|
45
46
|
# @param id [Integer] Item class id
|
46
47
|
# @!macro request_options
|
47
48
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
49
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
48
50
|
#
|
49
51
|
# @!macro response
|
50
52
|
def class(id, **options)
|
51
|
-
api_request "#{endpoint_uri('class')}/#{id}", default_options.merge(options)
|
53
|
+
api_request "#{endpoint_uri('class')}/#{id}", **default_options.merge(options)
|
52
54
|
end
|
53
55
|
|
54
56
|
##
|
@@ -58,10 +60,11 @@ module BlizzardApi
|
|
58
60
|
# @param subclass_id [Integer] Item subclass id
|
59
61
|
# @!macro request_options
|
60
62
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
63
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
61
64
|
#
|
62
65
|
# @!macro response
|
63
66
|
def subclass(id, subclass_id, **options)
|
64
|
-
api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", default_options.merge(options)
|
67
|
+
api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", **default_options.merge(options)
|
65
68
|
end
|
66
69
|
|
67
70
|
##
|
@@ -71,10 +74,11 @@ module BlizzardApi
|
|
71
74
|
#
|
72
75
|
# @!macro request_options
|
73
76
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
77
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
74
78
|
#
|
75
79
|
# @!macro response
|
76
80
|
def media(id, **options)
|
77
|
-
api_request "#{base_url(:media)}/item/#{id}", default_options.merge(options)
|
81
|
+
api_request "#{base_url(:media)}/item/#{id}", **default_options.merge(options)
|
78
82
|
end
|
79
83
|
|
80
84
|
##
|
@@ -84,7 +88,7 @@ module BlizzardApi
|
|
84
88
|
#
|
85
89
|
# @!macro response
|
86
90
|
def sets(**options)
|
87
|
-
api_request "#{endpoint_uri('set')}/index", default_options.merge(options)
|
91
|
+
api_request "#{endpoint_uri('set')}/index", **default_options.merge(options)
|
88
92
|
end
|
89
93
|
|
90
94
|
##
|
@@ -95,7 +99,7 @@ module BlizzardApi
|
|
95
99
|
#
|
96
100
|
# @!macro response
|
97
101
|
def set(id, **options)
|
98
|
-
api_request "#{endpoint_uri('set')}/#{id}", default_options.merge(options)
|
102
|
+
api_request "#{endpoint_uri('set')}/#{id}", **default_options.merge(options)
|
99
103
|
end
|
100
104
|
|
101
105
|
protected
|