I wrote two ways to retrieve avatars: the avatar URL as supplied by Google Contacts API, or the avatar itself.
In my case I opted to use the avatar url (which requires authentication), and so I send the access token along with the list of contacts.
Feel free to improve as you see fit. Cheers!
include profile pictures for returned contacts
Thanks for the pull request and sorry for the late reply.
I think I will opt for the first method, so including the url in the response object. I will therefore remove the commented code that fetches the image itself.
Quick question: why do you place access_token in the result object? If I choose to only include the url, can I just ignore access_token and token_type and not pass them as parameters in the parse_contacts method at all?
The latest version of OmniContacts support this feature. You can get the user's avatar url by accessing the profile_picture key for that specific contact.