lib/foursquare2/client.rb in foursquare2-2.0.1 vs lib/foursquare2/client.rb in foursquare2-2.0.2
- old
+ new
@@ -79,13 +79,13 @@
# Helper method to return errors or desired response data as appropriate.
#
# Added just for convenience to avoid having to traverse farther down the response just to get to returned data.
def return_error_or_body(response, response_body)
- if response.body.meta.code == 200
+ if response.body['meta'].code == 200
response_body
else
- raise Foursquare2::APIError.new(response.body.meta, response.body.response)
+ raise Foursquare2::APIError.new(response.body['meta'], response.body['response'])
end
end
private