Class: GroupDocsAnnotationCloud::Configuration
- Inherits:
-
Object
- Object
- GroupDocsAnnotationCloud::Configuration
- Defined in:
- lib/groupdocs_annotation_cloud/configuration.rb
Overview
Class for storing API configuration info
Instance Attribute Summary collapse
-
#api_base_url ⇒ String
Api base url, default is ‘api.groupdocs.cloud’.
-
#api_version ⇒ String
Api version, default is ‘/v2.0’.
-
#app_key ⇒ String
Application private key (App Key).
-
#app_sid ⇒ String
Application identifier (App SID).
-
#client_side_validation ⇒ true, false
Set this to false to skip client side validation in the operation.
-
#debugging ⇒ true, false
Set this to enable/disable debugging.
-
#logger ⇒ #logger
Defines the logger used for debugging.
-
#temp_folder_path ⇒ String
Defines the temporary folder to store downloaded files (for API endpoints that have file response).
Instance Method Summary collapse
-
#initialize(app_sid, app_key) {|_self| ... } ⇒ Configuration
constructor
Initializes new instance of Configuration.
Constructor Details
#initialize(app_sid, app_key) {|_self| ... } ⇒ Configuration
Initializes new instance of Configuration
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 82 def initialize(app_sid, app_key) @api_base_url = "https://api.groupdocs.cloud" @api_version = '/v2.0' @app_sid = app_sid @app_key = app_key @client_side_validation = true @debugging = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) yield(self) if block_given? end |
Instance Attribute Details
#api_base_url ⇒ String
Api base url, default is ‘api.groupdocs.cloud’
35 36 37 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 35 def api_base_url @api_base_url end |
#api_version ⇒ String
Api version, default is ‘/v2.0’
40 41 42 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 40 def api_version @api_version end |
#app_key ⇒ String
Application private key (App Key)
50 51 52 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 50 def app_key @app_key end |
#app_sid ⇒ String
Application identifier (App SID)
45 46 47 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 45 def app_sid @app_sid end |
#client_side_validation ⇒ true, false
Set this to false to skip client side validation in the operation. Default to true.
75 76 77 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 75 def client_side_validation @client_side_validation end |
#debugging ⇒ true, false
Set this to enable/disable debugging. When enabled (set to true), HTTP request/response details will be logged with ‘logger.debug` (see the `logger` attribute). Default value is false.
57 58 59 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 57 def debugging @debugging end |
#logger ⇒ #logger
Defines the logger used for debugging. Default to ‘Rails.logger` (when in Rails) or logging to STDOUT.
63 64 65 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 63 def logger @logger end |
#temp_folder_path ⇒ String
Defines the temporary folder to store downloaded files (for API endpoints that have file response). System temporary folder is used by default.
70 71 72 |
# File 'lib/groupdocs_annotation_cloud/configuration.rb', line 70 def temp_folder_path @temp_folder_path end |