lib/deepl/requests/base.rb in deepl-rb-2.1.0 vs lib/deepl/requests/base.rb in deepl-rb-2.2.0
- old
+ new
@@ -1,10 +1,8 @@
module DeepL
module Requests
class Base
- API_VERSION = 'v1'.freeze
-
attr_reader :api, :response, :options
def initialize(api, options = {})
@api = api
@options = options
@@ -71,10 +69,10 @@
def path
raise NotImplementedError
end
def url
- "#{host}/#{API_VERSION}/#{path}"
+ "#{host}/#{api.configuration.version}/#{path}"
end
def uri
@uri ||= begin
uri = URI(url)