Class: LeanplumApi::Configuration
- Inherits:
-
Object
- Object
- LeanplumApi::Configuration
- Defined in:
- lib/leanplum_api/configuration.rb
Constant Summary collapse
- DEFAULT_LEANPLUM_API_VERSION =
'1.0.6'.freeze
Instance Attribute Summary collapse
-
#api_debug ⇒ Object
Optional.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#app_id ⇒ Object
Required IDs and access keys provided by leanplum.
-
#content_read_only_key ⇒ Object
Returns the value of attribute content_read_only_key.
-
#data_export_key ⇒ Object
Returns the value of attribute data_export_key.
-
#developer_mode ⇒ Object
Returns the value of attribute developer_mode.
-
#development_key ⇒ Object
Returns the value of attribute development_key.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#production_key ⇒ Object
Returns the value of attribute production_key.
-
#s3_access_id ⇒ Object
Returns the value of attribute s3_access_id.
-
#s3_access_key ⇒ Object
Returns the value of attribute s3_access_key.
-
#s3_bucket_name ⇒ Object
Optional configuration for exporting raw data to S3.
-
#s3_object_prefix ⇒ Object
Returns the value of attribute s3_object_prefix.
-
#timeout_seconds ⇒ Object
Returns the value of attribute timeout_seconds.
-
#validate_response ⇒ Object
Override validations for leanplum response.
Instance Method Summary collapse
- #debug_mode? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
42 43 44 45 46 47 48 49 |
# File 'lib/leanplum_api/configuration.rb', line 42 def initialize @api_version = DEFAULT_LEANPLUM_API_VERSION @developer_mode = false @validate_response = true @timeout_seconds = 600 @logger = LeanplumApi::Logger.new(STDOUT) @api_debug = debug_mode? end |
Instance Attribute Details
#api_debug ⇒ Object
Optional
26 27 28 |
# File 'lib/leanplum_api/configuration.rb', line 26 def api_debug @api_debug end |
#api_version ⇒ Object
Returns the value of attribute api_version.
27 28 29 |
# File 'lib/leanplum_api/configuration.rb', line 27 def api_version @api_version end |
#app_id ⇒ Object
Required IDs and access keys provided by leanplum
19 20 21 |
# File 'lib/leanplum_api/configuration.rb', line 19 def app_id @app_id end |
#content_read_only_key ⇒ Object
Returns the value of attribute content_read_only_key.
21 22 23 |
# File 'lib/leanplum_api/configuration.rb', line 21 def content_read_only_key @content_read_only_key end |
#data_export_key ⇒ Object
Returns the value of attribute data_export_key.
22 23 24 |
# File 'lib/leanplum_api/configuration.rb', line 22 def data_export_key @data_export_key end |
#developer_mode ⇒ Object
Returns the value of attribute developer_mode.
28 29 30 |
# File 'lib/leanplum_api/configuration.rb', line 28 def developer_mode @developer_mode end |
#development_key ⇒ Object
Returns the value of attribute development_key.
23 24 25 |
# File 'lib/leanplum_api/configuration.rb', line 23 def development_key @development_key end |
#logger ⇒ Object
Returns the value of attribute logger.
29 30 31 |
# File 'lib/leanplum_api/configuration.rb', line 29 def logger @logger end |
#production_key ⇒ Object
Returns the value of attribute production_key.
20 21 22 |
# File 'lib/leanplum_api/configuration.rb', line 20 def production_key @production_key end |
#s3_access_id ⇒ Object
Returns the value of attribute s3_access_id.
38 39 40 |
# File 'lib/leanplum_api/configuration.rb', line 38 def s3_access_id @s3_access_id end |
#s3_access_key ⇒ Object
Returns the value of attribute s3_access_key.
39 40 41 |
# File 'lib/leanplum_api/configuration.rb', line 39 def s3_access_key @s3_access_key end |
#s3_bucket_name ⇒ Object
Optional configuration for exporting raw data to S3. If s3_bucket_name is provided, s3_access_id and s3_access_key must also be provided.
37 38 39 |
# File 'lib/leanplum_api/configuration.rb', line 37 def s3_bucket_name @s3_bucket_name end |
#s3_object_prefix ⇒ Object
Returns the value of attribute s3_object_prefix.
40 41 42 |
# File 'lib/leanplum_api/configuration.rb', line 40 def s3_object_prefix @s3_object_prefix end |
#timeout_seconds ⇒ Object
Returns the value of attribute timeout_seconds.
30 31 32 |
# File 'lib/leanplum_api/configuration.rb', line 30 def timeout_seconds @timeout_seconds end |
#validate_response ⇒ Object
Override validations for leanplum response. On by default.
33 34 35 |
# File 'lib/leanplum_api/configuration.rb', line 33 def validate_response @validate_response end |
Instance Method Details
#debug_mode? ⇒ Boolean
51 52 53 |
# File 'lib/leanplum_api/configuration.rb', line 51 def debug_mode? ENV['LEANPLUM_API_DEBUG'].to_s =~ /^(true|t|yes|y|1)$/i end |