dor-services-client 6.2.0 → 6.3.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/.rubocop_todo.yml +1 -1
- data/README.md +3 -0
- data/lib/dor/services/client.rb +7 -1
- data/lib/dor/services/client/administrative_tag_search.rb +25 -0
- data/lib/dor/services/client/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a27050d3ec926a85dc7008ef3e8d474c5c4a8c7312a17488ab4f7637f8a7fe5
|
4
|
+
data.tar.gz: c1743cb83b1ff422517aa38643308d564d567a5dae46db6502a19165fd237cf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a0e9fc38ba40fff3e7c0a0626b38a0e053fc649b1ffc96c0521105bed6560dd9a32e3bee1db2d051428fb372a6f007ec1f44127e334b95a7ac3e2a9131ed6a6
|
7
|
+
data.tar.gz: 9c00a67479069aeb5c14c77087dbda87b34386251529e9ce15aedf9e10462296519f6701987fcc17ccac96f05d18a5435a0d665456ab0162e723e5755fd860a9
|
data/.rubocop_todo.yml
CHANGED
data/README.md
CHANGED
@@ -169,6 +169,9 @@ object_client.workspace.reset
|
|
169
169
|
|
170
170
|
# Update embargo
|
171
171
|
object_client.embargo.update(embargo_date: date_string, requesting_user: username_string)
|
172
|
+
|
173
|
+
# Search for administrative tags:
|
174
|
+
Dor::Services::Client.administrative_tags.search(q: 'Project')
|
172
175
|
```
|
173
176
|
|
174
177
|
## Asynchronous results
|
data/lib/dor/services/client.rb
CHANGED
@@ -56,6 +56,11 @@ module Dor
|
|
56
56
|
@object = Object.new(connection: connection, version: DEFAULT_VERSION, object_identifier: object_identifier)
|
57
57
|
end
|
58
58
|
|
59
|
+
# @return [Dor::Services::Client::AdministrativeTagSearch] an instance of the `Client::AdministrativeTagSearch` class
|
60
|
+
def administrative_tags
|
61
|
+
@administrative_tags ||= AdministrativeTagSearch.new(connection: connection, version: DEFAULT_VERSION)
|
62
|
+
end
|
63
|
+
|
59
64
|
# @return [Dor::Services::Client::Objects] an instance of the `Client::Objects` class
|
60
65
|
def objects
|
61
66
|
@objects ||= Objects.new(connection: connection, version: DEFAULT_VERSION)
|
@@ -91,7 +96,8 @@ module Dor
|
|
91
96
|
self
|
92
97
|
end
|
93
98
|
|
94
|
-
delegate :background_job_results, :marcxml, :objects, :object,
|
99
|
+
delegate :background_job_results, :marcxml, :objects, :object,
|
100
|
+
:virtual_objects, :administrative_tags, to: :instance
|
95
101
|
end
|
96
102
|
|
97
103
|
attr_writer :url, :token, :connection, :enable_get_retries
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/json' # required for serializing time as iso8601
|
4
|
+
|
5
|
+
module Dor
|
6
|
+
module Services
|
7
|
+
class Client
|
8
|
+
# API calls that are about searching AdministrativeTags
|
9
|
+
class AdministrativeTagSearch < VersionedService
|
10
|
+
# rubocop:disable Naming/UncommunicativeMethodParamName
|
11
|
+
def search(q:)
|
12
|
+
resp = connection.get do |req|
|
13
|
+
req.url "#{api_version}/administrative_tags/search?q=#{q}"
|
14
|
+
end
|
15
|
+
|
16
|
+
# Since argo is using this as a proxy, no need to parse the response.
|
17
|
+
return resp.body if resp.success?
|
18
|
+
|
19
|
+
raise_exception_based_on_response!(resp)
|
20
|
+
end
|
21
|
+
# rubocop:enable Naming/UncommunicativeMethodParamName
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-05-
|
12
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- dor-services-client.gemspec
|
229
229
|
- lib/dor/services/client.rb
|
230
230
|
- lib/dor/services/client/accession.rb
|
231
|
+
- lib/dor/services/client/administrative_tag_search.rb
|
231
232
|
- lib/dor/services/client/administrative_tags.rb
|
232
233
|
- lib/dor/services/client/async_result.rb
|
233
234
|
- lib/dor/services/client/background_job_results.rb
|