dor-services-client 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor/services/client.rb +4 -0
- data/lib/dor/services/client/objects.rb +13 -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: 875495ec63471d10398a445d157995ea10d279be90f83f6fd00de0587dbd9eda
|
4
|
+
data.tar.gz: df2c81d982fd112a808806ab41eaade32edcac05be679dbbfc5bdb5ab5c4625c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fd7d69b9ea0a9282be2d6c7e5be789f20df33f6870633fb3fe248b2963c5d1cf3f6c0b6ab2b1659107f490ac4825a32f417643b3b8e55b5d3a25dbd06eb908e
|
7
|
+
data.tar.gz: 1869bd7147d957bbb5568110ce6e389eefee1956d911bac2eda31f5fa379ff57d44a97c697503b6b0a5b7f27786a2a1288b9b7b1b23b3e0a2ca2dd77dc6c3a2a
|
data/lib/dor/services/client.rb
CHANGED
@@ -120,6 +120,10 @@ module Dor
|
|
120
120
|
# @raise [UnexpectedResponse] when the response is not successful.
|
121
121
|
# @return [boolean] true on success
|
122
122
|
delegate :publish, to: :objects
|
123
|
+
|
124
|
+
# Notify goobi system of a new object
|
125
|
+
delegate :notify_goobi, to: :objects
|
126
|
+
|
123
127
|
end
|
124
128
|
|
125
129
|
# Gets the current version number for the object
|
@@ -27,6 +27,19 @@ module Dor
|
|
27
27
|
true
|
28
28
|
end
|
29
29
|
|
30
|
+
# Notify the external Goobi system for a new object that was registered in DOR
|
31
|
+
# @param object [String] the pid for the object
|
32
|
+
# @raise [UnexpectedResponse] when the response is not successful.
|
33
|
+
# @return [boolean] true on success
|
34
|
+
def notify_goobi(object:)
|
35
|
+
resp = connection.post do |req|
|
36
|
+
req.url "#{api_version}/objects/#{object}/notify_goobi"
|
37
|
+
end
|
38
|
+
raise UnexpectedResponse, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success?
|
39
|
+
|
40
|
+
true
|
41
|
+
end
|
42
|
+
|
30
43
|
# Gets the current version number for the object
|
31
44
|
# @param object [String] the pid for the object
|
32
45
|
# @raise [UnexpectedResponse] when the response is not successful.
|