Browse files

Add max_results option to Yahoo, as Gmail

  • Loading branch information...
1 parent 8cb0a75 commit 12a4f767aad87fd8d694a8d37899e33a69003fa0 @mkdynamic committed Sep 9, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/omnicontacts/importer/yahoo.rb
View
4 lib/omnicontacts/importer/yahoo.rb
@@ -14,6 +14,7 @@ def initialize *args
@auth_path = "/oauth/v2/request_auth"
@access_token_path = "/oauth/v2/get_token"
@contacts_host = "social.yahooapis.com"
+ @max_results = (args[3] && args[3][:max_results]) || 100 # use 'max' for all
end
def fetch_contacts_from_token_and_verifier auth_token, auth_token_secret, auth_verifier
@@ -34,7 +35,8 @@ def contacts_req_params access_token, access_token_secret, contacts_path
:oauth_timestamp => timestamp,
:oauth_token => access_token,
:oauth_version => OmniContacts::Authorization::OAuth1::OAUTH_VERSION,
- :view => "compact"
+ :view => "compact",
+ :count => @max_results
}
contacts_url = "http://#{@contacts_host}#{contacts_path}"
params["oauth_signature"] = oauth_signature("GET", contacts_url, params, access_token_secret)

0 comments on commit 12a4f76

Please sign in to comment.