Class: Qa::LinkedData::AuthorityUrlService

Inherits:
Object
  • Object
show all
Defined in:
app/services/qa/linked_data/authority_url_service.rb

Class Method Summary collapse

Class Method Details

.build_url(action_config:, action:, action_request:, substitutions: {}, subauthority: nil, language: nil) ⇒ Object

Build a url for an authority/subauthority for the specified action.



14
15
16
17
18
19
# File 'app/services/qa/linked_data/authority_url_service.rb', line 14

def build_url(action_config:, action:, action_request:, substitutions: {}, subauthority: nil, language: nil) # rubocop:disable Metrics/ParameterLists
  action_validation(action)
  url_config = action_config.url_config
  selected_substitutions = url_config.extract_substitutions(combined_substitutions(action_config, action, action_request, substitutions, subauthority, language))
  Qa::IriTemplateService.build_url(url_config: url_config, substitutions: selected_substitutions)
end