Class: Crowdin::Client
- Inherits:
-
Object
- Object
- Crowdin::Client
- Extended by:
- Utils
- Defined in:
- lib/crowdin-api/client/client.rb,
lib/crowdin-api/client/version.rb
Overview
Constant Summary collapse
- API_RESOURCES_MODULES =
API Resources modules
%i[Storages Languages Projects Workflows SourceFiles Translations SourceStrings StringTranslations StringComments Screenshots Glossaries TranslationMemory MachineTranslationEngines Reports Tasks Users Teams Vendors Webhooks Dictionaries Distributions Labels TranslationStatus].freeze
- ERROR_RAISERS_MODULES =
Error Raisers modules
%i[ApiErrorsRaiser ClientErrorsRaiser].freeze
- VERSION =
'1.2.0'
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Client
constructor
A new instance of Client.
- #log!(message) ⇒ Object
Methods included from Utils
fetch_module_full_name_from_string
Constructor Details
#initialize(&block) ⇒ Client
Returns a new instance of Client.
49 50 51 52 53 54 55 56 |
# File 'lib/crowdin-api/client/client.rb', line 49 def initialize(&block) build_configuration(&block) check_logger check_rest_client_proxy build_connection end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
44 45 46 |
# File 'lib/crowdin-api/client/client.rb', line 44 def config @config end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
45 46 47 |
# File 'lib/crowdin-api/client/client.rb', line 45 def connection @connection end |
#logger ⇒ Object
Returns the value of attribute logger.
47 48 49 |
# File 'lib/crowdin-api/client/client.rb', line 47 def logger @logger end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
46 47 48 |
# File 'lib/crowdin-api/client/client.rb', line 46 def @options end |
Instance Method Details
#log!(message) ⇒ Object
58 59 60 |
# File 'lib/crowdin-api/client/client.rb', line 58 def log!() !config.logger_enabled? || logger.debug() end |