Skip to content

Commit

Permalink
Update to handle google captcha better, thanks justintv. Bump to v1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Carlson committed Jan 26, 2010
1 parent b35adf3 commit 9fc0252
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README
Expand Up @@ -26,6 +26,12 @@ For a long time, the only way to get a list of contacts from your free online em

Notice there are three ways to use this library so that you can limit the use as much as you would like in your particular application. The Contacts.guess method will automatically concatenate all the address book contacts from each of the successful logins in the case that a username password works across multiple services.

== Captcha error

If there are too many failed attempts with the gmail login info, Google will raise a captcha response. To integrate the captcha handling, pass in the token and response via:

Contacts::Gmail.new(login, password, :captcha_token => params[:captcha_token], :captcha_response => params[:captcha_response]).contacts

== Examples

See the examples/ directory.
Expand All @@ -45,6 +51,7 @@ See the examples/ directory.
* Glenn Ford (mailto:glenn@glennfu.com) - http://www.glennfu.com/
* Leonardo Wong (mailto:mac@boy.name)
* Rusty Burchfield
* justintv

This library is released under the terms of the BSD.

2 changes: 1 addition & 1 deletion contacts.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "contacts"
s.version = "1.2.2"
s.version = "1.2.3"
s.date = "2010-01-20"
s.summary = "A universal interface to grab contact list information from various providers including Yahoo, AOL, Gmail, Hotmail, and Plaxo."
s.email = "lucas@rufy.com"
Expand Down
8 changes: 4 additions & 4 deletions lib/contacts/base.rb
Expand Up @@ -9,14 +9,14 @@

class Contacts
TYPES = {}
VERSION = "1.2.2"
VERSION = "1.2.3"

class Base
def initialize(login, password, captcha_token=nil, captcha_response=nil)
def initialize(login, password, options={})
@login = login
@password = password
@captcha_token = captcha_token
@captcha_response = captcha_response
@captcha_token = options[:captcha_token]
@captcha_response = options[:captcha_response]
@connections = {}
connect
end
Expand Down

0 comments on commit 9fc0252

Please sign in to comment.