Class: Camdram::Venue
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#college ⇒ Object
Returns the value of attribute college.
-
#description ⇒ Object
Returns the value of attribute description.
-
#facebook_id ⇒ Object
Returns the value of attribute facebook_id.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#name ⇒ Object
Returns the value of attribute name.
-
#short_name ⇒ Object
Returns the value of attribute short_name.
-
#slug ⇒ Object
Returns the value of attribute slug.
-
#twitter_id ⇒ Object
Returns the value of attribute twitter_id.
Attributes included from API
Attributes inherited from Base
Class Method Summary collapse
-
.url ⇒ String
Returns the URL stub assocaited with all venues.
Instance Method Summary collapse
-
#diary ⇒ Camdram::Diary
Gets a diary object which contains an array of upcoming calendar events for the venue.
-
#info ⇒ Hash
Return a hash of the venue's attributes.
-
#news ⇒ Array
Gets an array of the venue's news items.
-
#shows ⇒ Array
Gets an array of the venue's upcoming shows.
-
#url_slug ⇒ String
Returns the URL+slug of the venue.
Methods included from API
Methods inherited from Base
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def address @address end |
#college ⇒ Object
Returns the value of attribute college.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def college @college end |
#description ⇒ Object
Returns the value of attribute description.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def description @description end |
#facebook_id ⇒ Object
Returns the value of attribute facebook_id.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def facebook_id @facebook_id end |
#latitude ⇒ Object
Returns the value of attribute latitude.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def longitude @longitude end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def name @name end |
#short_name ⇒ Object
Returns the value of attribute short_name.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def short_name @short_name end |
#slug ⇒ Object
Returns the value of attribute slug.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def slug @slug end |
#twitter_id ⇒ Object
Returns the value of attribute twitter_id.
10 11 12 |
# File 'lib/camdram/venue.rb', line 10 def twitter_id @twitter_id end |
Class Method Details
.url ⇒ String
Returns the URL stub assocaited with all venues
68 69 70 |
# File 'lib/camdram/venue.rb', line 68 def self.url '/venues' end |
Instance Method Details
#diary ⇒ Camdram::Diary
Gets a diary object which contains an array of upcoming calendar events for the venue
52 53 54 55 56 |
# File 'lib/camdram/venue.rb', line 52 def diary() url = "#{self.class.url}/#{slug}/diary.json" response = get(url) Diary.new(response) end |
#info ⇒ Hash
Return a hash of the venue's attributes
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/camdram/venue.rb', line 15 def info { id: id, name: name, description: description, facebook_id: facebook_id, twitter_id: twitter_id, short_name: short_name, college: college, slug: slug, address: address, latitude: latitude, longitude: longitude, } end |
#news ⇒ Array
Gets an array of the venue's news items
34 35 36 37 38 |
# File 'lib/camdram/venue.rb', line 34 def news news_url = "#{self.class.url}/#{slug}/news.json" response = get(news_url) split_object( response, News ) end |
#shows ⇒ Array
Gets an array of the venue's upcoming shows
43 44 45 46 47 |
# File 'lib/camdram/venue.rb', line 43 def shows shows_url = "#{self.class.url}/#{slug}/shows.json" response = get(shows_url) split_object( response, Show ) end |
#url_slug ⇒ String
Returns the URL+slug of the venue
61 62 63 |
# File 'lib/camdram/venue.rb', line 61 def url_slug "#{self.class.url}/#{slug}.json" end |