admin_email isn't used; If it's going to be used I'd say:
`
if GC-Values{GC_ADMIN):
admin_email = GC_Values[GC_ADMIN]
else:
admin_email = raw_input(u'Please enter your admin email address: ')
`
'oauth2' isn't in API_VER_MAPPING so the remove fails. If it might go
back in but you don't want it here, say:
`
if u'oauth2' in apis:
apis.remove(u'oauth2')
`
This gets everything working but does not address the issue of matching
the admins actual scope list.
You'd better define GA_DOMAIN as it used to come out of oauth2.txt if
it wasn't defined.
I had to add Audit API and Site Verification API to the service account
list of APIs and downloaded a new oauth2service.json.
basic logic is:
-if 1 scope for API, use it
-skip over scopes ending in .readonly, .action or .verify_only UNLESS
all scopes are readonly, use all scopes (this is case with reports api)
-all other scopes are used by default.
showCalSettings had nested loop over user
doLabel cleaned up, has starting point for parsing arguments passed in
from main
doUpdateUser has starting point for parsing arguments passed in from
main
gam csv processing is optimized. All '~~xxx~~' and '~xxx' substitutions
are found for each argument and loaded into a dictionary once before
the loop. During the loop, the substitutions can be performed quickly.
Disable discovery cache as it broke CSV commands on windows with lock
errors. The cache is new in googleapiclient 1.4.2 which was upgraded
after GAM 3.61:
30125120b4
down the line, we should investigate actual issue with cache as enabling
it would improve GAM performance.