4 marzo 2011

DISQUS data synchronization tips

I'm using DISQUS comments platform in my last project and I developed a .Net Windows service for synchronize the site's comments locally.

DISQUS exposes some useful API to accomplish my needs and I used the "forums/listPosts" call.

I'm getting started from this example on their site, so my service synchronizes all new comments every 10 minutes.


All seems to works fine but in my API request I must pay attention to fill these arguments:

- since: this is a Unix timestamp to catch comments from a specific date (in my case of the last saved comment) but it is referred to the EST time zone!
edit: from my latest tests I preferred to use a standard iso (yyyy-mm-ddThh24:mi:ss) datetime format instead of timestamp.

- order: the order by which the comments are extract... by default it's descending... I must set it to asc for the newest comments.