Module: GdsApi::Helpers

Defined in:
lib/gds_api/helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


34
35
36
37
38
# File 'lib/gds_api/helpers.rb', line 34

def self.included(klass)
  if klass.respond_to?(:helper_method)
    klass.helper_method :imminence_api, :licence_application_api
  end
end

Instance Method Details

#asset_manager_api(options = {}) ⇒ Object


10
11
12
# File 'lib/gds_api/helpers.rb', line 10

def asset_manager_api(options = {})
  @asset_manager_api ||= GdsApi::AssetManager.new(Plek.current.find('asset-manager'), options)
end

#content_store(options = {}) ⇒ Object


14
15
16
# File 'lib/gds_api/helpers.rb', line 14

def content_store(options = {})
  @content_store ||= GdsApi::ContentStore.new(Plek.current.find("content-store"), options)
end

#email_alert_api(options = {}) ⇒ Object


30
31
32
# File 'lib/gds_api/helpers.rb', line 30

def email_alert_api(options = {})
  @email_alert_api ||= EmailAlertApi.new(Plek.current.find("email-alert-api"), options)
end

#imminence_api(options = {}) ⇒ Object


18
19
20
# File 'lib/gds_api/helpers.rb', line 18

def imminence_api(options = {})
  @imminence_api ||= GdsApi::Imminence.new(Plek.current.find("imminence"), options)
end

#licence_application_api(options = {}) ⇒ Object


22
23
24
# File 'lib/gds_api/helpers.rb', line 22

def licence_application_api(options = {})
  @licence_application_api ||= GdsApi::LicenceApplication.new(Plek.current.find("licensify"), options)
end

#worldwide_api(options = {}) ⇒ Object


26
27
28
# File 'lib/gds_api/helpers.rb', line 26

def worldwide_api(options = {})
  @worldwide_api ||= GdsApi::Worldwide.new(Plek.current.find("whitehall-admin"), options)
end