Module: Spotlight::RiiifService
- Defined in:
- lib/spotlight/riiif_service.rb
Overview
iiif_service module for when using the built-in riiif server
Class Method Summary collapse
- .info(id) ⇒ Hash
- .info_url(image, _host = nil) ⇒ String
- .manifest_url(exhibit, resource) ⇒ String
- .thumbnail_url(image) ⇒ String
Class Method Details
.info(id) ⇒ Hash
27 28 29 |
# File 'lib/spotlight/riiif_service.rb', line 27 def self.info(id) Riiif::Image.new(id).info end |
.info_url(image, _host = nil) ⇒ String
14 15 16 |
# File 'lib/spotlight/riiif_service.rb', line 14 def self.info_url(image, _host = nil) Riiif::Engine.routes.url_helpers.info_path(image) end |
.manifest_url(exhibit, resource) ⇒ String
21 22 23 |
# File 'lib/spotlight/riiif_service.rb', line 21 def self.manifest_url(exhibit, resource) Spotlight::Engine.routes.url_helpers.manifest_exhibit_solr_document_path(exhibit, "#{exhibit.id}-#{resource.id}") end |
.thumbnail_url(image) ⇒ String
8 9 10 |
# File 'lib/spotlight/riiif_service.rb', line 8 def self.thumbnail_url(image) Riiif::Engine.routes.url_helpers.image_path(image, size: '!400,400') end |