Permalink
Browse files

update Contacts::Google docs

closes #1
  • Loading branch information...
1 parent 2b3f6a1 commit f33f242f39d1cb04bc2484de3c744a4d7414aeb4 @mislav committed Mar 19, 2010
Showing with 7 additions and 9 deletions.
  1. +5 −5 README.rdoc
  2. +2 −4 lib/contacts/google.rb
View
@@ -12,11 +12,11 @@ They will authenticate on Google and it will send them back to the URL
provided. Google will add a token GET parameter to the query part of the URL.
Use that token in the next step:
- gmail = Contacts::Google.new('example@gmail.com', params[:token])
- contacts = gmail.contacts
- #-> [ ['Fitzgerald', 'fubar@gmail.com', 'fubar@example.com'],
- ['William Paginate', 'will.paginate@gmail.com'], ...
- ]
+ gmail = Contacts::Google.new(params[:token])
+ gmail.contacts
+ # => [#<Contact 1>, #<Contact 2>, ...]
+
+The resulting Contacts::Contact objects have `name` and `email` properties.
Read more in Contacts::Google. I plan to support more APIs (Microsoft Live, for
starters); feel free to contribute.
View
@@ -21,10 +21,8 @@ module Contacts
# new instance of this class and request the contact list:
#
# gmail = Contacts::Google.new(params[:token])
- # contacts = gmail.contacts
- # #-> [ ['Fitzgerald', 'fubar@gmail.com', 'fubar@example.com'],
- # ['William Paginate', 'will.paginate@gmail.com'], ...
- # ]
+ # gmail.contacts
+ # # => [#<Contact 1>, #<Contact 2>, ...]
#
# == Storing a session token
#

0 comments on commit f33f242

Please sign in to comment.