File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,4 +426,6 @@ max-public-methods=50
426426overgeneral-exceptions =Exception
427427
428428# Python 2/3 compatibility
429- disable =useless-object-inheritance
429+ disable =useless-object-inheritance
430+
431+ redefining-builtins-modules =oauth2client # Allow oauth2client to redefine file
Original file line number Diff line number Diff line change 1818domain.
1919"""
2020from __future__ import print_function
21- from apiclient .discovery import build
21+ from googleapiclient .discovery import build
2222from httplib2 import Http
23- from oauth2client import file as oauth_file , client , tools
23+ from oauth2client import file , client , tools
2424
2525# Setup the Admin SDK Directory API
2626SCOPES = 'https://www.googleapis.com/auth/admin.directory.user'
27- store = oauth_file .Storage ('token.json' )
27+ store = file .Storage ('token.json' )
2828creds = store .get ()
2929if not creds or creds .invalid :
3030 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 1818events.
1919"""
2020from __future__ import print_function
21- from apiclient .discovery import build
21+ from googleapiclient .discovery import build
2222from httplib2 import Http
23- from oauth2client import file as oauth_file , client , tools
23+ from oauth2client import file , client , tools
2424
2525# Setup the Admin SDK Reports API
2626SCOPES = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
27- store = oauth_file .Storage ('token.json' )
27+ store = file .Storage ('token.json' )
2828creds = store .get ()
2929if not creds or creds .invalid :
3030 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 1818events.
1919"""
2020from __future__ import print_function
21- from apiclient .discovery import build
21+ from googleapiclient .discovery import build
2222from httplib2 import Http
23- from oauth2client import file as oauth_file , client , tools
23+ from oauth2client import file , client , tools
2424
2525# Setup the Admin SDK Reports API
2626SCOPES = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
27- store = oauth_file .Storage ('token.json' )
27+ store = file .Storage ('token.json' )
2828creds = store .get ()
2929if not creds or creds .invalid :
3030 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 2020"""
2121from __future__ import print_function
2222from apiclient import errors
23- from apiclient .discovery import build
23+ from googleapiclient .discovery import build
2424from httplib2 import Http
25- from oauth2client import file as oauthfile , client , tools
25+ from oauth2client import file , client , tools
2626
2727# Setup the Apps Script API
2828SCOPES = 'https://www.googleapis.com/auth/script.projects'
29- store = oauthfile .Storage ('token.json' )
29+ store = file .Storage ('token.json' )
3030creds = store .get ()
3131if not creds or creds .invalid :
3232 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 1919"""
2020from __future__ import print_function
2121import datetime
22- from apiclient .discovery import build
22+ from googleapiclient .discovery import build
2323from httplib2 import Http
24- from oauth2client import file as oauth_file , client , tools
24+ from oauth2client import file , client , tools
2525
2626# Setup the Calendar API
2727SCOPES = 'https://www.googleapis.com/auth/calendar.readonly'
28- store = oauth_file .Storage ('token.json' )
28+ store = file .Storage ('token.json' )
2929creds = store .get ()
3030if not creds or creds .invalid :
3131 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 202010 courses the user has access to.
2121"""
2222from __future__ import print_function
23- from apiclient .discovery import build
23+ from googleapiclient .discovery import build
2424from httplib2 import Http
25- from oauth2client import file as oauth_file , client , tools
25+ from oauth2client import file , client , tools
2626
2727# Setup the Classroom API
2828SCOPES = 'https://www.googleapis.com/auth/classroom.courses.readonly'
29- store = oauth_file .Storage ('token.json' )
29+ store = file .Storage ('token.json' )
3030creds = store .get ()
3131if not creds or creds .invalid :
3232 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 1515# [START drive_activity_quickstart]
1616from __future__ import print_function
1717import datetime
18- from apiclient .discovery import build
18+ from googleapiclient .discovery import build
1919from httplib2 import Http
20- from oauth2client import file as oauth_file , client , tools
20+ from oauth2client import file , client , tools
2121
2222# Setup the Drive Activity API
2323SCOPES = [
2424 'https://www.googleapis.com/auth/activity' ,
2525 'https://www.googleapis.com/auth/drive.metadata.readonly'
2626]
27- store = oauth_file .Storage ('token.json' )
27+ store = file .Storage ('token.json' )
2828creds = store .get ()
2929if not creds or creds .invalid :
3030 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 2020the user has access to.
2121"""
2222from __future__ import print_function
23- from apiclient .discovery import build
23+ from googleapiclient .discovery import build
2424from httplib2 import Http
25- from oauth2client import file as oauth_file , client , tools
25+ from oauth2client import file , client , tools
2626
2727# Setup the Drive v3 API
2828SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly'
29- store = oauth_file .Storage ('token.json' )
29+ store = file .Storage ('token.json' )
3030creds = store .get ()
3131if not creds or creds .invalid :
3232 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
Original file line number Diff line number Diff line change 1919Lists the user's Gmail labels.
2020"""
2121from __future__ import print_function
22- from apiclient .discovery import build
22+ from googleapiclient .discovery import build
2323from httplib2 import Http
24- from oauth2client import file as oauth_file , client , tools
24+ from oauth2client import file , client , tools
2525
2626# Setup the Gmail API
2727SCOPES = 'https://www.googleapis.com/auth/gmail.readonly'
28- store = oauth_file .Storage ('token.json' )
28+ store = file .Storage ('token.json' )
2929creds = store .get ()
3030if not creds or creds .invalid :
3131 flow = client .flow_from_clientsecrets ('credentials.json' , SCOPES )
You can’t perform that action at this time.
0 commit comments