shin 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shin/play/viki.rb +5 -4
- data/lib/shin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 659233c01df303c6bd476c1158172857a04093de
|
4
|
+
data.tar.gz: 72f02861b885bcfc1e5aadb8106f5a53f3e94a10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8558a6d8dcc4415d8f39fc63b576769c31ff2d30f52e3bc755f0e61fcb1d0147bba6b88af26cb64f5a6bc89ae32d8289bdfb59c0ba31ff9c2e548a21e463a361
|
7
|
+
data.tar.gz: ccee6a02fa66ba02b441f40eaea2d58f49f1dbda9360a9fe67bbad4826c2b73783a7d4c03af6502d8bb0f25a3532960f27b898863a61c18eb5ddba1ce6e26acf
|
data/lib/shin/play/viki.rb
CHANGED
@@ -28,13 +28,14 @@ module Shin
|
|
28
28
|
|
29
29
|
# Response
|
30
30
|
response = Base.get('http://api.viki.io/v5/' + category + '.json' + query)
|
31
|
+
|
31
32
|
data = Oj.load(response.body) rescue nil
|
32
33
|
ret = {more: data['more'], response: []}
|
33
34
|
|
34
35
|
# Multiple
|
35
36
|
if data != nil
|
36
37
|
data['response'].each do |r|
|
37
|
-
ret[:
|
38
|
+
ret[:response] << r
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
@@ -54,7 +55,7 @@ module Shin
|
|
54
55
|
# Multiple
|
55
56
|
if !data.empty? and data != nil
|
56
57
|
data['response'].each do |r|
|
57
|
-
ret[:
|
58
|
+
ret[:response] << r
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
@@ -87,7 +88,7 @@ module Shin
|
|
87
88
|
# Multiple
|
88
89
|
if !data.empty? and data != nil
|
89
90
|
data['response'].each do |r|
|
90
|
-
ret[:
|
91
|
+
ret[:response] << r
|
91
92
|
end
|
92
93
|
end
|
93
94
|
|
@@ -101,4 +102,4 @@ module Shin
|
|
101
102
|
class HTTPError < StandardError; end
|
102
103
|
end
|
103
104
|
end
|
104
|
-
end
|
105
|
+
end
|
data/lib/shin/version.rb
CHANGED