#NEWLINE# def get_request_token( self , oauth_callback = None ) : #NEWLINE# #INDENT# "Requests a new request token.\n\n        Updates this OAuthFlickrInterface object to use the request token\n        on the following authentication calls.\n\n        @param oauth_callback: the URL the user is sent to after granting the\n        token access.\n            If the callback is None, a local web server is started on a\n        random port, and the\n            callback will be http://localhost:randomport/\n\n            If you do not have a web-app and you also do not want to start a\n        local web server, pass oauth_callback='oob' and have your application\n        accept the verifier from the user instead.\n        " #NEWLINE# self . log . debug ( 'get_request_token(oauth_callback=%s):' , oauth_callback ) #NEWLINE# if ( oauth_callback is None ) : #NEWLINE# #INDENT# self . _start_http_server ( ) #NEWLINE# oauth_callback = self . auth_http_server . oauth_callback_url #NEWLINE# #UNINDENT# params = { #NEWLINE# #INDENT# 'oauth_callback' : request_token , #NEWLINE# #UNINDENT# } #NEWLINE# token_data = self . do_request ( self . REQUEST_TOKEN_URL , params ) #NEWLINE# self . log . debug ( 'Token data: %s' , token_data ) #NEWLINE# request_token = self . parse_oauth_response ( token_data ) #NEWLINE# self . log . debug ( 'Request token: %s' , request_token ) #NEWLINE# self . oauth . client . resource_owner_key = request_token [ 'oauth_token' ] #NEWLINE# secret = request_token [ 'oauth_token_secret' ] #NEWLINE# self . oauth . client . resource_owner_secret = secret