lib/fireeagle/client.rb in fireeagle-0.7.1.0 vs lib/fireeagle/client.rb in fireeagle-0.8.0.0

- old
+ new

@@ -112,11 +112,11 @@ def mobile_authorization_url raise FireEagle::ArgumentError, ":app_id required" if @app_id.nil? "#{FireEagle::MOBILE_AUTH_URL}#{@app_id}" end - # The URL the user must access to authorize this token. request_token must be called first. For use by web-based and desktop-based applications. + # The URL the user must access to authorize this token. get_request_token must be called first. For use by web-based and desktop-based applications. def authorization_url raise FireEagle::ArgumentError, "call #get_request_token first" if @request_token.nil? request_token.authorize_url end @@ -201,14 +201,14 @@ # Query for Users of an Application who have updated their Location recently. Returns a list of # Users for the Application with recently updated locations. # # == Optional parameters: # - # <tt>count</tt> Number of users to return per page. (default: 10) - # <tt>start</tt> The page number at which to start returning the list of users. Pages are 0-indexed, each page contains the per_page number of users. (default: 0) # <tt>time</tt> The time to start looking at recent updates from. Value is flexible, supported forms are 'now', 'yesterday', '12:00', '13:00', '1:00pm' and '2008-03-12 12:34:56'. (default: 'now') - def recent(count = 10, start = 0, time = 'now') + # <tt>count</tt> Number of users to return per page. (default: 10) + # <tt>start</tt> The page number at which to start returning the list of users. + def recent(time = 'now', count = 10, start = 1) raise FireEagle::ArgumentError, "OAuth Access Token Required" unless @access_token params = { :count => count, :start => start, :time => time } response = get(FireEagle::RECENT_API_PATH + ".#{format}", :params => params) FireEagle::Response.new(response.body).users end @@ -231,10 +231,10 @@ # Not yet supported: # # * <tt>upcoming_venue_id</tt> # * <tt>yahoo_local_id</tt> # * <tt>plazes_id</tt> - def within(location = {}, count = 10, start = 0) + def within(location = {}, count = 10, start = 1) raise FireEagle::ArgumentError, "OAuth Access Token Required" unless @access_token location = sanitize_location_hash(location) params = { :count => count, :start => start }.merge(location) response = get(FireEagle::WITHIN_API_PATH + ".#{format}", :params => params) FireEagle::Response.new(response.body).users