Class: GroupDocsConversionCloud::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/groupdocs_conversion_cloud/configuration.rb

Overview

Class for storing API configuration info

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_sid, app_key) {|_self| ... } ⇒ Configuration

Initializes new instance of Configuration

Parameters:

  • Application (app_sid)

    identifier (App SID)

  • Application (app_key)

    private key (App Key)

Yields:

  • (_self)

Yield Parameters:



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/groupdocs_conversion_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_urlString

Api base url, default is ‘api.groupdocs.cloud

Returns:

  • (String)

    Api base url



35
36
37
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 35

def api_base_url
  @api_base_url
end

#api_versionString

Api version, default is ‘/v2.0’

Returns:

  • (String)

    Api version



40
41
42
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 40

def api_version
  @api_version
end

#app_keyString

Application private key (App Key)

Returns:

  • (String)

    Application private key (App Key)



50
51
52
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 50

def app_key
  @app_key
end

#app_sidString

Application identifier (App SID)

Returns:

  • (String)

    Application identifier (App SID)



45
46
47
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 45

def app_sid
  @app_sid
end

#client_side_validationtrue, false

Set this to false to skip client side validation in the operation. Default to true.

Returns:

  • (true, false)


75
76
77
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 75

def client_side_validation
  @client_side_validation
end

#debuggingtrue, 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.

Returns:

  • (true, false)


57
58
59
# File 'lib/groupdocs_conversion_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.

Returns:



63
64
65
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 63

def logger
  @logger
end

#temp_folder_pathString

Defines the temporary folder to store downloaded files (for API endpoints that have file response). System temporary folder is used by default.

Returns:

  • (String)


70
71
72
# File 'lib/groupdocs_conversion_cloud/configuration.rb', line 70

def temp_folder_path
  @temp_folder_path
end