noun-project-api 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/noun-project-api/icons_retriever.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbb311ca73f82163024bcb0df6be86691aa3a330a92633e1a4aa88d6f205f572
|
4
|
+
data.tar.gz: 5ca5acd613a7182f320cf4b70fd5f4d3a4a255ce5f3a8673df71a6cb39cc97c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c535dc993850089e01b5fd9e3bfa586d89844abd033f5f09ea29f2bf4626a39405d1506a64ee5e89de71ece597811bfa3e37a5b8ed3c64ca194e9e03298bb8
|
7
|
+
data.tar.gz: c312621d5e9be931e6634af8f9869754b67360bd53abdf4720f395c7ad2b13a54656db7f60414f893ce087dae7bf20ff37e99b26caab8f4dc714446d5bdf7fc4
|
@@ -24,7 +24,7 @@ module NounProjectApi
|
|
24
24
|
args.each { |k, v| search += "&#{k}=#{v}" } if args.size > 0
|
25
25
|
|
26
26
|
result = access_token.get("#{API_BASE}#{API_PATH}#{search}")
|
27
|
-
raise
|
27
|
+
raise ServiceError.new(result.code, result.body) unless %w(200 404).include? result.code
|
28
28
|
|
29
29
|
if result.code == "200"
|
30
30
|
JSON.parse(result.body)["icons"].map { |icon| Icon.new(icon) }
|
@@ -51,7 +51,7 @@ module NounProjectApi
|
|
51
51
|
end
|
52
52
|
|
53
53
|
result = access_token.get("#{API_BASE}#{API_PATH}recent_uploads#{search}")
|
54
|
-
raise
|
54
|
+
raise ServiceError.new(result.code, result.body) unless result.code == "200"
|
55
55
|
|
56
56
|
JSON.parse(result.body)["recent_uploads"].map { |icon| Icon.new(icon) }
|
57
57
|
end
|