lib/blinkbox/common_mapping.rb
# Gets the status of a specific token, optionally recording that a provider has failed for a specific
# asset if specified.
#
# @return [nil] if the token does not exist
# @return [Hash] details of the asset
Gets the status of a specific token, optionally recording that a provider has failed for a specific
asset if specified.
Gets the status of a specific token optionally recording that a provider has failed for a specific asset if specified .
def retrieve_status(token, provider_failure: nil)
      raise InvalidTokenError unless valid_token?(token)
      res = ss_get("/resources/#{token}")
      return nil if res.code == "404"
      raise StorageServiceUnavailableError, "Storage service responded with #{res.code}" unless res.code == "200"
      JSON.parse(res.body)
    end
def retrieve_status ( token , provider_failure : nil ) raise InvalidTokenError unless valid_token? ( token ) res = ss_get ( "/resources/#{token}" ) return nil if res . code == "404" raise StorageServiceUnavailableError , "Storage service responded with #{res.code}" unless res . code == "200" JSON . parse ( res . body ) end
Gets the status of a specific token, optionally recording that a provider has failed for a specific
asset if specified.
Gets the status of a specific token optionally recording that a provider has failed for a specific asset if specified .
# TODO: Deal with other response codes
if the token does not exist
if the token does not exist
nil
details of the asset
details of the asset
Hash
token
provider_failure