lib/gowalla/client.rb in gowalla-0.1.2 vs lib/gowalla/client.rb in gowalla-0.1.3
- old
+ new
@@ -19,15 +19,15 @@
def user(user_id=self.username)
mashup(self.class.get("/users/#{user_id}"))
end
def events(user_id=self.username)
- mashup(self.class.get("/users/#{user_id}/events")).events
+ mashup(self.class.get("/users/#{user_id}/events")).activity
end
def friends_events
- mashup(self.class.get("/visits/recent")).events
+ mashup(self.class.get("/visits/recent")).activity
end
def friend_requests(user_id=self.username)
mashup(self.class.get("/users/#{user_id}/friend_requests")).friends_needing_approval
end
@@ -38,10 +38,18 @@
def items(user_id=self.username)
mashup(self.class.get("/users/#{user_id}/items")).items
end
+ def missing_items(user_id=self.username)
+ mashup(self.class.get("/users/#{user_id}/items/missing")).items
+ end
+
+ def vaulted_items(user_id=self.username)
+ mashup(self.class.get("/users/#{user_id}/items/vault")).items
+ end
+
def item(id)
mashup(self.class.get("/items/#{id}"))
end
def pins(user_id=self.username)
@@ -51,11 +59,11 @@
def stamps(user_id=self.username, limit=20)
mashup(self.class.get("/users/#{user_id}/stamps", :query => {:limit => limit})).stamps
end
def top_spots(user_id=self.username)
- mashup(self.class.get("/users/#{user_id}/top_spots"))
+ mashup(self.class.get("/users/#{user_id}/top_spots")).top_spots
end
def visited_spots(user_id=self.username)
mashup(self.class.get("/users/#{user_id}/visited_spots"))
end
@@ -67,11 +75,11 @@
def spot(spot_id)
mashup(self.class.get("/spots/#{spot_id}"))
end
def spot_events(spot_id)
- mashup(self.class.get("/spots/#{spot_id}/events")).events
+ mashup(self.class.get("/spots/#{spot_id}/events")).activity
end
def spot_items(spot_id)
mashup(self.class.get("/spots/#{spot_id}/items")).items
end
@@ -92,10 +100,10 @@
def trips(options={})
if user_id = options.delete(:user_id)
options[:user_url] = "/users/#{user_id}"
end
query = format_geo_options(options)
- mashup(self.class.get("/trips", :query => query))
+ mashup(self.class.get("/trips", :query => query)).trips
end
def featured_trips(options={})
trips(options.merge(:context => 'featured'))
end
\ No newline at end of file