Class: Labimotion::LabimotionTemplateBrowseAPI
- Inherits:
-
Grape::API
- Object
- Grape::API
- Labimotion::LabimotionTemplateBrowseAPI
- Defined in:
- lib/labimotion/apis/labimotion_template_browse_api.rb
Overview
Public, read-only browsing of released LabIMotion templates for the Template Hub “Find a Template” tab: pick a type, a template, then a release version. Returns every released version (revision) of one template, each with its own properties_release so the frontend can render the example inline. Whitelisted in RepoAPI::PUBLIC_URLS so anonymous hub visitors can use it.
Constant Summary collapse
- KLASS_BY_TYPE =
Labimotion::TemplateDoiHelpers::KLASS_BY_TYPE
- KLASS_TYPES =
KLASS_BY_TYPE.keys.freeze
- REVISION_BY_TYPE =
type => [revision model, foreign key to the klass]
{ 'element' => [::Labimotion::ElementKlassesRevision, :element_klass_id], 'segment' => [::Labimotion::SegmentKlassesRevision, :segment_klass_id], 'dataset' => [::Labimotion::DatasetKlassesRevision, :dataset_klass_id] }.freeze