dor-services-client 4.6.0 → 4.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/events.rb +2 -2
- 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: 9014a24be0f0040a1dac874abd9609a3902f6a50e1d96e115e8b14d3f7b87b8d
|
4
|
+
data.tar.gz: 6455349fdb1ee86f3149cffff1bed6c4f831061d2116c4bca0cca4d0cd564a99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c327267bd034675c4379923dc2b4468891245350bfe651db7a5904318b803da8635d1242a80ea52d368c15027d7f82124ebec621228aed675f905c34fee7a6a3
|
7
|
+
data.tar.gz: 604e1c7eaed370774d6a41c908a429e0770174f7933204810a3130eac992c1f031973d9d7cc875249c6eaa75c5c7f1ff66e7a0fd2ddae2d3f70286f1363ac447
|
@@ -7,7 +7,7 @@ module Dor
|
|
7
7
|
class Client
|
8
8
|
# API calls that are about retrieving metadata
|
9
9
|
class Events < VersionedService
|
10
|
-
Event = Struct.new(:event_type, :data, keyword_init: true)
|
10
|
+
Event = Struct.new(:event_type, :data, :timestamp, keyword_init: true)
|
11
11
|
|
12
12
|
# @param object_identifier [String] the pid for the object
|
13
13
|
def initialize(connection:, version:, object_identifier:)
|
@@ -32,7 +32,7 @@ module Dor
|
|
32
32
|
attr_reader :object_identifier
|
33
33
|
|
34
34
|
def response_to_models(resp)
|
35
|
-
JSON.parse(resp.body).map { |data| Event.new(event_type: data['event_type'], data: data['data']) }
|
35
|
+
JSON.parse(resp.body).map { |data| Event.new(event_type: data['event_type'], data: data['data'], timestamp: data['created_at']) }
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|