def generate_oauth_params(self):
"""
Generates the oauth parameters needed for multipart/form requests
:returns: a dictionary of the proper headers that can be used
in the request
"""
params = {
'oauth_version': "1.0",
'oauth_nonce': oauth.generate_nonce(),
'oauth_timestamp': int(time.time()),
'oauth_token': self.token.key,
'oauth_consumer_key': self.consumer.key
}
return params
评论列表
文章目录