Finish adding Storage to the OAuth 1.0 client and updated all examples to use file.Storage. No more three_legged_dance.py files anywhere.
diff --git a/samples/buzz/buzz.py b/samples/buzz/buzz.py
index cf3581b..769057e 100644
--- a/samples/buzz/buzz.py
+++ b/samples/buzz/buzz.py
@@ -18,7 +18,6 @@
from apiclient.oauth import CredentialsInvalidError
import httplib2
-import pickle
import pprint
# Uncomment the next line to get very detailed logging
@@ -26,7 +25,8 @@
def main():
- credentials = Storage('buzz.dat').get()
+ storage = Storage('buzz.dat')
+ credentials = storage.get()
if credentials is None or credentials.invalid == True:
buzz_discovery = build("buzz", "v1").auth_discovery()
@@ -38,7 +38,7 @@
scope='https://www.googleapis.com/auth/buzz',
xoauth_displayname='Google API Client Example App')
- credentials = run(flow, 'buzz.dat')
+ credentials = run(flow, storage)
http = httplib2.Http()
http = credentials.authorize(http)