mywowarmory-ruby 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mywowarmory.rb +3 -4
- data/mywowarmory-ruby.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/lib/mywowarmory.rb
CHANGED
@@ -18,10 +18,9 @@ class MyWoWArmory
|
|
18
18
|
name = URI::encode(character_name)
|
19
19
|
# self.class.get("/api/profiles/#{country}/#{realm.tr('^a-zA-Z','-').downcase}/#{name}.json", options).parsed_response
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
21
|
+
# Check the realm
|
22
|
+
realm_response = HTTParty.get("http://#{country}.battle.net/api/wow/realm/status", :query => {:realms => URI.encode(realm)} ).parsed_response
|
23
|
+
realm = realm_response['realms'].select{|r| r['name'] == realm}.first['slug']
|
25
24
|
|
26
25
|
|
27
26
|
options.merge!(:query => {:name => character_name, :server => realm, :country => country})
|
data/mywowarmory-ruby.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mywowarmory-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Benjamin Wong
|