Class: Ticketutils::SeatingChart
- Defined in:
- lib/ticketutils/seating_chart.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#url ⇒ Object
Returns the value of attribute url.
-
#url_large ⇒ Object
Returns the value of attribute url_large.
-
#url_medium ⇒ Object
Returns the value of attribute url_medium.
-
#venue_id ⇒ Object
Returns the value of attribute venue_id.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
-
.find(options = {}) ⇒ Object
Ticketutils.seating_charts(options) => returns a will_paginate collection of seating charts options: page: defaults to 1 First page is 1, 100 results to the page per_page: defaults to 100 Paginate this many per page.
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def url @url end |
#url_large ⇒ Object
Returns the value of attribute url_large.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def url_large @url_large end |
#url_medium ⇒ Object
Returns the value of attribute url_medium.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def url_medium @url_medium end |
#venue_id ⇒ Object
Returns the value of attribute venue_id.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def venue_id @venue_id end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/ticketutils/seating_chart.rb', line 3 def version @version end |
Class Method Details
.find(options = {}) ⇒ Object
Ticketutils.seating_charts(options) => returns a will_paginate collection of seating charts options:
page: defaults to 1
First page is 1, 100 results to the page
per_page: defaults to 100
Paginate this many per page. Limit is 100.
updated: defaults to before the sevice was up
Only show venues updated since this date.
venue_id: Only tickets for a specific venue
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ticketutils/seating_chart.rb', line 14 def self.find( = {}) results = if [:venue_id] get("/#{Ticketutils.auth_token}/Charts/OfVenue/#{[:venue_id]}").parsed_response elsif [:updated] get("/#{Ticketutils.auth_token}/Charts/UpdatedSince/#{[:updated].strftime("%Y%m%d%H%M")}/#{[:page] || 1}").parsed_response else params = { :VenueId => [:venue_id], :page => [:page] || 1, :itemsPerPage => [:per_page] || 100, :updatedSince => [:updated] }.collect { |k, v| "#{k}=#{v}" unless v.nil? } get("/#{Ticketutils.auth_token}/Charts?#{params.join("&")}").parsed_response end return parse_response(results) end |