andzdroid/node-posterous — pull request #4 by benrhughes (2012-02-19 05:15:21+00:00)
Title: Handle Posterous API rate-limit automatically

I found out the hard way that Posterous rate-limits API calls to 1/sec. This change (although a bit naive) ensures that we don't exceed that. It should be completely backwards compatible - there's a new parameter on the constructor that turns the functionality on.

I also changed the JSON parse error handling, as r.error never seems to be set, and as a result 403s from Posterous were being swallowed.

I haven't run the rest suite as it seems to still be using the old auth method (ie not supplying an auth token).