lib/deepl.rb in deepl-rb-2.2.4 vs lib/deepl.rb in deepl-rb-2.3.0

- old
+ new

@@ -12,15 +12,17 @@ require 'deepl/exceptions/limit_exceeded' require 'deepl/exceptions/quota_exceeded' # -- Requests require 'deepl/requests/base' +require 'deepl/requests/languages' require 'deepl/requests/translate' require 'deepl/requests/usage' # -- Responses and resources require 'deepl/resources/base' +require 'deepl/resources/language' require 'deepl/resources/text' require 'deepl/resources/usage' # -- Other wrappers require 'deepl/api' @@ -32,9 +34,13 @@ ## -- API shortcuts def api @api ||= API.new(configuration) + end + + def languages(options = {}) + Requests::Languages.new(api, options).request end def translate(text, source_lang, target_lang, options = {}) configure if @configuration.nil? Requests::Translate.new(api, text, source_lang, target_lang, options).request