blizzard_api 1.0.0 → 2.0.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/CHANGELOG.md +5 -0
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow/game_data/playable_class.rb +0 -25
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96579c93bc977c1e27958031f03956a7fd19a1c54507a792a8c40fad27c24aea
|
4
|
+
data.tar.gz: b0947d10581d4324503e561dc07059c2fc35f81f27be51b6d322d68abea87064
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dcdbfc4de7830373ebfda93f8bca5e2f4acc2743b18a5bcd16c6141574e48e13153966041ee4e699c75c76f9ec6af976f8c59116c0dd47f5445cf74d5aded4f
|
7
|
+
data.tar.gz: c2ee55a8fb82065315dc7dc43ff14e6e1e511ffb67984ba57b1983da34d2c94ded0e6a49c46168e129bd991a788bfbe9a8ad4724bd3e7533ca6bd38914a82046
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
Please view this file on the master branch, otherwise it may be outdated
|
2
2
|
|
3
|
+
**Version 2.0.0**
|
4
|
+
|
5
|
+
Removed the `icon` field from PlayableClass, it was meant to mimic the old communit API behavior during the transition
|
6
|
+
to the new game_data version.
|
7
|
+
|
3
8
|
**Version 1.0.0**
|
4
9
|
|
5
10
|
Removed the `complete` method from WoW game data endpoints.
|
data/lib/blizzard_api/version.rb
CHANGED
@@ -23,22 +23,6 @@ module BlizzardApi
|
|
23
23
|
api_request "#{endpoint_uri}/#{id}/pvp-talent-slots", **default_options.merge(options)
|
24
24
|
end
|
25
25
|
|
26
|
-
##
|
27
|
-
# Return playable class data by its id
|
28
|
-
#
|
29
|
-
# @param id [Integer] Playable class id
|
30
|
-
#
|
31
|
-
# @!macro request_options
|
32
|
-
# @option options [Boolean] :classic If set to true, this method will call the classic version
|
33
|
-
# @option options [Boolean] :classic1x If set to true, this method will call the classic era version
|
34
|
-
#
|
35
|
-
# @!macro response
|
36
|
-
def get(id, **options)
|
37
|
-
data = api_request "#{endpoint_uri}/#{id}", **default_options.merge(options)
|
38
|
-
data[:icon] = get_class_icon data[:media], **options
|
39
|
-
data
|
40
|
-
end
|
41
|
-
|
42
26
|
##
|
43
27
|
# Fetch media for one of the playable classes listed by the {#index} using its *id*
|
44
28
|
#
|
@@ -50,15 +34,6 @@ module BlizzardApi
|
|
50
34
|
def media(id, **options)
|
51
35
|
api_request "#{base_url(:media)}/playable-class/#{id}", **default_options.merge(options)
|
52
36
|
end
|
53
|
-
|
54
|
-
protected
|
55
|
-
|
56
|
-
def get_class_icon(media_url, **options)
|
57
|
-
return if options.include? :classic
|
58
|
-
|
59
|
-
media_data = request media_url[:key][:href], **options
|
60
|
-
%r{56/([a-z_]+).jpg}.match(media_data[:assets][0][:value].to_s)[1]
|
61
|
-
end
|
62
37
|
end
|
63
38
|
end
|
64
39
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Schiavo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|