lib/foursquare2/client.rb
def return_error_or_body(response, response_body)
      if response.body['meta'].code == 200
        response_body
      else
        raise Foursquare2::APIError.new(response.body['meta'], response.body['response'])
      end
    end
def return_error_or_body(response, response_body)
      if response.body['meta'].code == 200
        response_body
      else
        raise Foursquare2::APIError.new(response.body['meta'], response.body['response'])
      end
    end
def return_error_or_body ( response , response_body ) if response . body [ 'meta' ] . code == 200 response_body else raise Foursquare2 :: APIError . new ( response . body [ 'meta' ] , response . body [ 'response' ] ) end end
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.
Helper method to return errors or desired response data as appropriate .