lib/gowalla/client.rb in gowalla-0.1.3 vs lib/gowalla/client.rb in gowalla-0.1.4

- old
+ new

@@ -2,11 +2,11 @@ class Client include HTTParty format :json base_uri "http://api.gowalla.com" - headers({'Accept' => 'application/json, text/javascript, application/json', "User-Agent" => 'Ruby gem'}) + headers({'Accept' => 'application/json', "User-Agent" => 'Ruby gem'}) attr_reader :username def initialize(options={}) api_key = options[:api_key] || Gowalla.api_key @@ -117,9 +117,15 @@ mashup(self.class.get("/categories")).spot_categories end def category(id) mashup(self.class.get("/categories/#{id}")) + end + + def checkin(spot_id, options = {}) + query = format_geo_options(options) + + mashup(self.class.post("/checkins", :body => options, :query => { :spot_id => spot_id })) end private def format_geo_options(options={}) \ No newline at end of file