Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible chance to simplify the script and let Google do the heavy lifting (data merging) #102

Open
rowanthorpe opened this issue Mar 19, 2018 · 4 comments
Labels
enhancement Improvements to existing bits of code. question Open to discussion/feedback needed.

Comments

@rowanthorpe
Copy link
Collaborator

I noticed in the docs for the latest (3.0) API for Contacts at the top there is the following note:

Note: For read and write access to users' contacts, use the People API, which provides
both contact and profile information using JSON instead of the older GData protocol.

which links to the People API, which seems to be a merged datasource for contact info and profile data from various sources (I'm guessing primarily Google+). I haven't dived deeply into it (I am not registered for anything other than Contacts, and am hesitant to start registering for other things just to test this API). It would be nice if someone who already has access to Google+ etc wants to test whether this API is relevant and adds any value, or is just a red-herring...

@rowanthorpe rowanthorpe added enhancement Improvements to existing bits of code. question Open to discussion/feedback needed. labels Mar 19, 2018
@GioBonvi
Copy link
Owner

GioBonvi commented Mar 19, 2018 via email

@rowanthorpe
Copy link
Collaborator Author

Ah, OK. That sounds suspiciously like either a red herring, or a way-too-much-effort-for-too-little-return thingy. I'll leave it up to you when/if to close this then, based on how motivated you or anyone else feels.

@rowanthorpe
Copy link
Collaborator Author

...actually, on this page when you look at Google Contacts API it says "GData version is still live. Replaced by Google People API for read-only access." which seems to fit with the quote in my previous comment saying "use the People API ...using JSON instead of the older GData protocol.". It seems the way we are talking to Google Contacts has been deprecated either way, unless I am misreading it.

@GioBonvi
Copy link
Owner

I don't think our way has been deprecated, since we do not use the Google Contacts API directly, but the ContactsApp class (which I imagine uses the API behind the scenes).

The documentation is not exactly clear regarding this topic, but this is what I think I have understood:

  • there are a great number Google APIs which require some form of authentication to be used (API keys, OAuth...) making them unsuitable for us given the choices we have made for this project.
    In the last years some of these APIs have been transitioning from v1 to v2 and very recently v3 making important changes and bringing in new features (like the one you found out)
  • a small subset of these APIs are made accessible in Google Scripts via some special classes. These do not require any other form of authorization other than the "granting rights" step we all know.
    The complete list of these APIs can be found in the left side menu of this page: those labeled as "G Suite Services" are available in Google script with no setup, while those listed under "Advanced Google Services" needs to be enabled in the settings of the project like the Calendar and Google+ APIs we already use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing bits of code. question Open to discussion/feedback needed.
Projects
None yet
Development

No branches or pull requests

2 participants