dit3-api 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dit3/api/client.rb +2 -2
- 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: a737c377c8b7f9805cd454e5a8e37055721bf863
|
4
|
+
data.tar.gz: 48b773586e2d920ef7e0a21185f2143b3e4bea21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa1a71ce0c3c2df71e00e44539822c72dca9782773208f77bab303299ab9d4e52d40325f35297a594305fd1fd0cd2d7c12d91904c62105a80282c13fe7cfbd93
|
7
|
+
data.tar.gz: af38d762e7875b0b3c0b6cfdc17c4eb628149f063503624929d6c11e9e8b198969f4994da937e051e06c8f0340de57673e26ba28a649c8abf86fa062e0135978
|
data/lib/dit3/api/client.rb
CHANGED
@@ -27,7 +27,7 @@ module DIT3::Api
|
|
27
27
|
if (!response.kind_of? Net::HTTPSuccess)
|
28
28
|
raise ApiError, "Failed to execute GET #{endpoint} request - #{response.code}"
|
29
29
|
end
|
30
|
-
if response.
|
30
|
+
if !response.body.nil?
|
31
31
|
JSON.parse response.body
|
32
32
|
else
|
33
33
|
nil
|
@@ -46,7 +46,7 @@ module DIT3::Api
|
|
46
46
|
if (!response.kind_of? Net::HTTPSuccess)
|
47
47
|
raise ApiError, "Failed to execute POST #{endpoint} request - #{response.code}"
|
48
48
|
end
|
49
|
-
if response.
|
49
|
+
if !response.body.nil?
|
50
50
|
JSON.parse response.body
|
51
51
|
else
|
52
52
|
nil
|