lib/preservation/client/versioned_api_service.rb in preservation-client-1.0.0 vs lib/preservation/client/versioned_api_service.rb in preservation-client-2.0.0
- old
+ new
@@ -1,11 +1,13 @@
# frozen_string_literal: true
module Preservation
class Client
+ DEFAULT_API_VERSION = 'v1'
+
# @abstract API calls to a versioned endpoint
class VersionedApiService
- def initialize(connection:, api_version:)
+ def initialize(connection:, api_version: DEFAULT_API_VERSION)
@connection = connection
@api_version = api_version
end
private