Class: Foursquare::Tip

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

Instance Method Summary collapse

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_atObject



15
16
17
# File 'lib/foursquare/tip.rb', line 15

def created_at
  @json["createdAt"]
end

#idObject



7
8
9
# File 'lib/foursquare/tip.rb', line 7

def id
  @json["id"]
end

#photoObject



23
24
25
# File 'lib/foursquare/tip.rb', line 23

def photo
  @json["photo"]
end

#statusObject



19
20
21
# File 'lib/foursquare/tip.rb', line 19

def status
  @json["status"]
end

#textObject



11
12
13
# File 'lib/foursquare/tip.rb', line 11

def text
  @json["text"]
end

#userObject



27
28
29
# File 'lib/foursquare/tip.rb', line 27

def user
  @json["user"] && Foursquare::User.new(@foursquare, @json["user"])
end

#venueObject



31
32
33
# File 'lib/foursquare/tip.rb', line 31

def venue
  @json["venue"] && Foursquare::Venue.new(@foursquare, @json["venue"])
end