Search code examples
google-apigoogle-calendar-apigoogle-contacts-apigoogle-api-python-client

Google contacts: is there a way to use services rather than gdata?


I'm updating an application that I did not wrote but that essentially need to pull data from both Google calendar and Google contacts.

The app is currently broken because the Calendar API used within the app has been recently deprecated and now Goole requires using the services infrastructure/library to access calendar data.

Cool. The new library is much nicer to work with.

However, I was unable to find a way to access contacts information from it. It just seems that there is no such an available service available, from the general list.

To the best of my research, it looks like the old library/infrastructure is still needed to talk to contacts...

But it just seem stupid to me that one app should have two totally different interfaces to access part of the same data structure. It strikes me as poor SW design, and I wonder if it is just me not being able to see the obvious solution that the Google engineers have baked for us.

So, the question boils down to: is there some way to access calendar and contacts from the same interface, rather than having complete separate code for the two?


Solution

  • The contacts API still uses the old format (GData), you will need to have two separate code. This should not be an issue if you create a layer on top of Google's libraries : just write contacts and calendar modules that hide all the implementation details (old or new API).

    One day or the other, Google will migrate the Contacts API to the new format, and at that point you'll be able to have only one module to change.