wowapi 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wowapi/response_data.rb +11 -4
- data/lib/wowapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f40906e45284a1fa4b162688bc7b8c56d6b30eee
|
4
|
+
data.tar.gz: 59b75311856e31fc1d3786210795cdb00d53f8a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e969fb9c44416d079d25c443d616c172ec29f35c296139a0a490fc9022a970474d964ee5870fcb75a8e7cbabb5edf6e2a2e14fa894a5574c3600eea40d962ac
|
7
|
+
data.tar.gz: 7beb47805b96e9b348d4688ca53b471e20a56b8eed55cc04f4a5f6e2624c16e54f6ef9f9bf07aa8b8b7d74e18b57ae43db882949257a22812cc2f1dca00b2719
|
data/lib/wowapi/response_data.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
class Wowapi
|
2
4
|
# Every ModuleClass inherits from this object,
|
3
5
|
# so GuildClass, AchievementClass etc.
|
@@ -16,11 +18,16 @@ class Wowapi
|
|
16
18
|
super
|
17
19
|
end
|
18
20
|
|
19
|
-
#
|
20
|
-
# this one returns raw data that was assigned
|
21
|
-
# during initialization
|
21
|
+
# Return raw data (retrieved by Blizzard servers)
|
22
22
|
def to_json
|
23
|
-
@raw
|
23
|
+
@raw.to_json
|
24
|
+
end
|
25
|
+
|
26
|
+
# Create a object of suitable class e.g.:
|
27
|
+
# guild = api.guild ...
|
28
|
+
# guild = guild.from_json(data)
|
29
|
+
def from_json(data)
|
30
|
+
self.class.new(JSON.parse(data))
|
24
31
|
end
|
25
32
|
end
|
26
33
|
end
|
data/lib/wowapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wowapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Matusz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|