Class: Ticketutils::Venue

Inherits:
Base
  • Object
show all
Defined in:
lib/ticketutils/venue.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def city
  @city
end

#countryObject

Returns the value of attribute country.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def country
  @country
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def name
  @name
end

#seating_chartsObject

Returns the value of attribute seating_charts.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def seating_charts
  @seating_charts
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def state
  @state
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/ticketutils/venue.rb', line 3

def status
  @status
end

Class Method Details

.find(options = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/ticketutils/venue.rb', line 5

def self.find(options = {})
  results = if options[:updated]
    get("/#{Ticketutils.auth_token}/Venues/UpdatedSince/#{options[:updated].strftime("%Y%m%d%H%M")}/#{options[:page] || 1}").parsed_response
  else
    options = { :page => options[:page] || 1,
                :itemsPerPage => options[:per_page] || 100,
                :updatedSince => options[:updated] }.collect { |k, v| "#{k}=#{v}" unless v.nil? }
    results = get("/#{Ticketutils.auth_token}/Venues?#{options.join("&")}").parsed_response
  end
  return parse_response(results)
end