blizzard_api 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +21 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +21 -17
- data/README.md +58 -218
- data/blizzard_api.gemspec +8 -5
- 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 +8 -7
- data/lib/blizzard_api/starcraft.rb +7 -0
- 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 +88 -0
- 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 +2 -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 +12 -12
- data/lib/blizzard_api/wow/game_data/generic_data_endpoint.rb +23 -11
- data/lib/blizzard_api/wow/game_data/guild_crest.rb +4 -4
- data/lib/blizzard_api/wow/game_data/item.rb +12 -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 +12 -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 +6 -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 +27 -10
- data/.gitlab-ci.yml +0 -12
@@ -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
|
@@ -17,9 +17,9 @@ module BlizzardApi
|
|
17
17
|
# @!macro request_options
|
18
18
|
#
|
19
19
|
# @!macro response
|
20
|
-
def get(connected_realm_id, options
|
20
|
+
def get(connected_realm_id, **options)
|
21
21
|
opts = { ttl: CACHE_HOUR, namespace: :dynamic }.merge(options)
|
22
|
-
api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions", opts
|
22
|
+
api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions", **opts
|
23
23
|
end
|
24
24
|
end
|
25
25
|
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
|
@@ -27,8 +27,8 @@ module BlizzardApi
|
|
27
27
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
28
28
|
#
|
29
29
|
# @!macro response
|
30
|
-
def families(options
|
31
|
-
api_request "#{endpoint_uri('family')}/index", default_options.merge(options)
|
30
|
+
def families(**options)
|
31
|
+
api_request "#{endpoint_uri('family')}/index", **default_options.merge(options)
|
32
32
|
end
|
33
33
|
|
34
34
|
##
|
@@ -40,8 +40,8 @@ module BlizzardApi
|
|
40
40
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
41
41
|
#
|
42
42
|
# @!macro response
|
43
|
-
def family(id, options
|
44
|
-
api_request "#{endpoint_uri('family')}/#{id}", default_options.merge(options)
|
43
|
+
def family(id, **options)
|
44
|
+
api_request "#{endpoint_uri('family')}/#{id}", **default_options.merge(options)
|
45
45
|
end
|
46
46
|
|
47
47
|
##
|
@@ -53,8 +53,8 @@ module BlizzardApi
|
|
53
53
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
54
54
|
#
|
55
55
|
# @!macro response
|
56
|
-
def family_media(id, options
|
57
|
-
api_request "#{base_url(:media)}/creature-family/#{id}", default_options.merge(options)
|
56
|
+
def family_media(id, **options)
|
57
|
+
api_request "#{base_url(:media)}/creature-family/#{id}", **default_options.merge(options)
|
58
58
|
end
|
59
59
|
|
60
60
|
##
|
@@ -64,8 +64,8 @@ module BlizzardApi
|
|
64
64
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
65
65
|
#
|
66
66
|
# @!macro response
|
67
|
-
def types(options
|
68
|
-
api_request "#{endpoint_uri('type')}/index", default_options.merge(options)
|
67
|
+
def types(**options)
|
68
|
+
api_request "#{endpoint_uri('type')}/index", **default_options.merge(options)
|
69
69
|
end
|
70
70
|
|
71
71
|
##
|
@@ -77,8 +77,8 @@ module BlizzardApi
|
|
77
77
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
78
78
|
#
|
79
79
|
# @!macro response
|
80
|
-
def type(id, options
|
81
|
-
api_request "#{endpoint_uri('type')}/#{id}", default_options.merge(options)
|
80
|
+
def type(id, **options)
|
81
|
+
api_request "#{endpoint_uri('type')}/#{id}", **default_options.merge(options)
|
82
82
|
end
|
83
83
|
|
84
84
|
##
|
@@ -90,8 +90,8 @@ module BlizzardApi
|
|
90
90
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
91
91
|
#
|
92
92
|
# @!macro response
|
93
|
-
def display_media(id, options
|
94
|
-
api_request "#{base_url(:media)}/creature-display/#{id}", default_options.merge(options)
|
93
|
+
def display_media(id, **options)
|
94
|
+
api_request "#{base_url(:media)}/creature-display/#{id}", **default_options.merge(options)
|
95
95
|
end
|
96
96
|
|
97
97
|
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
|
@@ -23,8 +23,8 @@ module BlizzardApi
|
|
23
23
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
24
24
|
#
|
25
25
|
# @!macro response
|
26
|
-
def border_media(id, options
|
27
|
-
api_request "#{base_url(:media)}/#{@endpoint}/border/#{id}", default_options.merge(options)
|
26
|
+
def border_media(id, **options)
|
27
|
+
api_request "#{base_url(:media)}/#{@endpoint}/border/#{id}", **default_options.merge(options)
|
28
28
|
end
|
29
29
|
|
30
30
|
##
|
@@ -36,8 +36,8 @@ module BlizzardApi
|
|
36
36
|
# @!macro request_options
|
37
37
|
#
|
38
38
|
# @!macro response
|
39
|
-
def emblem_media(id, options
|
40
|
-
api_request "#{base_url(:media)}/#{@endpoint}/emblem/#{id}", default_options.merge(options)
|
39
|
+
def emblem_media(id, **options)
|
40
|
+
api_request "#{base_url(:media)}/#{@endpoint}/emblem/#{id}", **default_options.merge(options)
|
41
41
|
end
|
42
42
|
|
43
43
|
protected
|
@@ -35,8 +35,8 @@ module BlizzardApi
|
|
35
35
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
36
36
|
#
|
37
37
|
# @!macro response
|
38
|
-
def classes(options
|
39
|
-
api_request "#{endpoint_uri('class')}/index", default_options.merge(options)
|
38
|
+
def classes(**options)
|
39
|
+
api_request "#{endpoint_uri('class')}/index", **default_options.merge(options)
|
40
40
|
end
|
41
41
|
|
42
42
|
##
|
@@ -47,8 +47,8 @@ module BlizzardApi
|
|
47
47
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
48
48
|
#
|
49
49
|
# @!macro response
|
50
|
-
def class(id, options
|
51
|
-
api_request "#{endpoint_uri('class')}/#{id}", default_options.merge(options)
|
50
|
+
def class(id, **options)
|
51
|
+
api_request "#{endpoint_uri('class')}/#{id}", **default_options.merge(options)
|
52
52
|
end
|
53
53
|
|
54
54
|
##
|
@@ -60,8 +60,8 @@ module BlizzardApi
|
|
60
60
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
61
61
|
#
|
62
62
|
# @!macro response
|
63
|
-
def subclass(id, subclass_id, options
|
64
|
-
api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", default_options.merge(options)
|
63
|
+
def subclass(id, subclass_id, **options)
|
64
|
+
api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", **default_options.merge(options)
|
65
65
|
end
|
66
66
|
|
67
67
|
##
|
@@ -73,8 +73,8 @@ module BlizzardApi
|
|
73
73
|
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
74
74
|
#
|
75
75
|
# @!macro response
|
76
|
-
def media(id, options
|
77
|
-
api_request "#{base_url(:media)}/item/#{id}", default_options.merge(options)
|
76
|
+
def media(id, **options)
|
77
|
+
api_request "#{base_url(:media)}/item/#{id}", **default_options.merge(options)
|
78
78
|
end
|
79
79
|
|
80
80
|
##
|
@@ -83,8 +83,8 @@ module BlizzardApi
|
|
83
83
|
# @!macro request_options
|
84
84
|
#
|
85
85
|
# @!macro response
|
86
|
-
def sets(options
|
87
|
-
api_request "#{endpoint_uri('set')}/index", default_options.merge(options)
|
86
|
+
def sets(**options)
|
87
|
+
api_request "#{endpoint_uri('set')}/index", **default_options.merge(options)
|
88
88
|
end
|
89
89
|
|
90
90
|
##
|
@@ -94,8 +94,8 @@ module BlizzardApi
|
|
94
94
|
# @!macro request_options
|
95
95
|
#
|
96
96
|
# @!macro response
|
97
|
-
def set(id, options
|
98
|
-
api_request "#{endpoint_uri('set')}/#{id}", default_options.merge(options)
|
97
|
+
def set(id, **options)
|
98
|
+
api_request "#{endpoint_uri('set')}/#{id}", **default_options.merge(options)
|
99
99
|
end
|
100
100
|
|
101
101
|
protected
|
@@ -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, **options)
|
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
|