blizzard_api 0.5.4 → 0.6.2
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 +27 -1
- data/Gemfile.lock +16 -12
- data/README.md +57 -215
- data/blizzard_api.gemspec +2 -1
- data/lib/blizzard_api/configuration.rb +10 -34
- data/lib/blizzard_api/diablo/community/act.rb +4 -4
- data/lib/blizzard_api/diablo/community/artisan.rb +4 -4
- data/lib/blizzard_api/diablo/community/character.rb +4 -4
- data/lib/blizzard_api/diablo/community/follower.rb +2 -2
- data/lib/blizzard_api/diablo/community/item.rb +2 -2
- data/lib/blizzard_api/diablo/community/item_type.rb +4 -4
- data/lib/blizzard_api/diablo/community/profile.rb +4 -4
- data/lib/blizzard_api/diablo/game_data/generic_data_endpoint.rb +6 -6
- data/lib/blizzard_api/hearthstone/game_data/back.rb +2 -2
- data/lib/blizzard_api/hearthstone/game_data/card.rb +4 -4
- data/lib/blizzard_api/hearthstone/game_data/generic_data_endpoint.rb +4 -4
- data/lib/blizzard_api/request.rb +26 -9
- 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 +4 -4
- data/lib/blizzard_api/starcraft/community/legacy.rb +9 -10
- data/lib/blizzard_api/starcraft/community/profile.rb +10 -10
- data/lib/blizzard_api/starcraft/game_data/league.rb +2 -2
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow.rb +0 -7
- data/lib/blizzard_api/wow/game_data/achievement.rb +6 -6
- data/lib/blizzard_api/wow/game_data/auction.rb +20 -2
- data/lib/blizzard_api/wow/game_data/azerite_essence.rb +2 -2
- data/lib/blizzard_api/wow/game_data/covenant.rb +10 -10
- data/lib/blizzard_api/wow/game_data/creature.rb +19 -13
- data/lib/blizzard_api/wow/game_data/generic_data_endpoint.rb +23 -11
- data/lib/blizzard_api/wow/game_data/guild_crest.rb +6 -4
- data/lib/blizzard_api/wow/game_data/item.rb +16 -12
- data/lib/blizzard_api/wow/game_data/journal.rb +15 -15
- data/lib/blizzard_api/wow/game_data/modified_crafting.rb +8 -8
- data/lib/blizzard_api/wow/game_data/mythic_keystone.rb +12 -12
- data/lib/blizzard_api/wow/game_data/mythic_keystone_affix.rb +2 -2
- data/lib/blizzard_api/wow/game_data/mythic_keystone_leaderboard.rb +4 -4
- data/lib/blizzard_api/wow/game_data/mythic_raid_leaderboard.rb +2 -2
- data/lib/blizzard_api/wow/game_data/pet.rb +8 -8
- data/lib/blizzard_api/wow/game_data/playable_class.rb +14 -12
- data/lib/blizzard_api/wow/game_data/playable_specialization.rb +10 -10
- data/lib/blizzard_api/wow/game_data/profession.rb +8 -8
- data/lib/blizzard_api/wow/game_data/pvp_season.rb +8 -6
- data/lib/blizzard_api/wow/game_data/pvp_tier.rb +2 -2
- data/lib/blizzard_api/wow/game_data/quest.rb +12 -12
- data/lib/blizzard_api/wow/game_data/reputation.rb +8 -8
- data/lib/blizzard_api/wow/game_data/spell.rb +2 -2
- data/lib/blizzard_api/wow/game_data/talent.rb +4 -4
- data/lib/blizzard_api/wow/game_data/tech_talent.rb +6 -6
- data/lib/blizzard_api/wow/game_data/wow_token.rb +2 -2
- data/lib/blizzard_api/wow/profile/character_profile.rb +53 -53
- data/lib/blizzard_api/wow/profile/guild.rb +10 -10
- data/lib/blizzard_api/wow/profile/profile.rb +10 -10
- data/lib/blizzard_api/wow/search/search_composer.rb +2 -2
- data/lib/blizzard_api/wow/search/search_request.rb +2 -2
- metadata +18 -4
@@ -15,9 +15,9 @@ module BlizzardApi
|
|
15
15
|
#
|
16
16
|
# @!macro sc2_regions
|
17
17
|
# @!macro request_options
|
18
|
-
def static(region_id, options
|
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
|
##
|
@@ -27,10 +27,10 @@ module BlizzardApi
|
|
27
27
|
# @param [Integer] realm_id Realm ID
|
28
28
|
# @param [Integer] profile_id Profile ID
|
29
29
|
# @!macro request_options
|
30
|
-
def metadata(region_id, realm_id, profile_id, options
|
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
|
##
|
@@ -40,10 +40,10 @@ module BlizzardApi
|
|
40
40
|
# @param [Integer] realm_id Realm ID
|
41
41
|
# @param [Integer] profile_id Profile ID
|
42
42
|
# @!macro request_options
|
43
|
-
def profile(region_id, realm_id, profile_id, options
|
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
|
##
|
@@ -53,10 +53,10 @@ module BlizzardApi
|
|
53
53
|
# @param [Integer] realm_id Realm ID
|
54
54
|
# @param [Integer] profile_id Profile ID
|
55
55
|
# @!macro request_options
|
56
|
-
def ladder_summary(region_id, realm_id, profile_id, options
|
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
|
##
|
@@ -66,10 +66,10 @@ module BlizzardApi
|
|
66
66
|
# @param [Integer] realm_id Realm ID
|
67
67
|
# @param [Integer] profile_id Profile ID
|
68
68
|
# @!macro request_options
|
69
|
-
def ladder(region_id, realm_id, profile_id, ladder_id, options
|
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
|
@@ -18,9 +18,9 @@ module BlizzardApi
|
|
18
18
|
# @param [Integer] team_type Team type
|
19
19
|
# @param [Integer] league_id League id
|
20
20
|
# @!macro request_options
|
21
|
-
def get(season_id, queue_id, team_type, league_id, options
|
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
data/lib/blizzard_api/wow.rb
CHANGED
@@ -275,13 +275,6 @@ module BlizzardApi
|
|
275
275
|
BlizzardApi::Wow::WowToken.new(region)
|
276
276
|
end
|
277
277
|
|
278
|
-
##
|
279
|
-
# @param region [String] API Region
|
280
|
-
# @return {Character}
|
281
|
-
def self.character(region = BlizzardApi.region)
|
282
|
-
BlizzardApi::Wow::Character.new(region)
|
283
|
-
end
|
284
|
-
|
285
278
|
require_relative 'wow/profile/profile'
|
286
279
|
require_relative 'wow/profile/guild'
|
287
280
|
require_relative 'wow/profile/character_profile'
|
@@ -24,8 +24,8 @@ module BlizzardApi
|
|
24
24
|
# @!macro request_options
|
25
25
|
#
|
26
26
|
# @!macro response
|
27
|
-
def categories(options
|
28
|
-
api_request "#{endpoint_uri('category')}/index", default_options.merge(options)
|
27
|
+
def categories(**options)
|
28
|
+
api_request "#{endpoint_uri('category')}/index", **default_options.merge(options)
|
29
29
|
end
|
30
30
|
|
31
31
|
##
|
@@ -34,8 +34,8 @@ module BlizzardApi
|
|
34
34
|
# @!macro request_options
|
35
35
|
#
|
36
36
|
# @!macro response
|
37
|
-
def category(id, options
|
38
|
-
api_request "#{endpoint_uri('category')}/#{id}", default_options.merge(options)
|
37
|
+
def category(id, **options)
|
38
|
+
api_request "#{endpoint_uri('category')}/#{id}", **default_options.merge(options)
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -44,8 +44,8 @@ module BlizzardApi
|
|
44
44
|
# @!macro request_options
|
45
45
|
#
|
46
46
|
# @!macro response
|
47
|
-
def media(id, options
|
48
|
-
api_request "#{base_url(:media)}/achievement/#{id}", default_options.merge(options)
|
47
|
+
def media(id, **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,
|
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
|
@@ -20,8 +20,8 @@ module BlizzardApi
|
|
20
20
|
# @!macro request_options
|
21
21
|
#
|
22
22
|
# @!macro response
|
23
|
-
def media(id, options
|
24
|
-
api_request "#{base_url(:media)}/azerite-essence/#{id}", default_options.merge(options)
|
23
|
+
def media(id, **options)
|
24
|
+
api_request "#{base_url(:media)}/azerite-essence/#{id}", **default_options.merge(options)
|
25
25
|
end
|
26
26
|
|
27
27
|
protected
|
@@ -18,8 +18,8 @@ module BlizzardApi
|
|
18
18
|
# @!macro request_options
|
19
19
|
#
|
20
20
|
# @!macro response
|
21
|
-
def media(id, options
|
22
|
-
api_request "#{base_url(:media)}/covenant/#{id}", default_options.merge(options)
|
21
|
+
def media(id, **options)
|
22
|
+
api_request "#{base_url(:media)}/covenant/#{id}", **default_options.merge(options)
|
23
23
|
end
|
24
24
|
|
25
25
|
##
|
@@ -28,8 +28,8 @@ module BlizzardApi
|
|
28
28
|
# @!macro request_options
|
29
29
|
#
|
30
30
|
# @!macro response
|
31
|
-
def soulbinds(options
|
32
|
-
api_request "#{base_url(:game_data)}/covenant/soulbind/index", default_options.merge(options)
|
31
|
+
def soulbinds(**options)
|
32
|
+
api_request "#{base_url(:game_data)}/covenant/soulbind/index", **default_options.merge(options)
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -40,8 +40,8 @@ module BlizzardApi
|
|
40
40
|
# @!macro request_options
|
41
41
|
#
|
42
42
|
# @!macro response
|
43
|
-
def soulbind(id, options
|
44
|
-
api_request "#{base_url(:game_data)}/covenant/soulbind/#{id}", default_options.merge(options)
|
43
|
+
def soulbind(id, **options)
|
44
|
+
api_request "#{base_url(:game_data)}/covenant/soulbind/#{id}", **default_options.merge(options)
|
45
45
|
end
|
46
46
|
|
47
47
|
##
|
@@ -50,8 +50,8 @@ module BlizzardApi
|
|
50
50
|
# @!macro request_options
|
51
51
|
#
|
52
52
|
# @!macro response
|
53
|
-
def conduits(options
|
54
|
-
api_request "#{base_url(:game_data)}/covenant/conduit/index", default_options.merge(options)
|
53
|
+
def conduits(**options)
|
54
|
+
api_request "#{base_url(:game_data)}/covenant/conduit/index", **default_options.merge(options)
|
55
55
|
end
|
56
56
|
|
57
57
|
##
|
@@ -62,8 +62,8 @@ module BlizzardApi
|
|
62
62
|
# @!macro request_options
|
63
63
|
#
|
64
64
|
# @!macro response
|
65
|
-
def conduit(id, options
|
66
|
-
api_request "#{base_url(:game_data)}/covenant/conduit/#{id}", default_options.merge(options)
|
65
|
+
def conduit(id, **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
|
-
def families(options
|
31
|
-
api_request "#{endpoint_uri('family')}/index", default_options.merge(options)
|
31
|
+
def families(**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
|
-
def family(id, options
|
44
|
-
api_request "#{endpoint_uri('family')}/#{id}", default_options.merge(options)
|
45
|
+
def family(id, **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
|
-
def family_media(id, options
|
57
|
-
api_request "#{base_url(:media)}/creature-family/#{id}", default_options.merge(options)
|
59
|
+
def family_media(id, **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
|
-
def types(options
|
68
|
-
api_request "#{endpoint_uri('type')}/index", default_options.merge(options)
|
71
|
+
def types(**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
|
-
def type(id, options
|
81
|
-
api_request "#{endpoint_uri('type')}/#{id}", default_options.merge(options)
|
85
|
+
def type(id, **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
|
-
def display_media(id, options
|
94
|
-
api_request "#{base_url(:media)}/creature-display/#{id}", default_options.merge(options)
|
99
|
+
def display_media(id, **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
|
##
|
@@ -18,8 +20,8 @@ module BlizzardApi
|
|
18
20
|
#
|
19
21
|
# @!macro request_options
|
20
22
|
# @!macro response
|
21
|
-
def index(options
|
22
|
-
api_request "#{endpoint_uri}/index", default_options.merge(options)
|
23
|
+
def index(**options)
|
24
|
+
api_request "#{endpoint_uri}/index", **default_options.merge(options)
|
23
25
|
end
|
24
26
|
|
25
27
|
##
|
@@ -29,21 +31,31 @@ module BlizzardApi
|
|
29
31
|
# @!macro request_options
|
30
32
|
#
|
31
33
|
# @!macro response
|
32
|
-
def get(id, options
|
33
|
-
api_request "#{endpoint_uri}/#{id}", default_options.merge(options)
|
34
|
+
def get(id, **options)
|
35
|
+
api_request "#{endpoint_uri}/#{id}", **default_options.merge(options)
|
34
36
|
end
|
35
37
|
|
36
38
|
##
|
37
39
|
# @!macro complete
|
38
|
-
def complete(options
|
39
|
-
[].tap do |complete_data|
|
40
|
-
index_data = index
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
def complete(**options)
|
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
|
-
def border_media(id, options
|
27
|
-
api_request "#{base_url(:media)}/#{@endpoint}/border/#{id}", default_options.merge(options)
|
27
|
+
def border_media(id, **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
|
-
def emblem_media(id, options
|
40
|
-
api_request "#{base_url(:media)}/#{@endpoint}/emblem/#{id}", default_options.merge(options)
|
41
|
+
def emblem_media(id, **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
|
-
def classes(options
|
39
|
-
api_request "#{endpoint_uri('class')}/index", default_options.merge(options)
|
39
|
+
def classes(**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
|
-
def class(id, options
|
51
|
-
api_request "#{endpoint_uri('class')}/#{id}", default_options.merge(options)
|
52
|
+
def class(id, **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
|
-
def subclass(id, subclass_id, options
|
64
|
-
api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", default_options.merge(options)
|
66
|
+
def subclass(id, subclass_id, **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
|
-
def media(id, options
|
77
|
-
api_request "#{base_url(:media)}/item/#{id}", default_options.merge(options)
|
80
|
+
def media(id, **options)
|
81
|
+
api_request "#{base_url(:media)}/item/#{id}", **default_options.merge(options)
|
78
82
|
end
|
79
83
|
|
80
84
|
##
|
@@ -83,8 +87,8 @@ module BlizzardApi
|
|
83
87
|
# @!macro request_options
|
84
88
|
#
|
85
89
|
# @!macro response
|
86
|
-
def sets(options
|
87
|
-
api_request "#{endpoint_uri('set')}/index", default_options.merge(options)
|
90
|
+
def sets(**options)
|
91
|
+
api_request "#{endpoint_uri('set')}/index", **default_options.merge(options)
|
88
92
|
end
|
89
93
|
|
90
94
|
##
|
@@ -94,8 +98,8 @@ module BlizzardApi
|
|
94
98
|
# @!macro request_options
|
95
99
|
#
|
96
100
|
# @!macro response
|
97
|
-
def set(id, options
|
98
|
-
api_request "#{endpoint_uri('set')}/#{id}", default_options.merge(options)
|
101
|
+
def set(id, **options)
|
102
|
+
api_request "#{endpoint_uri('set')}/#{id}", **default_options.merge(options)
|
99
103
|
end
|
100
104
|
|
101
105
|
protected
|