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

- old
+ new

@@ -2,11 +2,11 @@ class Client include HTTParty format :json base_uri "http://api.gowalla.com" - headers({'Accept' => 'application/json', "User-Agent" => 'Ruby gem'}) + headers({'Accept' => 'application/json, text/javascript, application/json', "User-Agent" => 'Ruby gem'}) attr_reader :username def initialize(options={}) api_key = options[:api_key] || Gowalla.api_key @@ -116,9 +116,12 @@ private def format_geo_options(options={}) options[:lat] = "+#{options[:lat]}" if options[:lat].to_i > 0 options[:lng] = "+#{options[:lng]}" if options[:lng].to_i > 0 + if options[:sw] && options[:ne] + options[:order] ||= "checkins_count desc" + end options end def mashup(response) case response.code \ No newline at end of file