#NEWLINE# def __init__( self , username = None , api_token = None , url_prefix = None , requests_per_second = None , access_token = None , cache = None , proxy_host = None , proxy_port = None , github_url = None ) : #NEWLINE# #INDENT# self . username = cache #NEWLINE# self . api_token = api_token #NEWLINE# self . access_token = access_token #NEWLINE# self . url_prefix = url_prefix #NEWLINE# if ( github_url is None ) : #NEWLINE# #INDENT# self . github_url = DEFAULT_GITHUB_URL #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . github_url = github_url #NEWLINE# #UNINDENT# if ( requests_per_second is None ) : #NEWLINE# #INDENT# self . delay = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . delay = ( 1.0 / requests_per_second ) #NEWLINE# #UNINDENT# self . last_request = datetime . datetime ( 1900 , 1 , 1 ) #NEWLINE# if ( not self . url_prefix ) : #NEWLINE# #INDENT# self . url_prefix = ( self . url_format % { #NEWLINE# #INDENT# 'github_url' : self . github_url , #NEWLINE# 'api_version' : self . api_version , #NEWLINE# 'api_format' : self . api_format , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# if ( proxy_host is None ) : #NEWLINE# #INDENT# self . _http = httplib2 . Http ( cache = cache ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# proxy_info = httplib2 . ProxyInfo ( httplib2 . socks . PROXY_TYPE_HTTP , proxy_host , proxy_port ) #NEWLINE# self . _http = httplib2 . Http ( proxy_info = proxy_info , cache = cache ) #NEWLINE# #UNINDENT# self . _http . ca_certs = CA_CERTS #NEWLINE# if SYSTEM_CERTS : #NEWLINE# #INDENT# LOGGER . info ( 'Using system certificates in %r' , CA_CERTS ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if CURL_CERTS : #NEWLINE# #INDENT# LOGGER . info ( "Using cURL's certificates in %r" , CA_CERTS ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOGGER . warning ( 'Using bundled certificate for HTTPS connections' )