blizzard_api 0.5.3 → 0.6.1
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 +23 -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 +3 -3
- 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_request.rb +2 -2
- metadata +18 -4
@@ -30,7 +30,7 @@ module BlizzardApi
|
|
30
30
|
# This method overrides the inherited default behavior to prevent high server load and fetch time
|
31
31
|
#
|
32
32
|
# @!macro response
|
33
|
-
def get(_id
|
33
|
+
def get(_id)
|
34
34
|
raise BlizzardApi::ApiException, 'This endpoint does not have a get method'
|
35
35
|
end
|
36
36
|
|
@@ -40,8 +40,8 @@ module BlizzardApi
|
|
40
40
|
# @!macro request_options
|
41
41
|
#
|
42
42
|
# @!macro response
|
43
|
-
def expansions(options
|
44
|
-
api_request "#{endpoint_uri('expansion')}/index", default_options.merge(options)
|
43
|
+
def expansions(**options)
|
44
|
+
api_request "#{endpoint_uri('expansion')}/index", **default_options.merge(options)
|
45
45
|
end
|
46
46
|
|
47
47
|
##
|
@@ -51,8 +51,8 @@ module BlizzardApi
|
|
51
51
|
# @!macro request_options
|
52
52
|
#
|
53
53
|
# @!macro response
|
54
|
-
def expansion(id, options
|
55
|
-
api_request "#{endpoint_uri('expansion')}/#{id}", default_options.merge(options)
|
54
|
+
def expansion(id, **options)
|
55
|
+
api_request "#{endpoint_uri('expansion')}/#{id}", **default_options.merge(options)
|
56
56
|
end
|
57
57
|
|
58
58
|
##
|
@@ -61,8 +61,8 @@ module BlizzardApi
|
|
61
61
|
# @!macro request_options
|
62
62
|
#
|
63
63
|
# @!macro response
|
64
|
-
def instances(options
|
65
|
-
api_request "#{endpoint_uri('instance')}/index", default_options.merge(options)
|
64
|
+
def instances(**options)
|
65
|
+
api_request "#{endpoint_uri('instance')}/index", **default_options.merge(options)
|
66
66
|
end
|
67
67
|
|
68
68
|
##
|
@@ -72,8 +72,8 @@ module BlizzardApi
|
|
72
72
|
# @!macro request_options
|
73
73
|
#
|
74
74
|
# @!macro response
|
75
|
-
def instance(id, options
|
76
|
-
api_request "#{endpoint_uri('instance')}/#{id}", default_options.merge(options)
|
75
|
+
def instance(id, **options)
|
76
|
+
api_request "#{endpoint_uri('instance')}/#{id}", **default_options.merge(options)
|
77
77
|
end
|
78
78
|
|
79
79
|
##
|
@@ -82,8 +82,8 @@ module BlizzardApi
|
|
82
82
|
# @!macro request_options
|
83
83
|
#
|
84
84
|
# @!macro response
|
85
|
-
def encounters(options
|
86
|
-
api_request "#{endpoint_uri('encounter')}/index", default_options.merge(options)
|
85
|
+
def encounters(**options)
|
86
|
+
api_request "#{endpoint_uri('encounter')}/index", **default_options.merge(options)
|
87
87
|
end
|
88
88
|
|
89
89
|
##
|
@@ -93,8 +93,8 @@ module BlizzardApi
|
|
93
93
|
# @!macro request_options
|
94
94
|
#
|
95
95
|
# @!macro response
|
96
|
-
def encounter(id, options
|
97
|
-
api_request "#{endpoint_uri('encounter')}/#{id}", default_options.merge(options)
|
96
|
+
def encounter(id, **options)
|
97
|
+
api_request "#{endpoint_uri('encounter')}/#{id}", **default_options.merge(options)
|
98
98
|
end
|
99
99
|
|
100
100
|
##
|
@@ -105,11 +105,11 @@ module BlizzardApi
|
|
105
105
|
#
|
106
106
|
# @!macro request_options
|
107
107
|
# @!macro response
|
108
|
-
def encounter_search(page = 1, page_size = 100, options
|
108
|
+
def encounter_search(page = 1, page_size = 100, **options)
|
109
109
|
search_options = SearchComposer.new(page, page_size)
|
110
110
|
yield search_options if block_given?
|
111
111
|
|
112
|
-
api_request "#{endpoint_uri('encounter', :search)}?#{search_options.to_search_query}", default_options.merge(options)
|
112
|
+
api_request "#{endpoint_uri('encounter', :search)}?#{search_options.to_search_query}", **default_options.merge(options)
|
113
113
|
end
|
114
114
|
|
115
115
|
protected
|
@@ -18,8 +18,8 @@ module BlizzardApi
|
|
18
18
|
# Fetch modified crafting category index
|
19
19
|
#
|
20
20
|
# @!macro request_options
|
21
|
-
def categories(options
|
22
|
-
api_request "#{base_url(:game_data)}/modified-crafting/category/index", default_options.merge(options)
|
21
|
+
def categories(**options)
|
22
|
+
api_request "#{base_url(:game_data)}/modified-crafting/category/index", **default_options.merge(options)
|
23
23
|
end
|
24
24
|
|
25
25
|
##
|
@@ -30,16 +30,16 @@ module BlizzardApi
|
|
30
30
|
# @!macro request_options
|
31
31
|
#
|
32
32
|
# @!macro response
|
33
|
-
def category(id, options
|
34
|
-
api_request "#{base_url(:game_data)}/modified-crafting/category/#{id}", default_options.merge(options)
|
33
|
+
def category(id, **options)
|
34
|
+
api_request "#{base_url(:game_data)}/modified-crafting/category/#{id}", **default_options.merge(options)
|
35
35
|
end
|
36
36
|
|
37
37
|
##
|
38
38
|
# Fetch modified crafting slot type index
|
39
39
|
#
|
40
40
|
# @!macro request_options
|
41
|
-
def slot_types(options
|
42
|
-
api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/index", default_options.merge(options)
|
41
|
+
def slot_types(**options)
|
42
|
+
api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/index", **default_options.merge(options)
|
43
43
|
end
|
44
44
|
|
45
45
|
##
|
@@ -50,8 +50,8 @@ module BlizzardApi
|
|
50
50
|
# @!macro request_options
|
51
51
|
#
|
52
52
|
# @!macro response
|
53
|
-
def slot_type(id, options
|
54
|
-
api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/#{id}", default_options.merge(options)
|
53
|
+
def slot_type(id, **options)
|
54
|
+
api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/#{id}", **default_options.merge(options)
|
55
55
|
end
|
56
56
|
|
57
57
|
protected
|
@@ -24,8 +24,8 @@ module BlizzardApi
|
|
24
24
|
# @!macro request_options
|
25
25
|
#
|
26
26
|
# @!macro response
|
27
|
-
def dungeons(options
|
28
|
-
api_request "#{endpoint_uri}/dungeon/index", default_options.merge(options)
|
27
|
+
def dungeons(**options)
|
28
|
+
api_request "#{endpoint_uri}/dungeon/index", **default_options.merge(options)
|
29
29
|
end
|
30
30
|
|
31
31
|
##
|
@@ -36,8 +36,8 @@ module BlizzardApi
|
|
36
36
|
# @!macro request_options
|
37
37
|
#
|
38
38
|
# @!macro response
|
39
|
-
def dungeon(id, options
|
40
|
-
api_request "#{endpoint_uri}/dungeon/#{id}", default_options.merge(options)
|
39
|
+
def dungeon(id, **options)
|
40
|
+
api_request "#{endpoint_uri}/dungeon/#{id}", **default_options.merge(options)
|
41
41
|
end
|
42
42
|
|
43
43
|
##
|
@@ -46,8 +46,8 @@ module BlizzardApi
|
|
46
46
|
# @!macro request_options
|
47
47
|
#
|
48
48
|
# @!macro response
|
49
|
-
def periods(options
|
50
|
-
api_request "#{endpoint_uri}/period/index", default_options.merge(options)
|
49
|
+
def periods(**options)
|
50
|
+
api_request "#{endpoint_uri}/period/index", **default_options.merge(options)
|
51
51
|
end
|
52
52
|
|
53
53
|
##
|
@@ -58,8 +58,8 @@ module BlizzardApi
|
|
58
58
|
# @!macro request_options
|
59
59
|
#
|
60
60
|
# @!macro response
|
61
|
-
def period(id, options
|
62
|
-
api_request "#{endpoint_uri}/period/#{id}", default_options.merge(options)
|
61
|
+
def period(id, **options)
|
62
|
+
api_request "#{endpoint_uri}/period/#{id}", **default_options.merge(options)
|
63
63
|
end
|
64
64
|
|
65
65
|
##
|
@@ -68,8 +68,8 @@ module BlizzardApi
|
|
68
68
|
# @!macro request_options
|
69
69
|
#
|
70
70
|
# @!macro response
|
71
|
-
def seasons(options
|
72
|
-
api_request "#{endpoint_uri}/season/index", default_options.merge(options)
|
71
|
+
def seasons(**options)
|
72
|
+
api_request "#{endpoint_uri}/season/index", **default_options.merge(options)
|
73
73
|
end
|
74
74
|
|
75
75
|
##
|
@@ -80,8 +80,8 @@ module BlizzardApi
|
|
80
80
|
# @!macro request_options
|
81
81
|
#
|
82
82
|
# @!macro response
|
83
|
-
def season(id, options
|
84
|
-
api_request "#{endpoint_uri}/season/#{id}", default_options.merge(options)
|
83
|
+
def season(id, **options)
|
84
|
+
api_request "#{endpoint_uri}/season/#{id}", **default_options.merge(options)
|
85
85
|
end
|
86
86
|
|
87
87
|
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)}/keystone-affix/#{id}", default_options.merge(options)
|
21
|
+
def media(id, **options)
|
22
|
+
api_request "#{base_url(:media)}/keystone-affix/#{id}", **default_options.merge(options)
|
23
23
|
end
|
24
24
|
|
25
25
|
protected
|
@@ -18,8 +18,8 @@ module BlizzardApi
|
|
18
18
|
# @!macro request_options
|
19
19
|
#
|
20
20
|
# @!macro response
|
21
|
-
def index(connected_realm_id, options
|
22
|
-
api_request "#{endpoint_uri(connected_realm_id)}/index", default_options(options)
|
21
|
+
def index(connected_realm_id, **options)
|
22
|
+
api_request "#{endpoint_uri(connected_realm_id)}/index", **default_options(options)
|
23
23
|
end
|
24
24
|
|
25
25
|
##
|
@@ -30,8 +30,8 @@ module BlizzardApi
|
|
30
30
|
# @!macro request_options
|
31
31
|
#
|
32
32
|
# @!macro response
|
33
|
-
def get(connected_realm_id, dungeon_id, period, options
|
34
|
-
api_request "#{endpoint_uri(connected_realm_id)}/#{dungeon_id}/period/#{period}", default_options(options)
|
33
|
+
def get(connected_realm_id, dungeon_id, period, **options)
|
34
|
+
api_request "#{endpoint_uri(connected_realm_id)}/#{dungeon_id}/period/#{period}", **default_options(options)
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
@@ -19,9 +19,9 @@ module BlizzardApi
|
|
19
19
|
# @!macro request_options
|
20
20
|
#
|
21
21
|
# @!macro response
|
22
|
-
def get(raid, faction, options
|
22
|
+
def get(raid, faction, **options)
|
23
23
|
opts = options.merge(namespace: :dynamic, ttl: CACHE_DAY)
|
24
|
-
api_request "#{base_url(:game_data)}/leaderboard/hall-of-fame/#{raid}/#{faction}", opts
|
24
|
+
api_request "#{base_url(:game_data)}/leaderboard/hall-of-fame/#{raid}/#{faction}", **opts
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -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)}/pet/#{id}", default_options.merge(options)
|
21
|
+
def media(id, **options)
|
22
|
+
api_request "#{base_url(:media)}/pet/#{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 abilities(options
|
32
|
-
api_request "#{endpoint_uri('ability')}/index", default_options.merge(options)
|
31
|
+
def abilities(**options)
|
32
|
+
api_request "#{endpoint_uri('ability')}/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 ability(id, options
|
44
|
-
api_request "#{endpoint_uri('ability')}/#{id}", default_options.merge(options)
|
43
|
+
def ability(id, **options)
|
44
|
+
api_request "#{endpoint_uri('ability')}/#{id}", **default_options.merge(options)
|
45
45
|
end
|
46
46
|
|
47
47
|
##
|
@@ -52,8 +52,8 @@ module BlizzardApi
|
|
52
52
|
# @!macro request_options
|
53
53
|
#
|
54
54
|
# @!macro response
|
55
|
-
def ability_media(id, options
|
56
|
-
api_request "#{base_url(:media)}/pet-ability/#{id}", default_options.merge(options)
|
55
|
+
def ability_media(id, **options)
|
56
|
+
api_request "#{base_url(:media)}/pet-ability/#{id}", **default_options.merge(options)
|
57
57
|
end
|
58
58
|
|
59
59
|
protected
|
@@ -17,20 +17,21 @@ module BlizzardApi
|
|
17
17
|
# @!macro request_options
|
18
18
|
#
|
19
19
|
# @!macro response
|
20
|
-
def talent_slots(id, options
|
21
|
-
api_request "#{endpoint_uri}/#{id}/pvp-talent-slots", default_options.merge(options)
|
20
|
+
def talent_slots(id, **options)
|
21
|
+
api_request "#{endpoint_uri}/#{id}/pvp-talent-slots", **default_options.merge(options)
|
22
22
|
end
|
23
23
|
|
24
24
|
##
|
25
25
|
# @!macro complete
|
26
26
|
#
|
27
27
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
28
|
-
|
29
|
-
|
28
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
29
|
+
def complete(**options)
|
30
|
+
index_data = index(**options)
|
30
31
|
[].tap do |classes|
|
31
32
|
index_data[:classes].each do |pclass|
|
32
33
|
class_id = %r{playable-class/([0-9]+)}.match(pclass[:key].to_s)[1]
|
33
|
-
class_data = get class_id, options
|
34
|
+
class_data = get class_id, **options
|
34
35
|
classes.push class_data
|
35
36
|
end
|
36
37
|
end
|
@@ -43,11 +44,12 @@ module BlizzardApi
|
|
43
44
|
#
|
44
45
|
# @!macro request_options
|
45
46
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
47
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
46
48
|
#
|
47
49
|
# @!macro response
|
48
|
-
def get(id, options
|
49
|
-
data = api_request "#{endpoint_uri}/#{id}", default_options.merge(options)
|
50
|
-
data[:icon] = get_class_icon data[:media], options
|
50
|
+
def get(id, **options)
|
51
|
+
data = api_request "#{endpoint_uri}/#{id}", **default_options.merge(options)
|
52
|
+
data[:icon] = get_class_icon data[:media], **options
|
51
53
|
data
|
52
54
|
end
|
53
55
|
|
@@ -59,8 +61,8 @@ module BlizzardApi
|
|
59
61
|
# @!macro request_options
|
60
62
|
#
|
61
63
|
# @!macro response
|
62
|
-
def media(id, options
|
63
|
-
api_request "#{base_url(:media)}/playable-class/#{id}", default_options.merge(options)
|
64
|
+
def media(id, **options)
|
65
|
+
api_request "#{base_url(:media)}/playable-class/#{id}", **default_options.merge(options)
|
64
66
|
end
|
65
67
|
|
66
68
|
protected
|
@@ -72,10 +74,10 @@ module BlizzardApi
|
|
72
74
|
@ttl = CACHE_TRIMESTER
|
73
75
|
end
|
74
76
|
|
75
|
-
def get_class_icon(media_url, options)
|
77
|
+
def get_class_icon(media_url, **options)
|
76
78
|
return if options.include? :classic
|
77
79
|
|
78
|
-
media_data = request media_url[:key][:href], options
|
80
|
+
media_data = request media_url[:key][:href], **options
|
79
81
|
%r{56/([a-z_]+).jpg}.match(media_data[:assets][0][:value].to_s)[1]
|
80
82
|
end
|
81
83
|
end
|
@@ -12,12 +12,12 @@ module BlizzardApi
|
|
12
12
|
class PlayableSpecialization < Wow::GenericDataEndpoint
|
13
13
|
##
|
14
14
|
# @!macro complete
|
15
|
-
def complete(options
|
16
|
-
index_data = index
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
def complete(**options)
|
16
|
+
index_data = index(**options)
|
17
|
+
{}.tap do |response_data|
|
18
|
+
response_data[:character_specializations] = character_data(index_data, options)
|
19
|
+
response_data[:pet_specializations] = pet_data(index_data, options)
|
20
|
+
end
|
21
21
|
end
|
22
22
|
|
23
23
|
##
|
@@ -28,8 +28,8 @@ module BlizzardApi
|
|
28
28
|
# @!macro request_options
|
29
29
|
#
|
30
30
|
# @!macro response
|
31
|
-
def media(id, options
|
32
|
-
api_request "#{base_url(:media)}/playable-specialization/#{id}", default_options.merge(options)
|
31
|
+
def media(id, **options)
|
32
|
+
api_request "#{base_url(:media)}/playable-specialization/#{id}", **default_options.merge(options)
|
33
33
|
end
|
34
34
|
|
35
35
|
protected
|
@@ -47,7 +47,7 @@ module BlizzardApi
|
|
47
47
|
[].tap do |specs|
|
48
48
|
index_data[:character_specializations].each do |spec|
|
49
49
|
spec_id = %r{playable-specialization/([0-9]+)}.match(spec[:key].to_s)[1]
|
50
|
-
spec_data = get spec_id, options
|
50
|
+
spec_data = get spec_id, **options
|
51
51
|
spec_data[:icon] = resolve_icon(spec_data[:media][:key][:href])
|
52
52
|
cleanup spec_data
|
53
53
|
specs.push spec_data
|
@@ -59,7 +59,7 @@ module BlizzardApi
|
|
59
59
|
[].tap do |specs|
|
60
60
|
index_data[:pet_specializations].each do |spec|
|
61
61
|
spec_id = %r{playable-specialization/([0-9]+)}.match(spec[:key].to_s)[1]
|
62
|
-
spec_data = get spec_id, options
|
62
|
+
spec_data = get spec_id, **options
|
63
63
|
spec_data[:icon] = resolve_icon(spec_data[:media][:key][:href])
|
64
64
|
cleanup spec_data
|
65
65
|
specs.push spec_data
|
@@ -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)}/profession/#{id}", default_options.merge(options)
|
21
|
+
def media(id, **options)
|
22
|
+
api_request "#{base_url(:media)}/profession/#{id}", **default_options.merge(options)
|
23
23
|
end
|
24
24
|
|
25
25
|
##
|
@@ -31,8 +31,8 @@ module BlizzardApi
|
|
31
31
|
# @!macro request_options
|
32
32
|
#
|
33
33
|
# @!macro response
|
34
|
-
def skill_tier(id, tier_id, options
|
35
|
-
api_request "#{base_url(:game_data)}/profession/#{id}/skill-tier/#{tier_id}", default_options.merge(options)
|
34
|
+
def skill_tier(id, tier_id, **options)
|
35
|
+
api_request "#{base_url(:game_data)}/profession/#{id}/skill-tier/#{tier_id}", **default_options.merge(options)
|
36
36
|
end
|
37
37
|
|
38
38
|
##
|
@@ -43,8 +43,8 @@ module BlizzardApi
|
|
43
43
|
# @!macro request_options
|
44
44
|
#
|
45
45
|
# @!macro response
|
46
|
-
def recipe(id, options
|
47
|
-
api_request "#{base_url(:game_data)}/recipe/#{id}", default_options.merge(options)
|
46
|
+
def recipe(id, **options)
|
47
|
+
api_request "#{base_url(:game_data)}/recipe/#{id}", **default_options.merge(options)
|
48
48
|
end
|
49
49
|
|
50
50
|
##
|
@@ -55,8 +55,8 @@ module BlizzardApi
|
|
55
55
|
# @!macro request_options
|
56
56
|
#
|
57
57
|
# @!macro response
|
58
|
-
def recipe_media(id, options
|
59
|
-
api_request "#{base_url(:media)}/recipe/#{id}", default_options.merge(options)
|
58
|
+
def recipe_media(id, **options)
|
59
|
+
api_request "#{base_url(:media)}/recipe/#{id}", **default_options.merge(options)
|
60
60
|
end
|
61
61
|
|
62
62
|
protected
|
@@ -14,20 +14,22 @@ module BlizzardApi
|
|
14
14
|
# Returns a index of pvp leaderboard for a season
|
15
15
|
#
|
16
16
|
# @!macro request_options
|
17
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
17
18
|
#
|
18
19
|
# @!macro response
|
19
|
-
def leaderboards(season_id, options
|
20
|
-
api_request "#{endpoint_uri}/#{season_id}/pvp-leaderboard/index", default_options.merge(options)
|
20
|
+
def leaderboards(season_id, **options)
|
21
|
+
api_request "#{endpoint_uri}/#{season_id}/pvp-leaderboard/index", **default_options.merge(options)
|
21
22
|
end
|
22
23
|
|
23
24
|
##
|
24
25
|
# Returns the leaderboard for a given season and bracket
|
25
26
|
#
|
26
27
|
# @!macro request_options
|
28
|
+
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
27
29
|
#
|
28
30
|
# @!macro response
|
29
|
-
def leaderboard(season_id, brackets, options
|
30
|
-
api_request "#{endpoint_uri}/#{season_id}/pvp-leaderboard/#{brackets}", default_options.merge(options)
|
31
|
+
def leaderboard(season_id, brackets, **options)
|
32
|
+
api_request "#{endpoint_uri}/#{season_id}/pvp-leaderboard/#{brackets}", **default_options.merge(options)
|
31
33
|
end
|
32
34
|
|
33
35
|
##
|
@@ -36,8 +38,8 @@ module BlizzardApi
|
|
36
38
|
# @!macro request_options
|
37
39
|
#
|
38
40
|
# @!macro response
|
39
|
-
def rewards(season_id, options
|
40
|
-
api_request "#{endpoint_uri}/#{season_id}/pvp-reward/index", default_options.merge(options)
|
41
|
+
def rewards(season_id, **options)
|
42
|
+
api_request "#{endpoint_uri}/#{season_id}/pvp-reward/index", **default_options.merge(options)
|
41
43
|
end
|
42
44
|
|
43
45
|
protected
|