sync-engine icon indicating copy to clipboard operation
sync-engine copied to clipboard

Full read/write contacts API

Open ForbesLindesay opened this issue 11 years ago • 4 comments

I would like to be able to read and update all contact fields. At the moment it looks like you can only get name and e-mail. It also looks like you can't edit existing contacts.

ForbesLindesay avatar Oct 06 '14 15:10 ForbesLindesay

What specific fields?

The options are essentially limitless, which makes it hard to spec-out the API.

grinich avatar Oct 06 '14 21:10 grinich

I'm not entirely sure tbh. I want to build an app that supports contact management though, so it really needs everything that other major clients would support. At a minimum, Company, Job Title, Phone Number(s), Address(es), Notes and Photo.

ForbesLindesay avatar Oct 07 '14 09:10 ForbesLindesay

These sound reasonable, perhaps except for "Notes" which is just an open-ended text field?

The reason I ask is the vCard spec is so incredibly full-features, that it becomes super difficult to actually use it. We took a similar strategy for the message bodies, abstracting arbitrary MIME structure and only exposing a single HTML body object and normal decoded file IDs.

Our contacts API is currently for just mapping names to email addresses, which is the 99% use case here. For this rich contact management app, would you want Inbox to be the source of truth? There is a startup wasteland of apps who tried to reinvent contacts management and have failed, so I'm skeptical about adding the complexity at this stage.

grinich avatar Oct 07 '14 18:10 grinich

I don't think you'd want inbox to be the source of truth, but I do think you'd want to be able to sync as much info as possible with e-mail providers.

I like the idea of abstracting away much of the vCard spec. Why would notes be a particular problem though? It is just an open ended text field (much like the body of an e-mail).

On a somewhat unrelated note, it would be good to have access to the underlying vCard as a string. Even just abstracting away the "take an e-mail and a password and give me access to read and write vCards" would have lots of value, building a simple JavaScript library to parse/stringify vCard info would be fine, dealing with archaic network protocols is the bit that's hard work.

ForbesLindesay avatar Oct 08 '14 12:10 ForbesLindesay