diff --git a/lib/twitter/rest/request.rb b/lib/twitter/rest/request.rb index 37e04d917..d5bac27e6 100644 --- a/lib/twitter/rest/request.rb +++ b/lib/twitter/rest/request.rb @@ -116,6 +116,9 @@ def symbolize_keys!(object) object end + # Returns an HTTP client, using configuration set up in the client + # + # @api private # @return [HTTP::Client, HTTP] def http_client client = @client.proxy ? HTTP.via(*proxy) : HTTP @@ -125,6 +128,7 @@ def http_client # Return proxy values as a compacted array # + # @api private # @return [Array] def proxy @client.proxy.values_at(:host, :port, :username, :password).compact diff --git a/lib/twitter/rest/utils.rb b/lib/twitter/rest/utils.rb index e26d4e19c..528f9d9f6 100644 --- a/lib/twitter/rest/utils.rb +++ b/lib/twitter/rest/utils.rb @@ -17,6 +17,7 @@ module Utils # Take a URI string or Twitter::Identity object and return its ID # # @param object [Integer, String, URI, Twitter::Identity] An ID, URI, or object. + # @api private # @return [Integer] def extract_id(object) case object @@ -31,18 +32,21 @@ def extract_id(object) end end + # @api private # @param path [String] # @param options [Hash] def perform_get(path, options = {}) perform_request(:get, path, options) end + # @api private # @param path [String] # @param options [Hash] def perform_post(path, options = {}) perform_request(:post, path, options) end + # @api private # @param request_method [Symbol] # @param path [String] # @param options [Hash]