MCPcopy
hub / github.com/csev/py4e / augment

Function augment

code/twurl.py:5–13  ·  view source on GitHub ↗
(url, parameters)

Source from the content-addressed store, hash-verified

3import hidden
4
5def augment(url, parameters) :
6 secrets = hidden.oauth()
7 consumer = oauth.OAuthConsumer(secrets['consumer_key'], secrets['consumer_secret'])
8 token = oauth.OAuthToken(secrets['token_key'],secrets['token_secret'])
9
10 oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer,
11 token=token, http_method='GET', http_url=url, parameters=parameters)
12 oauth_request.sign_request(oauth.OAuthSignatureMethod_HMAC_SHA1(), consumer, token)
13 return oauth_request.to_url()
14
15
16def test_me() :

Callers 2

twtest.pyFile · 0.90
test_meFunction · 0.70

Calls 3

sign_requestMethod · 0.45
to_urlMethod · 0.45

Tested by 1

test_meFunction · 0.56