Class: TicketNetwork::Catalog::Configuration

Inherits:
Base
  • Object
show all
Defined in:
lib/ticket_network/catalog/configuration.rb

Defined Under Namespace

Classes: Parser

Constant Summary collapse

MAP_ROOT =
'http://maps.seatics.com/'.freeze

Class Method Summary collapse

Methods inherited from Base

action, defaults, get, post, service

Class Method Details

.all(parameters = {}) ⇒ Object



28
29
30
# File 'lib/ticket_network/catalog/configuration.rb', line 28

def all(parameters={})
  fetch(parameters).venue_configurations
end

.map_url(venue_configuration) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ticket_network/catalog/configuration.rb', line 32

def map_url(venue_configuration)
  unless venue_configuration.map_url.blank?
    map_site = venue_configuration.map_site || MAP_ROOT
    map_url = "#{map_site}/#{URI.escape(venue_configuration.map_url)}"
    map_url.gsub!('[', '%5B')
    map_url.gsub!(']', '%5D')
    uri = URI.parse(map_url)
    uri.path.gsub!(/\/\//, '/')
    uri.to_s
  end
end