Class: Asana::HttpClient::EnvironmentInfo Private
- Inherits:
-
Object
- Object
- Asana::HttpClient::EnvironmentInfo
- Defined in:
- lib/asana/http_client/environment_info.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Adds environment information to a Faraday request.
Constant Summary collapse
- USER_AGENT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The default user agent to use in all requests to the API.
"ruby-asana v#{Asana::VERSION}".freeze
Instance Method Summary collapse
-
#configure(builder) ⇒ Object
Augments a Faraday connection with information about the environment.
-
#initialize(user_agent = nil) ⇒ EnvironmentInfo
constructor
private
A new instance of EnvironmentInfo.
Constructor Details
#initialize(user_agent = nil) ⇒ EnvironmentInfo
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EnvironmentInfo.
11 12 13 14 15 16 |
# File 'lib/asana/http_client/environment_info.rb', line 11 def initialize(user_agent = nil) @user_agent = user_agent || USER_AGENT @openssl_version = OpenSSL::OPENSSL_VERSION @client_version = Asana::VERSION @os = os end |
Instance Method Details
#configure(builder) ⇒ Object
Augments a Faraday connection with information about the environment.
20 21 22 23 |
# File 'lib/asana/http_client/environment_info.rb', line 20 def configure(builder) builder.headers[:user_agent] = @user_agent builder.headers[:"X-Asana-Client-Lib"] = header end |