lib/nicoquery/api/base.rb in nicoquery-0.0.2.4 vs lib/nicoquery/api/base.rb in nicoquery-0.0.3
- old
+ new
@@ -24,10 +24,15 @@
_uri = scheme + "://" + [ ([host, path].join('/')), params].join('?')
URI.escape _uri
end
def get
- RestClient.get uri.to_s
+ RestClient.get uri.to_s do |response, request, result, &block|
+ case response.code
+ when 200 || 403
+ response
+ end
+ end
end
end
end
end