'Create a new twitter API connector.
Pass an `auth` parameter to use the credentials of a specific
user. Generally you\'ll want to pass an `OAuth`
instance::
twitter = Twitter(auth=OAuth(
token, token_secret, consumer_key, consumer_secret))
`domain` lets you change the domain you are connecting. By
default it\'s `api.twitter.com`.
If `secure` is False you will connect with HTTP instead of
HTTPS.
`api_version` is used to set the base uri. By default it\'s
\'1.1\'.
If `retry` is True, API rate limits will automatically be
handled by waiting until the next reset, as indicated by
the X-Rate-Limit-Reset HTTP header. If retry is an integer,
it defines the number of retries attempted.'

def __init__(self, format=u'json', domain=u'api.twitter.com', secure=True, auth=None, api_version=_DEFAULT, retry=False):

    if (not auth):
        auth = NoAuth()
    if (format not in (u'json', u'xml', u'')):
        raise ValueError((u"Unknown    data    format    '%s'" % format))
    if (api_version is _DEFAULT):
        api_version = u'1.1'
    uriparts = ()
    if api_version:
        uriparts += (str(api_version),)
    TwitterCall.__init__(self, auth=auth, format=format, domain=domain, callable_cls=TwitterCall, secure=secure, uriparts=uriparts, retry=retry)
