wowapi 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c432c51ab4d82a585641b6ce2fa96a70e3915de3
4
- data.tar.gz: fac33e813e34ce46630f25076b705ee70e02eb90
3
+ metadata.gz: 6da1c60e116e338396abea0df004517db1b7e0a3
4
+ data.tar.gz: f900c1b8293a45cf8fb538473e5a9198a34531c1
5
5
  SHA512:
6
- metadata.gz: d609bb22f3b8b1fb4c80090a482b77867852e10f60c6d28c720b47623255ea596d3e34fad7603171e5bfdf90131ad4d2a8b9ee7e97e905abc5a516e89cddfb37
7
- data.tar.gz: e9032d3b1611a37f2f6993a6159e1a8979673472c6ebd7a3848a5a7247bb190af7659f7e755b717d2e3aebe49baaffe49c643da782c6307cdeaf870758e5c3f2
6
+ metadata.gz: 78c0244721234e024466186fd9a1fa081fad02796e356e43ffd1878ac34baaefecff82e55b0c48ab3944064b12dfa2a2d46b0a1e8f90292833d0524665b164b2
7
+ data.tar.gz: 56a3cca13169315261a0b89f0228c6d123e025b701fd342c3c03abe01b065aa7482863111292ce9e2567e355eb674f870179906f51c1637857ac8aa6da01c2a6
@@ -5,24 +5,10 @@ class Wowapi
5
5
  module Character
6
6
  # todo: issue-13
7
7
  class CharacterClass < Wowapi::ResponseData
8
- def initialize(res)
9
- super
10
-
11
- # Likely requires refactoring. This reassigns unsufficient thumbnail address
12
- # returned by World of Warcraft API and sets it to proper thumbnail URL
13
- # that you can use to download / display image from Blizzards' servers
14
- if @table
15
- if @table.key?(:character) && @table[:character].key?('thumbnail')
16
- @table[:character]['thumbnail'] = "http://render-api-#{Wowapi.region}.worldofwarcraft.com/static-render/#{Wowapi.region}/#{@table[:character]['thumbnail']}"
17
- elsif @table.key?(:thumbnail)
18
- @table[:thumbnail] = "http://render-api-#{Wowapi.region}.worldofwarcraft.com/static-render/#{Wowapi.region}/#{@table[:thumbnail]}"
19
- end
20
- end
21
- end
22
-
23
8
  ## Character avatar image
24
9
  def avatar
25
- @table[:character]['thumbnail']
10
+ _url = @table[:character]['thumbnail'] || @table[:thumbnail]
11
+ _url ? ("http://render-api-#{Wowapi.region}.worldofwarcraft.com/static-render/#{Wowapi.region}/#{_url}") : (nil)
26
12
  end
27
13
  end
28
14
 
@@ -1,4 +1,4 @@
1
1
  class Wowapi
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wowapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Matusz