Sha256: b37b97ce5d89809d90149166897f2ddc62bb5886eaa1dca52487d4f2b4b96bb6
Contents?: true
Size: 735 Bytes
Versions: 12
Compression:
Stored size: 735 Bytes
Contents
# frozen_string_literal: true module Dor module Services class Client # @abstract API calls to a versioned endpoint class VersionedService def initialize(connection:, version:) @connection = connection @api_version = version end # Common interface for handling asynchronous results def async_result(url:) AsyncResult.new(url: url) end private attr_reader :connection, :api_version def raise_exception_based_on_response!(response) raise (response.status == 404 ? NotFoundResponse : UnexpectedResponse), ResponseErrorFormatter.format(response: response) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems