lib/gowalla/client.rb in gowalla-0.1.0 vs lib/gowalla/client.rb in gowalla-0.1.1

- old
+ new

@@ -11,11 +11,11 @@ def initialize(options={}) api_key = options[:api_key] || Gowalla.api_key @username = options[:username] || Gowalla.username password = options[:password] || Gowalla.password self.class.basic_auth(@username, password) unless @username.nil? - self.class.headers({'X-Gowalla-API-Key' => api_key }) + self.class.headers({'X-Gowalla-API-Key' => api_key }) unless api_key.nil? end def user(user_id=self.username) mashup(self.class.get("/users/#{user_id}")) end @@ -47,11 +47,11 @@ def pins(user_id=self.username) mashup(self.class.get("/users/#{user_id}/pins")) end def stamps(user_id=self.username, limit=20) - mashup(self.class.get("/users/#{user_id}/stamps", :query => {:limit => limit})) + 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")) end @@ -104,10 +104,10 @@ def friends_trips(options={}) trips(options.merge(:context => 'friends')) end def categories - mashup(self.class.get("/categories")) + mashup(self.class.get("/categories")).spot_categories end def category(id) mashup(self.class.get("/categories/#{id}")) end \ No newline at end of file