def oauth_request_method(http_method, path, params = {})
      fail "OAuth access token required!" unless @oauth_token

      headers = { "Accept" => "application/xml" }

      resp = if http_method == :get || http_method == :delete
        if params
          url_params = params.map { |k, v| "#{k}=#{v}" }.join("&")
          path = "#{path}?#{url_params}"
        end
        @oauth_token.request(http_method, path, headers)
      else
        @oauth_token.request(http_method, path, params || {}, headers)
      end

      case resp
      when Net::HTTPUnauthorized
        fail Goodreads::Unauthorized
      when Net::HTTPNotFound
        fail Goodreads::NotFound
      end

      parse(resp)
    end
def oauth_request_method(http_method, path, params = {})
      fail "OAuth access token required!" unless @oauth_token

      headers = { "Accept" => "application/xml" }

      resp = if http_method == :get || http_method == :delete
        if params
          url_params = params.map { |k, v| "#{k}=#{v}" }.join("&")
          path = "#{path}?#{url_params}"
        end
        @oauth_token.request(http_method, path, headers)
      else
        @oauth_token.request(http_method, path, params || {}, headers)
      end

      case resp
      when Net::HTTPUnauthorized
        fail Goodreads::Unauthorized
      when Net::HTTPNotFound
        fail Goodreads::NotFound
      end

      parse(resp)
    end
Perform an OAuth API request. Goodreads must have been initialized with a valid OAuth access token.

 http_method - HTTP verb supported by OAuth gem (one of :get, :post, :delete, etc.)
 path   - Request path
 params - Parameters hash