Class: Gowalla::Spot
Instance Attribute Summary collapse
-
#activity_url ⇒ Object
Returns the value of attribute activity_url.
-
#address ⇒ Object
Returns the value of attribute address.
-
#bookmarks_url ⇒ Object
Returns the value of attribute bookmarks_url.
-
#checkins_count ⇒ Object
Returns the value of attribute checkins_count.
-
#checkins_url ⇒ Object
Returns the value of attribute checkins_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#description ⇒ Object
Returns the value of attribute description.
-
#facebook_url ⇒ Object
Returns the value of attribute facebook_url.
-
#founders ⇒ Object
Returns the value of attribute founders.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#items_count ⇒ Object
Returns the value of attribute items_count.
-
#items_url ⇒ Object
Returns the value of attribute items_url.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#list_image_url_320 ⇒ Object
Returns the value of attribute list_image_url_320.
-
#lng ⇒ Object
Returns the value of attribute lng.
-
#map_bounds ⇒ Object
Returns the value of attribute map_bounds.
-
#max_items_count ⇒ Object
Returns the value of attribute max_items_count.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#radius_meters ⇒ Object
Returns the value of attribute radius_meters.
-
#remove_bookmark_url ⇒ Object
Returns the value of attribute remove_bookmark_url.
-
#spot_categories ⇒ Object
Returns the value of attribute spot_categories.
-
#strict_radius ⇒ Object
Returns the value of attribute strict_radius.
-
#top_10 ⇒ Object
Returns the value of attribute top_10.
-
#trending_level ⇒ Object
Returns the value of attribute trending_level.
-
#twitter_username ⇒ Object
Returns the value of attribute twitter_username.
-
#url ⇒ Object
Returns the value of attribute url.
-
#users_count ⇒ Object
Returns the value of attribute users_count.
-
#websites ⇒ Object
Returns the value of attribute websites.
Class Method Summary collapse
Instance Method Summary collapse
- #events ⇒ Object
-
#initialize(data = {}) ⇒ Spot
constructor
A new instance of Spot.
Constructor Details
#initialize(data = {}) ⇒ Spot
Returns a new instance of Spot.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gowalla/spot.rb', line 5 def initialize(data={}) @name = data['name'] @address = Address.new(data['address']) if !data['address'].blank? @url = data['url'] @image_url = data['image_url'] @activity_url = data['activity_url'] @radius_meters = data['radius_meters'] @remove_bookmark_url = data['remove_bookmark_url'] @checkins_url = data['checkins_url'] @checkins_count = data['checkins_count'] @items_count = data['items_count'] @facebook_url = data['facebook_url'] @websites = data['websites'] @founders = data['founders'].map{|user| User.new(user)} unless data['founders'].blank? @created_at = data['created_at'] @description = data['description'] @bookmarks_url = data['bookmarks_url'] @max_items_count = data['max_items_count'] @trending_level = data['trending_level'] @lat = data['lat'] @lng = data['lng'] @users_count = data['users_count'] @twitter_username = data['twitter_username'] @creator = User.new(data['creator']) unless data['creator'].blank? @list_image_url_320 = data['list_image_url_320'] @items_url = data['items_url'] @spot_categories = data['spot_categories'].map{|c| Category.new(c)} unless data['spot_categories'].blank? @strict_radius = data['strict_radius'] @map_bounds = MapBound.new(data['map_bounds']) unless data['map_bounds'].blank? @phone_number = data['phone_number'] @top_10 = data['top_10'].map{|top_10| Top10.new(top_10)} unless data['top_10'].blank? end |
Instance Attribute Details
#activity_url ⇒ Object
Returns the value of attribute activity_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def activity_url @activity_url end |
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def address @address end |
#bookmarks_url ⇒ Object
Returns the value of attribute bookmarks_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def bookmarks_url @bookmarks_url end |
#checkins_count ⇒ Object
Returns the value of attribute checkins_count.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def checkins_count @checkins_count end |
#checkins_url ⇒ Object
Returns the value of attribute checkins_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def checkins_url @checkins_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def creator @creator end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def description @description end |
#facebook_url ⇒ Object
Returns the value of attribute facebook_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def facebook_url @facebook_url end |
#founders ⇒ Object
Returns the value of attribute founders.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def founders @founders end |
#image_url ⇒ Object
Returns the value of attribute image_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def image_url @image_url end |
#items_count ⇒ Object
Returns the value of attribute items_count.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def items_count @items_count end |
#items_url ⇒ Object
Returns the value of attribute items_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def items_url @items_url end |
#lat ⇒ Object
Returns the value of attribute lat.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def lat @lat end |
#list_image_url_320 ⇒ Object
Returns the value of attribute list_image_url_320.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def list_image_url_320 @list_image_url_320 end |
#lng ⇒ Object
Returns the value of attribute lng.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def lng @lng end |
#map_bounds ⇒ Object
Returns the value of attribute map_bounds.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def map_bounds @map_bounds end |
#max_items_count ⇒ Object
Returns the value of attribute max_items_count.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def max_items_count @max_items_count end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def name @name end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def phone_number @phone_number end |
#radius_meters ⇒ Object
Returns the value of attribute radius_meters.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def radius_meters @radius_meters end |
#remove_bookmark_url ⇒ Object
Returns the value of attribute remove_bookmark_url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def remove_bookmark_url @remove_bookmark_url end |
#spot_categories ⇒ Object
Returns the value of attribute spot_categories.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def spot_categories @spot_categories end |
#strict_radius ⇒ Object
Returns the value of attribute strict_radius.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def strict_radius @strict_radius end |
#top_10 ⇒ Object
Returns the value of attribute top_10.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def top_10 @top_10 end |
#trending_level ⇒ Object
Returns the value of attribute trending_level.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def trending_level @trending_level end |
#twitter_username ⇒ Object
Returns the value of attribute twitter_username.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def twitter_username @twitter_username end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def url @url end |
#users_count ⇒ Object
Returns the value of attribute users_count.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def users_count @users_count end |
#websites ⇒ Object
Returns the value of attribute websites.
3 4 5 |
# File 'lib/gowalla/spot.rb', line 3 def websites @websites end |