lib/clever-ruby/configuration.rb in commonlit-clever-ruby-2.1.6.beta1 vs lib/clever-ruby/configuration.rb in commonlit-clever-ruby-2.1.6.beta2
- old
+ new
@@ -1,19 +1,16 @@
=begin
-#Data API
+#Clever API
-#Serves the Clever Data API
+#The Clever API
OpenAPI spec version: 2.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
-Swagger Codegen version: 2.4.37
-
+Swagger Codegen version: 3.0.51
=end
-require 'addressable/uri'
-
module Clever
class Configuration
# Defines url scheme
attr_accessor :scheme
@@ -128,11 +125,11 @@
attr_accessor :force_ending_format
def initialize
@scheme = 'https'
@host = 'api.clever.com'
- @base_path = ''
+ @base_path = 'https://api.clever.com/v2.1'
@api_key = {}
@api_key_prefix = {}
@timeout = 0
@client_side_validation = true
@verify_ssl = true
@@ -172,11 +169,10 @@
@base_path = "/#{base_path}".gsub(/\/+/, '/')
@base_path = '' if @base_path == '/'
end
def base_url
- url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
- Addressable::URI.encode(url)
+ "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
end
# Gets API key (with prefix if set).
# @param [String] param_name the parameter name of API key auth
def api_key_with_prefix(param_name)