README.md in xeroizer-0.2.0 vs README.md in xeroizer-0.2.1
- old
+ new
@@ -463,6 +463,25 @@
when Xeroizer::Report::SummaryRow
# do something for summary rows
end
end
-
\ No newline at end of file
+
+Xero API Rate Limits
+--------------------
+
+The Xero API imposes the following limits on calls per organisation:
+
+* A limit of 60 API calls in any 60 second period
+* A limit of 1000 API calls in any 24 hour period
+
+By default, the library will raise a `Xeroizer::OAuth::RateLimitExceeded`
+exception when one of these limits is exceeded.
+
+If required, the library can handle these exceptions internally by sleeping
+for a configurable number of seconds and then repeating the last request.
+You can set this option when initializing an application:
+
+ # Sleep for 2 seconds every time the rate limit is exceeded.
+ client = Xeroizer::PublicApplication.new(YOUR_OAUTH_CONSUMER_KEY,
+ YOUR_OAUTH_CONSUMER_SECRET,
+ :rate_limit_sleep => 2)