Class: KapsoClientRuby::Configuration
- Inherits:
-
Object
- Object
- KapsoClientRuby::Configuration
- Defined in:
- lib/kapso_client_ruby.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#kapso_api_key ⇒ Object
Returns the value of attribute kapso_api_key.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#retry_delay ⇒ Object
Returns the value of attribute retry_delay.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #kapso_proxy? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/kapso_client_ruby.rb', line 56 def initialize @debug = false @timeout = 60 @open_timeout = 10 @max_retries = 3 @retry_delay = 1.0 @base_url = 'https://graph.facebook.com' @api_version = 'v23.0' @access_token = nil @kapso_api_key = nil end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def access_token @access_token end |
#api_version ⇒ Object
Returns the value of attribute api_version.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def api_version @api_version end |
#base_url ⇒ Object
Returns the value of attribute base_url.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def base_url @base_url end |
#debug ⇒ Object
Returns the value of attribute debug.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def debug @debug end |
#kapso_api_key ⇒ Object
Returns the value of attribute kapso_api_key.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def kapso_api_key @kapso_api_key end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def max_retries @max_retries end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def open_timeout @open_timeout end |
#retry_delay ⇒ Object
Returns the value of attribute retry_delay.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def retry_delay @retry_delay end |
#timeout ⇒ Object
Returns the value of attribute timeout.
53 54 55 |
# File 'lib/kapso_client_ruby.rb', line 53 def timeout @timeout end |
Instance Method Details
#kapso_proxy? ⇒ Boolean
68 69 70 |
# File 'lib/kapso_client_ruby.rb', line 68 def kapso_proxy? !@kapso_api_key.nil? && @base_url&.include?('kapso') end |
#valid? ⇒ Boolean
72 73 74 |
# File 'lib/kapso_client_ruby.rb', line 72 def valid? !@access_token.nil? || !@kapso_api_key.nil? end |