views:

371

answers:

3

I want to write a command line program to add a contact to GoogleMail. WWW::Contact::GoogleContact appears only to be able to get things from Google.

A: 

Have you looked at WWW:Mechanize?

asparagus
I assume you mean I pretend to be a web browser looking at googlemail web interface. I am a bit worried that the details of the interface might change,
justintime
That's not an unreasonable point. If you want a stable interface I guess you can only hope to either write one yourself (perhaps basing off WWW::Mechanize) or discuss with Google. The latter may or may not object on the grounds that you could be trying to write spam software.
asparagus
+3  A: 

I think you want the Google Data API instead. The Contacts API is read-only.

brian d foy
+1  A: 

I have just added loads more fields to the output of WWW::Contact::GoogleContactsAPI but, as Brian says, it's currently read-only. I will try to get this released soon then I will look at making it two-way.

Is anyone else using/working with this module? Want to alpha test my code?

This module is one subclass of a general Contacts class, though it's very minimalist as it stands. So, rather than just deliver the data in the form chosen by Google, I wanted to find a good "standard" data model. The best I found was http://www.opensocial.org/Technical-Resources/draft/Social-Data.xml#Person though it's probably rather too Facebook and not Outlook/Exchange enough. Anyone know a good contacts data model?

Denis Howe
In the end I gave up and tried to write the stuff I wanted to do in Python. But thanks for the comment
justintime