Class: Foursquare::Venue
- Inherits:
-
Object
- Object
- Foursquare::Venue
- Defined in:
- lib/foursquare/venue.rb
Instance Method Summary collapse
- #categories ⇒ Object
- #checkins_count ⇒ Object
- #contact ⇒ Object
- #id ⇒ Object
-
#initialize(foursquare, json) ⇒ Venue
constructor
A new instance of Venue.
- #location ⇒ Object
- #name ⇒ Object
- #photos(options = {:group => "checkin"}) ⇒ Object
- #todos_count ⇒ Object
- #users_count ⇒ Object
- #verified? ⇒ Boolean
Constructor Details
#initialize(foursquare, json) ⇒ Venue
Returns a new instance of Venue.
3 4 5 |
# File 'lib/foursquare/venue.rb', line 3 def initialize(foursquare, json) @foursquare, @json = foursquare, json end |
Instance Method Details
#categories ⇒ Object
23 24 25 |
# File 'lib/foursquare/venue.rb', line 23 def categories @json["categories"] end |
#checkins_count ⇒ Object
31 32 33 |
# File 'lib/foursquare/venue.rb', line 31 def checkins_count @json["stats"]["checkinsCount"] end |
#contact ⇒ Object
15 16 17 |
# File 'lib/foursquare/venue.rb', line 15 def contact @json["contact"] end |
#id ⇒ Object
7 8 9 |
# File 'lib/foursquare/venue.rb', line 7 def id @json["id"] end |
#location ⇒ Object
19 20 21 |
# File 'lib/foursquare/venue.rb', line 19 def location @json["location"] end |
#name ⇒ Object
11 12 13 |
# File 'lib/foursquare/venue.rb', line 11 def name @json["name"] end |
#photos(options = {:group => "checkin"}) ⇒ Object
43 44 45 46 47 |
# File 'lib/foursquare/venue.rb', line 43 def photos(={:group => "checkin"}) @foursquare.get("venues/#{id}/photos", )["photos"]["items"].map do |item| Foursquare::Photo.new(@foursquare, item) end end |
#todos_count ⇒ Object
39 40 41 |
# File 'lib/foursquare/venue.rb', line 39 def todos_count @json["todos"]["count"] end |
#users_count ⇒ Object
35 36 37 |
# File 'lib/foursquare/venue.rb', line 35 def users_count @json["stats"]["usersCount"] end |
#verified? ⇒ Boolean
27 28 29 |
# File 'lib/foursquare/venue.rb', line 27 def verified? @json["verified"] end |