Class: Foursquare::Tip
- Inherits:
-
Object
- Object
- Foursquare::Tip
- Defined in:
- lib/foursquare/tip.rb
Instance Method Summary collapse
- #created_at ⇒ Object
- #id ⇒ Object
-
#initialize(foursquare, json) ⇒ Tip
constructor
A new instance of Tip.
- #photo ⇒ Object
- #status ⇒ Object
- #text ⇒ Object
- #user ⇒ Object
- #venue ⇒ Object
Constructor Details
#initialize(foursquare, json) ⇒ Tip
Returns a new instance of Tip.
3 4 5 |
# File 'lib/foursquare/tip.rb', line 3 def initialize(foursquare, json) @foursquare, @json = foursquare, json end |
Instance Method Details
#created_at ⇒ Object
15 16 17 |
# File 'lib/foursquare/tip.rb', line 15 def created_at @json["createdAt"] end |
#id ⇒ Object
7 8 9 |
# File 'lib/foursquare/tip.rb', line 7 def id @json["id"] end |
#photo ⇒ Object
23 24 25 |
# File 'lib/foursquare/tip.rb', line 23 def photo @json["photo"] end |
#status ⇒ Object
19 20 21 |
# File 'lib/foursquare/tip.rb', line 19 def status @json["status"] end |
#text ⇒ Object
11 12 13 |
# File 'lib/foursquare/tip.rb', line 11 def text @json["text"] end |
#user ⇒ Object
27 28 29 |
# File 'lib/foursquare/tip.rb', line 27 def user @json["user"] && Foursquare::User.new(@foursquare, @json["user"]) end |
#venue ⇒ Object
31 32 33 |
# File 'lib/foursquare/tip.rb', line 31 def venue @json["venue"] && Foursquare::Venue.new(@foursquare, @json["venue"]) end |