Re: [contacts] Contacts API update

On Dec 15, 2009, at 22:16 , Suresh Chitturi wrote:
> - Contacts.create: an optional parameter that takes a 'seviceId' would
> be useful to create a contact on a per service basis. Otherwise, it is
> not possible to say if I want to create a new contact for a particular
> serviceId. Alternatively, this can be supplied at the time of adding to
> the address book.

After you've created a contact presumably you can set contact.serviceId = "foo". The interesting question is what happens if there is no such service, or if it's read-only.

> - Would renaming to "Contacts" to "Address Book" reflect better? Right
> now we have "Contact" and "Contacts" interfaces which can be easily
> mis-typed.

I don't think that that's a big issue (though I don't feel strongly about it). Note that neither have constructors so that they shouldn't get used in code.

> 5) 4.3 Contact Interface
> - rename 'commit' method to 'add' - it is more intuitive!

But it's not just for adding, it covers updating as well. Maybe save() to avoid the link to transactions that some people may think of?

> 7) 4.6 ContactNode
> - Unfortunately, the name of this interface doesn't give a hint of what
> it does. Perhaps renaming it to "ContactField" or similar is better to
> indicate that this object is representing a field within a contact?

+1

> 8) 4.7 ContactOptions
> - Rename this to "ContactSearchFilter" or similar.
> - The options provided in this interface seem to be fairly generic in
> nature and wondering if we could provide a generic search framework that
> can be used across all APIs (e.g. contacts, calendar, messaging, etc.)

Probably yes, but 1) it needs to be better specified before we do that, and 2) we can wait a little before we do some merging. One option to investigate is to look at the multiple existing DB specs that WebApps is progressing, and to use something from there if there happens to be something usable.

--
Robin Berjon
  robineko — hired gun, higher standards
  http://robineko.com/

Received on Wednesday, 16 December 2009 11:01:11 UTC