Class: RubyLokaliseApi::BaseClient
- Inherits:
-
Object
- Object
- RubyLokaliseApi::BaseClient
- Defined in:
- lib/ruby_lokalise_api/base_client.rb
Overview
This class contains the base client. Inherited by Client (regular API client) and OAuth2Client (used for OAuth-2 based authentication)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#token_header ⇒ Object
readonly
Returns the value of attribute token_header.
Instance Method Summary collapse
-
#initialize(token, params = {}) ⇒ BaseClient
constructor
A new instance of BaseClient.
Constructor Details
#initialize(token, params = {}) ⇒ BaseClient
Returns a new instance of BaseClient.
10 11 12 13 14 15 |
# File 'lib/ruby_lokalise_api/base_client.rb', line 10 def initialize(token, params = {}) @token = token @timeout = params.fetch(:timeout, nil) @open_timeout = params.fetch(:open_timeout, nil) @token_header = '' end |
Instance Attribute Details
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
8 9 10 |
# File 'lib/ruby_lokalise_api/base_client.rb', line 8 def open_timeout @open_timeout end |
#timeout ⇒ Object
Returns the value of attribute timeout.
8 9 10 |
# File 'lib/ruby_lokalise_api/base_client.rb', line 8 def timeout @timeout end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/ruby_lokalise_api/base_client.rb', line 7 def token @token end |
#token_header ⇒ Object (readonly)
Returns the value of attribute token_header.
7 8 9 |
# File 'lib/ruby_lokalise_api/base_client.rb', line 7 def token_header @token_header end |