def google_get_client(md_user): credentials = Storage(DriveCredentials, 'id', md_user, 'credential').get() http = credentials.authorize(http=httplib2.Http()) return build('drive', 'v2', http=http)
def get_drive_client(self): credentials = Storage(DriveCredentials, 'id', self.md_user, 'credential').get() http = credentials.authorize(http=httplib2.Http()) return build('drive', 'v2', http=http)