Class: Dor::Services::Client::Objects
- Inherits:
-
VersionedService
- Object
- VersionedService
- Dor::Services::Client::Objects
- Extended by:
- Deprecation
- Defined in:
- lib/dor/services/client/objects.rb
Overview
API calls that are about a repository objects
Instance Method Summary collapse
-
#current_version(object:) ⇒ Integer
Gets the current version number for the object.
-
#notify_goobi(object:) ⇒ boolean
Notify the external Goobi system for a new object that was registered in DOR.
-
#publish(object:) ⇒ boolean
Publish a new object.
-
#register(params:) ⇒ HashWithIndifferentAccess
Creates a new object in DOR.
Methods inherited from VersionedService
Constructor Details
This class inherits a constructor from Dor::Services::Client::VersionedService
Instance Method Details
#current_version(object:) ⇒ Integer
Gets the current version number for the object
42 43 44 |
# File 'lib/dor/services/client/objects.rb', line 42 def current_version(object:) SDR.new(connection: connection, version: api_version).current_version(object: object) end |
#notify_goobi(object:) ⇒ boolean
Notify the external Goobi system for a new object that was registered in DOR
32 33 34 |
# File 'lib/dor/services/client/objects.rb', line 32 def notify_goobi(object:) Object.new(connection: connection, version: api_version, object: object).notify_goobi end |
#publish(object:) ⇒ boolean
Publish a new object
23 24 25 |
# File 'lib/dor/services/client/objects.rb', line 23 def publish(object:) Object.new(connection: connection, version: api_version, object: object).publish end |
#register(params:) ⇒ HashWithIndifferentAccess
Creates a new object in DOR
14 15 16 17 |
# File 'lib/dor/services/client/objects.rb', line 14 def register(params:) json = register_response(params: params) JSON.parse(json).with_indifferent_access end |