Class: Ticketfly::Venue

Inherits:
Object
  • Object
show all
Defined in:
lib/ticketfly.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/ticketfly.rb', line 17

def id
  @id
end

#jsonObject

Returns the value of attribute json.



17
18
19
# File 'lib/ticketfly.rb', line 17

def json
  @json
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/ticketfly.rb', line 17

def name
  @name
end

Class Method Details

.build(json) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/ticketfly.rb', line 18

def self.build(json)
  venue = Venue.new
  venue.id = json['id']
  venue.name = json['name']
  venue.json = json
  venue
end

Instance Method Details

#eventsObject



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

def events
  Events.get_by_venue_id(self.id)
end

#next_eventObject



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

def next_event
  Events.get_next_by_venue_id(self.id)
end