lib/approveapi.rb in approveapi-1.0.3 vs lib/approveapi.rb in approveapi-1.0.4

- old
+ new

@@ -5,35 +5,21 @@ Contact: hello@approveapi.com =end -# Common files -require 'approveapi_swagger/api_client' -require 'approveapi_swagger/api_error' -require 'approveapi_swagger/version' -require 'approveapi_swagger/configuration' +require 'approveapi_swagger' -# Models -require 'approveapi_swagger/models/answer_metadata' -require 'approveapi_swagger/models/create_prompt_request' -require 'approveapi_swagger/models/error' -require 'approveapi_swagger/models/prompt' -require 'approveapi_swagger/models/prompt_answer' -require 'approveapi_swagger/models/prompt_metadata' -require 'approveapi_swagger/models/prompt_status' - -# APIs -require 'approveapi_swagger/api/approve_api' - module ApproveAPI + # re-export constants include ApproveAPISwagger + class << self def create_client(secret_api_key) - self.configure do |config| + ApproveAPISwagger.configure do |config| config.username = secret_api_key end - client = self::ApproveAPI.new + client = ApproveAPISwagger::ApproveApi.new if block_given? yield(client) else client end