rackerlabs/python-clouddns — pull request #31 by calebgroom (2013-06-13 18:45:53+00:00)
Title: Add get_limits() and get_total_domain_count()

Credit to @rs-randallburt for this code. Example usage:

```python
>>> import clouddns
>>> import pprint
>>> pp = pprint.PrettyPrinter(indent=2)
>>> dns = clouddns.connection.Connection('myuser', 'myapikey')
>>> pp.pprint(dns.get_limits())
{ u'limits': { u'absolute': { u'domains': 500, u'records per domain': 500},
u'rate': [ { u'limit': [ { u'next-available': u'2013-06-13T18:42:01.194Z',
u'remaining': 5,
u'unit': u'SECOND',
u'value': 5,
u'verb': u'GET'}],
u'regex': u'.*/v\\d+\\.\\d+/(\\d+/status).*',
u'uri': u'*/status/*'},
{ u'limit': [ { u'next-available': u'2013-06-13T18:42:58.488Z',
u'remaining': 99,
u'unit': u'MINUTE',
u'value': 100,
u'verb': u'GET'},
{ u'next-available': u'2013-06-13T18:42:01.194Z',
u'remaining': 25,
u'unit': u'MINUTE',
u'value': 25,
u'verb': u'POST'},
{ u'next-available': u'2013-06-13T18:42:01.194Z',
u'remaining': 50,
u'unit': u'MINUTE',
u'value': 50,
u'verb': u'PUT'},
{ u'next-available': u'2013-06-13T18:42:01.194Z',
u'remaining': 50,
u'unit': u'MINUTE',
u'value': 50,
u'verb': u'DELETE'}],
u'regex': u'.*/v\\d+\\.\\d+/(\\d+/domains).*',
u'uri': u'*/domains*'}]}}
>>> dns.get_total_domain_count()
4
```