Class: Dor::Services::Client::Members
- Inherits:
-
VersionedService
- Object
- VersionedService
- Dor::Services::Client::Members
- Defined in:
- lib/dor/services/client/members.rb
Overview
API call that queries the members of a collection.
Defined Under Namespace
Classes: Member
Constant Summary
Constants inherited from VersionedService
VersionedService::EXCEPTION_CLASS, VersionedService::JSON_API_MIME_TYPE
Instance Method Summary collapse
-
#initialize(connection:, version:, object_identifier:) ⇒ Members
constructor
A new instance of Members.
-
#members ⇒ Array<Member>
Get a list of the members.
Methods inherited from VersionedService
#async_result, #with_querystring
Constructor Details
#initialize(connection:, version:, object_identifier:) ⇒ Members
Returns a new instance of Members.
11 12 13 14 |
# File 'lib/dor/services/client/members.rb', line 11 def initialize(connection:, version:, object_identifier:) super(connection: connection, version: version) @object_identifier = object_identifier end |
Instance Method Details
#members ⇒ Array<Member>
Get a list of the members.
19 20 21 22 23 24 25 26 27 |
# File 'lib/dor/services/client/members.rb', line 19 def members resp = connection.get do |req| req.url members_path end return response_to_models(resp) if resp.success? raise_exception_based_on_response!(resp, object_identifier) end |