Class: Dor::Services::Client::VersionedService Abstract
- Inherits:
-
Object
- Object
- Dor::Services::Client::VersionedService
- Defined in:
- lib/dor/services/client/versioned_service.rb
Overview
This class is abstract.
API calls to a versioned endpoint
Direct Known Subclasses
Accession, AdministrativeTagSearch, AdministrativeTags, BackgroundJobResults, Collections, Events, Members, Milestones, Mutate, Object, ObjectVersion, ObjectWorkflow, ObjectWorkflows, Objects, Process, ReleaseTags, UserVersion, VirtualObjects, Workflows, Workspace
Constant Summary collapse
- EXCEPTION_CLASS =
{ 400 => BadRequestError, 401 => UnauthorizedResponse, 404 => NotFoundResponse, 409 => ConflictResponse, 412 => PreconditionFailedResponse }.freeze
- JSON_API_MIME_TYPE =
'application/vnd.api+json'
Instance Method Summary collapse
-
#async_result(url:) ⇒ Object
Common interface for handling asynchronous results.
-
#initialize(connection:, version:) ⇒ VersionedService
constructor
A new instance of VersionedService.
Constructor Details
#initialize(connection:, version:) ⇒ VersionedService
Returns a new instance of VersionedService.
18 19 20 21 |
# File 'lib/dor/services/client/versioned_service.rb', line 18 def initialize(connection:, version:) @connection = connection @api_version = version end |
Instance Method Details
#async_result(url:) ⇒ Object
Common interface for handling asynchronous results
24 25 26 |
# File 'lib/dor/services/client/versioned_service.rb', line 24 def async_result(url:) AsyncResult.new(url: url) end |