Search code examples
google-docs-apigoogle-drive-api

Finding max changestamp


I am using gdata-python-client. Is there a way to get max changestamp?

I built complete directory structure using gdata.docs.DocsClient.GetAllResources(). To poll for new changes, I would like to get the max changestamp.

Only way I could think right now is iteratively requesting multiple DocsClient.GetChanges(changestamp=i+100, max_results=100) - which is costly if I have thousands of changes.

thanks


Solution

  • You can call GetMetadata to retrieve information about the user and check the value of the docs:largestChangestamp element:

    https://developers.google.com/google-apps/documents-list/#getting_general_information_about_a_users_account