문제

What is an efficient way to find recently updated Google contacts?

The obvious solution to retrieve all contacts with ContactsApp.getContacts() and iterate through all of them with getLastUpdated() doesn't seem particularly efficient and I am worried that such a code will exceed the time allowed if there are several thousand contacts.

Thanks.

도움이 되었습니까?

해결책

You cant with ContactsApp. You can use urlFetch and use the raw contacts v3 api. Use a query using updated-min, remember what your last updated-min was so you only get ghe ones updated since your last call. See the api and this: https://developers.google.com/google-apps/contacts/v3/reference#Parameters

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top