views:

25

answers:

1

Does Google have an API for registering hooks/callbacks for whenever a document is updated? That way, I could run a process on one of my servers every time a doc was updated.

If they don't have that, what the recommended way to accomplish that? Cron? Anything else?

A: 

Hi viatropos,

Unfortunately, there is no mechanism for having Google execute hooks against others' systems. However, in this case I recommend you use a cron to pull the documents list feed. To make your life easier, you should probably also use the updated-min query parameter with the feed. This way, you can run a cron every 5 minutes, and give an updated-min date of 6 minutes ago. The additional minute is to avoid race conditions, so you might see some overlap in what's returned after multiple runs of the cron.

An example:

# Assuming it's 10:55:00, you would make a request for 6 minutes ago
https://docs.google.com/feeds/default/private/full/?updated-min=2010-04-03T10:49:00-08:00

For more information, please see the Documents List Data API Reference Guide. Good luck!

vicfryzel