def testcatalog(self):
     oauth.catalog(alternate_token='CATALOG TOKEN', dwollaparse='dict')
     oauth.r._get.assert_any_call('/catalog', {}, {
         'alternate_token': 'CATALOG TOKEN',
         'dwollaparse': 'dict'
     })
Exemple #2
0
#
# If you're feeling dangerous, feel free to simply use
# http://google.com and manually parse the parameters
# out yourself. The choice remains yours.

print(oauth.genauthurl("http://requestb.in/122rdhc1"))

# Step 2: The redirect should provide you with a `code`
# parameter. You will now exchange this code for an access
# and refresh token pair.

access_set = oauth.get("Z/KHDIyWO/LboIGn3wGGs1+sRWg=", "http://requestb.in/122rdhc1")
print(access_set)

# Step 2.5: If you wish, you can set the library's global
# access token parameter by doing the following...

constants.access_token = access_set['access_token']

# Step 3: Exchange your expiring refresh token for another
# access/refresh token pair.x

access_set = oauth.refresh(access_set['refresh_token'])
print(access_set)

# Step 4: Retrieve the catalog of endpoints that
# are available to the OAuth token which you just
# retrieved.

print(oauth.catalog())
Exemple #3
0
 def testcatalog(self):
     oauth.catalog(alternate_token='CATALOG TOKEN', dwollaparse='dict')
     oauth.r._get.assert_any_call('/catalog', {}, {'alternate_token':'CATALOG TOKEN', 'dwollaparse':'dict'})
 def testcatalog(self):
     oauth.catalog(alternate_token='CATALOG TOKEN')
     oauth.r._get.assert_any_call('/catalog', dwollaparse='dict', params={'oauth_token': 'CATALOG TOKEN'})