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
@@ -20,8 +20,8 @@ module BlizzardApi
|
|
20
20
|
# @!macro request_options
|
21
21
|
#
|
22
22
|
# @!macro response
|
23
|
-
def get(realm, guild, options
|
24
|
-
guild_request(realm, guild, options)
|
23
|
+
def get(realm, guild, **options)
|
24
|
+
guild_request(realm, guild, **options)
|
25
25
|
end
|
26
26
|
|
27
27
|
##
|
@@ -33,8 +33,8 @@ module BlizzardApi
|
|
33
33
|
# @!macro request_options
|
34
34
|
#
|
35
35
|
# @!macro response
|
36
|
-
def roster(realm, guild, options
|
37
|
-
guild_request realm, guild,
|
36
|
+
def roster(realm, guild, **options)
|
37
|
+
guild_request realm, guild, 'roster', **options
|
38
38
|
end
|
39
39
|
|
40
40
|
##
|
@@ -45,8 +45,8 @@ module BlizzardApi
|
|
45
45
|
# @!macro request_options
|
46
46
|
#
|
47
47
|
# @!macro response
|
48
|
-
def achievements(realm, guild, options
|
49
|
-
guild_request realm, guild,
|
48
|
+
def achievements(realm, guild, **options)
|
49
|
+
guild_request realm, guild, 'achievements', **options
|
50
50
|
end
|
51
51
|
|
52
52
|
##
|
@@ -57,18 +57,18 @@ module BlizzardApi
|
|
57
57
|
# @!macro request_options
|
58
58
|
#
|
59
59
|
# @!macro response
|
60
|
-
def activity(realm, guild, options
|
61
|
-
guild_request realm, guild,
|
60
|
+
def activity(realm, guild, **options)
|
61
|
+
guild_request realm, guild, 'activity', **options
|
62
62
|
end
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
-
def guild_request(realm, guild,
|
66
|
+
def guild_request(realm, guild, variant = nil, **options)
|
67
67
|
realm = string_to_slug(realm)
|
68
68
|
guild = string_to_slug(guild)
|
69
69
|
url = "#{base_url(:game_data)}/guild/#{realm}/#{guild}"
|
70
70
|
url += "/#{variant}" if variant
|
71
|
-
api_request url, { ttl: CACHE_DAY, namespace: :profile }.merge(options)
|
71
|
+
api_request url, **{ ttl: CACHE_DAY, namespace: :profile }.merge(options)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
@@ -18,8 +18,8 @@ module BlizzardApi
|
|
18
18
|
# @!macro request_options
|
19
19
|
#
|
20
20
|
# @!macro response
|
21
|
-
def get(options
|
22
|
-
api_request base_url(:user_profile).to_s, default_options.merge(options)
|
21
|
+
def get(**options)
|
22
|
+
api_request base_url(:user_profile).to_s, **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 protected_character(realm_id, character_id, options
|
32
|
-
api_request "#{base_url(:user_profile)}/protected-character/#{realm_id}-#{character_id}", default_options.merge(options)
|
31
|
+
def protected_character(realm_id, character_id, **options)
|
32
|
+
api_request "#{base_url(:user_profile)}/protected-character/#{realm_id}-#{character_id}", **default_options.merge(options)
|
33
33
|
end
|
34
34
|
|
35
35
|
##
|
@@ -38,8 +38,8 @@ module BlizzardApi
|
|
38
38
|
# @!macro request_options
|
39
39
|
#
|
40
40
|
# @!macro response
|
41
|
-
def collection(options
|
42
|
-
api_request "#{base_url(:user_profile)}/collections", default_options.merge(options)
|
41
|
+
def collection(**options)
|
42
|
+
api_request "#{base_url(:user_profile)}/collections", **default_options.merge(options)
|
43
43
|
end
|
44
44
|
|
45
45
|
##
|
@@ -48,8 +48,8 @@ module BlizzardApi
|
|
48
48
|
# @!macro request_options
|
49
49
|
#
|
50
50
|
# @!macro response
|
51
|
-
def mounts(options
|
52
|
-
api_request "#{base_url(:user_profile)}/collections/mounts", default_options.merge(options)
|
51
|
+
def mounts(**options)
|
52
|
+
api_request "#{base_url(:user_profile)}/collections/mounts", **default_options.merge(options)
|
53
53
|
end
|
54
54
|
|
55
55
|
##
|
@@ -58,8 +58,8 @@ module BlizzardApi
|
|
58
58
|
# @!macro request_options
|
59
59
|
#
|
60
60
|
# @!macro response
|
61
|
-
def pets(options
|
62
|
-
api_request "#{base_url(:user_profile)}/collections/pets", default_options.merge(options)
|
61
|
+
def pets(**options)
|
62
|
+
api_request "#{base_url(:user_profile)}/collections/pets", **default_options.merge(options)
|
63
63
|
end
|
64
64
|
|
65
65
|
protected
|
@@ -13,11 +13,11 @@ module BlizzardApi
|
|
13
13
|
#
|
14
14
|
# @!macro request_options
|
15
15
|
# @!macro response
|
16
|
-
def search(page = 1, page_size = 100, options
|
16
|
+
def search(page = 1, page_size = 100, **options)
|
17
17
|
search_options = SearchComposer.new(page, page_size)
|
18
18
|
yield search_options if block_given?
|
19
19
|
|
20
|
-
api_request "#{endpoint_uri(nil, :search)}?#{search_options.to_search_query}", default_options.merge(options)
|
20
|
+
api_request "#{endpoint_uri(nil, :search)}?#{search_options.to_search_query}", **default_options.merge(options)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blizzard_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Schiavo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 4.1.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: thwait
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.2.0
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.2.0
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: dotenv
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,14 +224,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
224
|
requirements:
|
211
225
|
- - ">="
|
212
226
|
- !ruby/object:Gem::Version
|
213
|
-
version:
|
227
|
+
version: 2.7.2
|
214
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
229
|
requirements:
|
216
230
|
- - ">="
|
217
231
|
- !ruby/object:Gem::Version
|
218
232
|
version: '0'
|
219
233
|
requirements: []
|
220
|
-
rubygems_version: 3.1.
|
234
|
+
rubygems_version: 3.1.4
|
221
235
|
signing_key:
|
222
236
|
specification_version: 4
|
223
237
|
summary: Unofficial Ruby client for Blizzard Entertainment API
|