Class: Mosaic::Foursquare::Checkin
- Defined in:
- lib/mosaic/foursquare/checkin.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#photos ⇒ Object
Returns the value of attribute photos.
-
#shout ⇒ Object
Returns the value of attribute shout.
-
#user ⇒ Object
Returns the value of attribute user.
-
#venue ⇒ Object
Returns the value of attribute venue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Checkin
constructor
A new instance of Checkin.
Methods inherited from Object
query, request_count, request_count=
Methods included from Utils::Helpers
Constructor Details
#initialize(attributes = {}) ⇒ Checkin
Returns a new instance of Checkin.
15 16 17 18 19 20 |
# File 'lib/mosaic/foursquare/checkin.rb', line 15 def initialize(attributes = {}) super self.photos &&= self.photos['items'].collect { |item| Mosaic::Foursquare::Photo.new(item) } self.user &&= Mosaic::Foursquare::User.new(self.user) self.venue &&= Mosaic::Foursquare::Venue.new(self.venue) end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/mosaic/foursquare/checkin.rb', line 6 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/mosaic/foursquare/checkin.rb', line 6 def id @id end |
#photos ⇒ Object
Returns the value of attribute photos.
6 7 8 |
# File 'lib/mosaic/foursquare/checkin.rb', line 6 def photos @photos end |
#shout ⇒ Object
Returns the value of attribute shout.
6 7 8 |
# File 'lib/mosaic/foursquare/checkin.rb', line 6 def shout @shout end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/mosaic/foursquare/checkin.rb', line 6 def user @user end |
#venue ⇒ Object
Returns the value of attribute venue.
6 7 8 |
# File 'lib/mosaic/foursquare/checkin.rb', line 6 def venue @venue end |
Class Method Details
.find(id, options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/mosaic/foursquare/checkin.rb', line 9 def find(id, = {}) response = query("/checkins/#{id}", ) self.new response['response']['checkin'] end |