2 from lib.oauth7digital
import Oauth7digital
5 TOKEN_FILE =
'./access_token.pkl' 9 pkl_file = open(TOKEN_FILE,
'rb')
10 access_token = pickle.load(pkl_file)
15 print 'You have an access token: %s' % str(access_token.key)
17 auth = Oauth7digital(CONSUMER_KEY, CONSUMER_SECRET)
19 token = auth.request_token()
20 authorized = auth.authorize_request_token(token)
21 access_token = auth.request_access_token(token)
23 pkl_file=open(TOKEN_FILE,
'wb')
24 pickle.dump(access_token, pkl_file)
32 sevendigital = Oauth7digital(CONSUMER_KEY, CONSUMER_SECRET, access_token)
33 results = sevendigital.get_locker()
35 print "-----------------------------" 37 print i.release.artist.name
43 if __name__ ==
'__main__':