dor-services-client 15.68.0 → 15.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/dor/services/client/object_version.rb +17 -0
- data/lib/dor/services/client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7eb1b5eb6201610e9bd4496dcc0709e4a3348639aae0655c25373b98d00c621
|
|
4
|
+
data.tar.gz: f45e73e423f64393198f41d2ef7f4d954bc0794b470aea4e7b647e2f37cd2e01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba12e822c3fcbd54f30d140ed114ee680854580b00a9632aa77b6f1081ca31258693836f4b5b325e18bfde34c38c3055cd81c6e4cc6f7c18ceb76de03403ac50
|
|
7
|
+
data.tar.gz: 5d825bc8d170005932dcd7d9d104c43ad7a3560aa6e99673c245fa6abbf1de01993286cef5aeb4930ea297db304fa88db58a5bd6ea6b6bd6d2deb595e51869d3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -120,6 +120,8 @@ object_client.version.solr(2)
|
|
|
120
120
|
object_client.version.open(description: 'Changed title')
|
|
121
121
|
# see dor-services-app openapi.yml for optional params
|
|
122
122
|
object_client.version.close
|
|
123
|
+
# Update the description of the currently open version
|
|
124
|
+
object_client.version.update_description(description: 'Changed title and abstract', user_name: 'some_sunetid')
|
|
123
125
|
|
|
124
126
|
# Manage user versions
|
|
125
127
|
object_client.user_version.inventory
|
|
@@ -123,6 +123,23 @@ module Dor
|
|
|
123
123
|
raise_exception_based_on_response!(resp)
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
+
# Update the description of the currently open version for an object
|
|
127
|
+
# @param description [String] the new description of the version - required
|
|
128
|
+
# @param user_name [String] (optional) - sunetid
|
|
129
|
+
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
|
130
|
+
# @raise [ConflictResponse] when the response is a 409 (no version is open)
|
|
131
|
+
# @raise [UnexpectedResponse] when the response is not successful.
|
|
132
|
+
def update_description(description:, user_name: nil)
|
|
133
|
+
resp = connection.patch do |req|
|
|
134
|
+
req.url "#{base_path}/current"
|
|
135
|
+
req.headers['Content-Type'] = 'application/json'
|
|
136
|
+
req.body = { description: description, user_name: user_name }.compact.to_json
|
|
137
|
+
end
|
|
138
|
+
return if resp.success?
|
|
139
|
+
|
|
140
|
+
raise_exception_based_on_response!(resp)
|
|
141
|
+
end
|
|
142
|
+
|
|
126
143
|
# @return [Array] a list of the versions
|
|
127
144
|
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
|
128
145
|
def inventory
|