def return_error_or_body(response)
      if response.status / 100 == 2
        response.body
      else
        raise Checkdin::APIError.new(response.status, response.body)
      end
    end
def return_error_or_body(response)
      if response.status / 100 == 2
        response.body
      else
        raise Checkdin::APIError.new(response.status, response.body)
      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.