Skip to content

Instantly share code, notes, and snippets.

Created May 11, 2015 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/cb2e35dc3f330b957502 to your computer and use it in GitHub Desktop.
Save anonymous/cb2e35dc3f330b957502 to your computer and use it in GitHub Desktop.
lastUpdatedDate = DateTime.UtcNow;
urlTemplate = "htts://api.wildapricot.com/v2/accounts/NNN/contacts?$async=false&$filter='Profile last updated' gt '{0}'";
while(true)
{
// filter contacts which changed since last check
url = string.Format(urlTemplate, lastUpdatedDate);
// update last check timestamp
lastUpdatedDate = DateTime.UtcNow;
modifiedContacts = downloadFromApi(url);
// notify external service
foreach( contact in modifiedContacts )
{
notifyContactupdated( contact );
}
// wait 30 seconds
wait(30000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment