Created
May 11, 2015 15:30
-
-
Save anonymous/cb2e35dc3f330b957502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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