Sha256: 031a1eae35aab1642c5ec95376189ae4f55a85ec3dcf89605b63256c17b1c94b

Contents?: true

Size: 951 Bytes

Versions: 18

Compression:

Stored size: 951 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  # iiif_service module for when using the built-in riiif server
  module RiiifService
    # @param [Spotlight::FeaturedImage] image
    # @return [String]
    def self.thumbnail_url(image)
      Riiif::Engine.routes.url_helpers.image_path(image, size: '!400,400')
    end

    # @param [Spotlight::FeaturedImage] image
    # @return [String]
    def self.info_url(image, _host = nil)
      Riiif::Engine.routes.url_helpers.info_path(image)
    end

    # @param [Spotlight::Exhibit] exhibit
    # @param [Spotlight::Resource::Upload] resource
    # @return [String]
    def self.manifest_url(exhibit, resource)
      Spotlight::Engine.routes.url_helpers.manifest_exhibit_solr_document_path(exhibit, "#{exhibit.id}-#{resource.id}")
    end

    # @param [String] id the ID string of a Spotlight::FeaturedImage
    # @return [Hash]
    def self.info(id)
      Riiif::Image.new(id).info
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-4.3.6 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.3.5 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.3.4 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.3.3 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.3.2 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.3.1 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.3.0 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.2.0 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.1.2 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.1.1 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.1.0 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.0.3 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.0.2 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.0.1 lib/spotlight/riiif_service.rb
blacklight-spotlight-4.0.0 lib/spotlight/riiif_service.rb
blacklight-spotlight-3.6.0.beta10 lib/spotlight/riiif_service.rb
blacklight-spotlight-3.6.0.beta9 lib/spotlight/riiif_service.rb
blacklight-spotlight-3.6.0.beta8 lib/spotlight/riiif_service.rb