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

Include contacts provider in contacts API

Open Eagles2F opened this issue 9 years ago • 8 comments

I've tested the contacts api with my own gmail account. The result is I got 5378 contacts from the sync engine, which number seems quite strange to me since I only have 160 gmail contacts.

There is no definition on the documentation explains what does the word "contacts" here mean. Can someone explain it to me? Apparently it is quite different from what I understood.

Eagles2F avatar May 07 '15 21:05 Eagles2F

Hi @Eagles2F. First of all, thanks for digging into the sync engine! :)

The "contacts" API endpoint is generated from your address book, but also emails that you have sent and received. (This is similar to Gmail's "other contacts" section in the web UI.)

Most developers want to use the contacts endpoint for typeahead autocompletion, and so we decided to provide a richer set of names+emails.

We should definitely refine this in our documentation to be more clear!

grinich avatar May 07 '15 22:05 grinich

@grinich Thanks. From my understanding, there needs further local classification(since there is no filter for this differentiation) between gmail contacts(which is small) and other contacts(which is huge). Is this correct?

Eagles2F avatar May 07 '15 22:05 Eagles2F

what do you mean "there needs further local classification" ?

grinich avatar May 07 '15 22:05 grinich

@grinich Sorry to be unclear, I'm trying to say after I get contacts from the API call, I don't have any information about the contact other than name and email. Under this circumstance, I need to use some local logic to figure out what kind of contact it is. Hope this could explain my idea more clear!

Eagles2F avatar May 08 '15 00:05 Eagles2F

Are you wanting to get only the contacts in the address book?

grinich avatar May 08 '15 23:05 grinich

@grinich , Yep, exactly.

Eagles2F avatar May 08 '15 23:05 Eagles2F

I also have this issue - no way to differentiate between retrieved contacts from address book vs email communication. Are there plans to include this? Thanks @grinich!

ubermensch avatar Jun 18 '15 14:06 ubermensch

We're planning a very significant update to the contacts API for the future. No ETA yet, but stay tuned. (The current API is very much the bare minimum basics.)

spang avatar Oct 27 '15 02:10 spang