require 'publisher_api'
require 'imminence_api'
require 'panopticon_api'

class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :api_host
  def api_host
    Plek.current.find('publisher')
  end

  helper_method :imminence_host
  def imminence_host
    Plek.current.find('data')
  end

  def panopticon_host
    Plek.current.find('arbiter')
  end

  helper_method :api
  def api
    @api ||= PublisherApi.new(api_host)
  end

  helper_method :places_api
  def places_api
    @places_api ||= ImminenceApi.new(imminence_host)
  end

  helper_method :artefact_api
  def artefact_api
    @artefact_api ||= PanopticonApi.new(panopticon_host)
  end
end

require 'gds_api/publisher'
require 'gds_api/imminence'
require 'gds_api/panopticon'

class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :api
  def api
    @api ||= GdsApi::Publisher.new(Rails.env)
  end

  helper_method :places_api
  def places_api
    @places_api ||= GdsApi::Imminence.new(Rails.env)
  end

  helper_method :artefact_api
  def artefact_api
    @artefact_api ||= GdsApi::Panopticon.new(Rails.env)
  end
end

Switch to updated GdsApi api
Switch to updated GdsApi api
