#NEWLINE# def __two_legged_request( self , parameters = None , method = None ) : #NEWLINE# #INDENT# 'Sign a request for two-legged authentication' #NEWLINE# params = self . get_base_params ( ) #NEWLINE# if parameters : #NEWLINE# #INDENT# params . update ( parameters ) #NEWLINE# #UNINDENT# url = self . endpoint #NEWLINE# yql_logger . debug ( 'params: %s' , params ) #NEWLINE# yql_logger . debug ( 'endpoint_url: %s' , url ) #NEWLINE# if ( not method ) : #NEWLINE# #INDENT# method = 'GET' #NEWLINE# #UNINDENT# consumer = oauth . Consumer ( self . api_key , self . secret ) #NEWLINE# request = oauth . Request ( method = method , url = url , parameters = params ) #NEWLINE# sig = self . get_signature ( self ) #NEWLINE# yql_logger . debug ( 'signature: %s' , sig ) #NEWLINE# request . sign_request ( sig , consumer , None ) #NEWLINE# return request