def build_consumer_oauth_request(backend, token, url, redirect_uri='/', oauth_verifier=None, extra_params=None, method=HTTP_METHOD):
 params = {'oauth_callback': redirect_uri}
 if extra_params:
  params.update(extra_params)
 if oauth_verifier:
  params['oauth_verifier'] = oauth_verifier
 consumer = OAuthConsumer(*backend.get_key_and_secret())
 request = OAuthRequest.from_consumer_and_token(consumer, token=token, http_method=method, http_url=url, parameters=params)
 request.sign_request(SignatureMethod_HMAC_SHA1(), consumer, token)
 return request

def build_consumer_oauth_request ( backend , token , url , redirect_uri = '/' , oauth_verifier = None , extra_params = None , method = HTTP_METHOD ) : params = { 'oauth_callback' : redirect_uri } if extra_params : params . update ( extra_params ) if oauth_verifier : params [ 'oauth_verifier' ] = oauth_verifier consumer = OAuthConsumer ( * backend . get_key_and_secret ( ) ) request = OAuthRequest . from_consumer_and_token ( consumer , token = token , http_method = method , http_url = url , parameters = params ) request . sign_request ( SignatureMethod_HMAC_SHA1 ( ) , consumer , token ) return request
builds a consumer oauth request .