gam7 7.6.11__py3-none-any.whl → 7.6.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gam7 might be problematic. Click here for more details.
- gam/__init__.py +12 -50
- gam/gamlib/glapi.py +0 -7
- gam/gamlib/glclargs.py +0 -2
- gam/gamlib/glentity.py +0 -2
- {gam7-7.6.11.dist-info → gam7-7.6.12.dist-info}/METADATA +1 -1
- {gam7-7.6.11.dist-info → gam7-7.6.12.dist-info}/RECORD +9 -9
- {gam7-7.6.11.dist-info → gam7-7.6.12.dist-info}/WHEEL +0 -0
- {gam7-7.6.11.dist-info → gam7-7.6.12.dist-info}/entry_points.txt +0 -0
- {gam7-7.6.11.dist-info → gam7-7.6.12.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
|
28
|
-
__version__ = '7.06.
|
|
28
|
+
__version__ = '7.06.12'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -9377,7 +9377,7 @@ def doCheckConnection():
|
|
|
9377
9377
|
flushStdout()
|
|
9378
9378
|
if dns_err:
|
|
9379
9379
|
writeStdout(dns_err)
|
|
9380
|
-
return
|
|
9380
|
+
return
|
|
9381
9381
|
gen_firewall = 'You probably have security software or a firewall on your machine or network that is preventing GAM from making Internet connections. Check your network configuration or try running GAM on a hotspot or home network to see if the problem exists only on your organization\'s network.'
|
|
9382
9382
|
try:
|
|
9383
9383
|
if host.startswith('http'):
|
|
@@ -9430,11 +9430,11 @@ def doCheckConnection():
|
|
|
9430
9430
|
disc_hosts = []
|
|
9431
9431
|
for api, config in API._INFO.items():
|
|
9432
9432
|
if config.get('v2discovery') and not config.get('localdiscovery'):
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9433
|
+
if mapped_api := config.get('mappedAPI'):
|
|
9434
|
+
api = mapped_api
|
|
9435
|
+
host = f'{api}.googleapis.com'
|
|
9436
|
+
if host not in disc_hosts:
|
|
9437
|
+
disc_hosts.append(host)
|
|
9438
9438
|
for host in disc_hosts:
|
|
9439
9439
|
check_host(host)
|
|
9440
9440
|
checked_hosts = initial_hosts + api_hosts + disc_hosts
|
|
@@ -9450,7 +9450,7 @@ def doCheckConnection():
|
|
|
9450
9450
|
parsed_base_url = urlparse(base_url)
|
|
9451
9451
|
base_host = parsed_base_url.netloc
|
|
9452
9452
|
if base_host not in checked_hosts:
|
|
9453
|
-
|
|
9453
|
+
writeStdout(f'Checking {base_host} for {api}\n')
|
|
9454
9454
|
check_host(base_host)
|
|
9455
9455
|
checked_hosts.append(base_host)
|
|
9456
9456
|
if success_count == try_count:
|
|
@@ -15804,27 +15804,13 @@ ANALYTIC_ENTITY_MAP = {
|
|
|
15804
15804
|
'pageSize': 50,
|
|
15805
15805
|
'maxPageSize': 200,
|
|
15806
15806
|
},
|
|
15807
|
-
Ent.ANALYTIC_UA_PROPERTY:
|
|
15808
|
-
{'titles': ['User', 'accountId', 'name', 'id', 'created', 'updated'],
|
|
15809
|
-
'JSONtitles': ['User', 'accountId', 'name', 'id', 'JSON'],
|
|
15810
|
-
'timeObjects': ['created', 'updated'],
|
|
15811
|
-
'items': 'items',
|
|
15812
|
-
'pageSize': 50,
|
|
15813
|
-
'maxPageSize': 200,
|
|
15814
|
-
},
|
|
15815
15807
|
}
|
|
15816
15808
|
|
|
15817
15809
|
def printShowAnalyticItems(users, entityType):
|
|
15818
15810
|
analyticEntityMap = ANALYTIC_ENTITY_MAP[entityType]
|
|
15819
15811
|
csvPF = CSVPrintFile(analyticEntityMap['titles'], 'sortall') if Act.csvFormat() else None
|
|
15820
15812
|
FJQC = FormatJSONQuoteChar(csvPF)
|
|
15821
|
-
|
|
15822
|
-
kwargs = {'pageSize': analyticEntityMap['pageSize']}
|
|
15823
|
-
api = API.ANALYTICS_ADMIN
|
|
15824
|
-
else:
|
|
15825
|
-
# kwargs = {'webPropertyId': '~all'}
|
|
15826
|
-
kwargs = {}
|
|
15827
|
-
api = API.ANALYTICS
|
|
15813
|
+
kwargs = {'pageSize': analyticEntityMap['pageSize']}
|
|
15828
15814
|
if entityType in {Ent.ANALYTIC_ACCOUNT, Ent.ANALYTIC_PROPERTY}:
|
|
15829
15815
|
kwargs['showDeleted'] = False
|
|
15830
15816
|
while Cmd.ArgumentsRemaining():
|
|
@@ -15837,16 +15823,12 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15837
15823
|
kwargs['showDeleted'] = getBoolean()
|
|
15838
15824
|
elif entityType == Ent.ANALYTIC_PROPERTY and myarg == 'filter':
|
|
15839
15825
|
kwargs['filter'] = getString(Cmd.OB_STRING)
|
|
15840
|
-
elif entityType == Ent.ANALYTIC_UA_PROPERTY and myarg == 'accountid':
|
|
15841
|
-
kwargs['accountId'] = getString(Cmd.OB_STRING).replace('accounts/', '')
|
|
15842
15826
|
elif entityType == Ent.ANALYTIC_DATASTREAM and myarg == 'parent':
|
|
15843
15827
|
kwargs['parent'] = getString(Cmd.OB_STRING)
|
|
15844
15828
|
else:
|
|
15845
15829
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
15846
15830
|
if entityType == Ent.ANALYTIC_PROPERTY and 'filter' not in kwargs:
|
|
15847
15831
|
missingArgumentExit('filter')
|
|
15848
|
-
if entityType == Ent.ANALYTIC_UA_PROPERTY and 'accountId' not in kwargs:
|
|
15849
|
-
missingArgumentExit('accountid')
|
|
15850
15832
|
if entityType == Ent.ANALYTIC_DATASTREAM and 'parent' not in kwargs:
|
|
15851
15833
|
missingArgumentExit('parent')
|
|
15852
15834
|
if csvPF and FJQC.formatJSON:
|
|
@@ -15854,7 +15836,7 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15854
15836
|
i, count, users = getEntityArgument(users)
|
|
15855
15837
|
for user in users:
|
|
15856
15838
|
i += 1
|
|
15857
|
-
user, analytics = buildGAPIServiceObject(
|
|
15839
|
+
user, analytics = buildGAPIServiceObject(API.ANALYTICS_ADMIN, user, i, count)
|
|
15858
15840
|
if not analytics:
|
|
15859
15841
|
continue
|
|
15860
15842
|
if entityType == Ent.ANALYTIC_ACCOUNT:
|
|
@@ -15863,11 +15845,8 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15863
15845
|
service = analytics.accountSummaries()
|
|
15864
15846
|
elif entityType == Ent.ANALYTIC_DATASTREAM:
|
|
15865
15847
|
service = analytics.properties().dataStreams()
|
|
15866
|
-
|
|
15848
|
+
else: # entityType == Ent.ANALYTIC_PROPERTY:
|
|
15867
15849
|
service = analytics.properties()
|
|
15868
|
-
else: #Ent.ANALYTIC_UA_PROPERTY:
|
|
15869
|
-
service = analytics.management().webproperties()
|
|
15870
|
-
# service = analytics.management().profiles()
|
|
15871
15850
|
if csvPF:
|
|
15872
15851
|
printGettingAllEntityItemsForWhom(entityType, user, i, count)
|
|
15873
15852
|
pageMessage = getPageMessageForWhom()
|
|
@@ -15908,10 +15887,7 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15908
15887
|
if not FJQC.formatJSON:
|
|
15909
15888
|
csvPF.WriteRowTitles(row)
|
|
15910
15889
|
elif csvPF.CheckRowTitles(row):
|
|
15911
|
-
|
|
15912
|
-
row = {'User': user, 'name': item['name'], 'displayName': item['displayName']}
|
|
15913
|
-
else:
|
|
15914
|
-
row = {'User': user, 'accountId': item['accountId'], 'id': item['id'], 'name': item['name']}
|
|
15890
|
+
row = {'User': user, 'name': item['name'], 'displayName': item['displayName']}
|
|
15915
15891
|
for field in analyticEntityMap['JSONtitles'][2:-1]:
|
|
15916
15892
|
row[field] = item[field]
|
|
15917
15893
|
row['JSON'] = json.dumps(cleanJSON(item, timeObjects=analyticEntityMap['timeObjects']),
|
|
@@ -15949,17 +15925,6 @@ def printShowAnalyticAccountSummaries(users):
|
|
|
15949
15925
|
def printShowAnalyticProperties(users):
|
|
15950
15926
|
printShowAnalyticItems(users, Ent.ANALYTIC_PROPERTY)
|
|
15951
15927
|
|
|
15952
|
-
# gam <UserTypeEntity> print analyticuaproperties [todrive <ToDriveAttribute>*]
|
|
15953
|
-
# accountid [accounts/]<String>
|
|
15954
|
-
# [maxresults <Integer>]
|
|
15955
|
-
# [formatjson [quotechar <Character>]]
|
|
15956
|
-
# gam <UserTypeEntity> show analyticuaproperties
|
|
15957
|
-
# accountid [accounts/]<String>
|
|
15958
|
-
# [maxresults <Integer>]
|
|
15959
|
-
# [formatjson]
|
|
15960
|
-
def printShowAnalyticUAProperties(users):
|
|
15961
|
-
printShowAnalyticItems(users, Ent.ANALYTIC_UA_PROPERTY)
|
|
15962
|
-
|
|
15963
15928
|
# gam <UserTypeEntity> print analyticdatastreams [todrive <ToDriveAttribute>*]
|
|
15964
15929
|
# parent <String>
|
|
15965
15930
|
# [maxresults <Integer>]
|
|
@@ -76716,7 +76681,6 @@ USER_COMMANDS_WITH_OBJECTS = {
|
|
|
76716
76681
|
Cmd.ARG_ANALYTICACCOUNTSUMMARY: printShowAnalyticAccountSummaries,
|
|
76717
76682
|
Cmd.ARG_ANALYTICDATASTREAM: printShowAnalyticDatastreams,
|
|
76718
76683
|
Cmd.ARG_ANALYTICPROPERTY: printShowAnalyticProperties,
|
|
76719
|
-
Cmd.ARG_ANALYTICUAPROPERTY: printShowAnalyticUAProperties,
|
|
76720
76684
|
Cmd.ARG_ASP: printShowASPs,
|
|
76721
76685
|
Cmd.ARG_BACKUPCODE: printShowBackupCodes,
|
|
76722
76686
|
Cmd.ARG_CALENDAR: printShowCalendars,
|
|
@@ -76823,7 +76787,6 @@ USER_COMMANDS_WITH_OBJECTS = {
|
|
|
76823
76787
|
Cmd.ARG_ANALYTICACCOUNTSUMMARY: printShowAnalyticAccountSummaries,
|
|
76824
76788
|
Cmd.ARG_ANALYTICDATASTREAM: printShowAnalyticDatastreams,
|
|
76825
76789
|
Cmd.ARG_ANALYTICPROPERTY: printShowAnalyticProperties,
|
|
76826
|
-
Cmd.ARG_ANALYTICUAPROPERTY: printShowAnalyticUAProperties,
|
|
76827
76790
|
Cmd.ARG_ASP: printShowASPs,
|
|
76828
76791
|
Cmd.ARG_BACKUPCODE: printShowBackupCodes,
|
|
76829
76792
|
Cmd.ARG_CALENDAR: printShowCalendars,
|
|
@@ -77036,7 +76999,6 @@ USER_COMMANDS_OBJ_ALIASES = {
|
|
|
77036
76999
|
Cmd.ARG_ANALYTICACCOUNTSUMMARIES: Cmd.ARG_ANALYTICACCOUNTSUMMARY,
|
|
77037
77000
|
Cmd.ARG_ANALYTICDATASTREAMS: Cmd.ARG_ANALYTICDATASTREAM,
|
|
77038
77001
|
Cmd.ARG_ANALYTICPROPERTIES: Cmd.ARG_ANALYTICPROPERTY,
|
|
77039
|
-
Cmd.ARG_ANALYTICUAPROPERTIES: Cmd.ARG_ANALYTICUAPROPERTY,
|
|
77040
77002
|
Cmd.ARG_ASPS: Cmd.ARG_ASP,
|
|
77041
77003
|
Cmd.ARG_BACKUPCODES: Cmd.ARG_BACKUPCODE,
|
|
77042
77004
|
Cmd.ARG_CALENDARS: Cmd.ARG_CALENDAR,
|
gam/gamlib/glapi.py
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
# APIs
|
|
23
23
|
ACCESSCONTEXTMANAGER = 'accesscontextmanager'
|
|
24
24
|
ALERTCENTER = 'alertcenter'
|
|
25
|
-
ANALYTICS = 'analytics'
|
|
26
25
|
ANALYTICS_ADMIN = 'analyticsadmin'
|
|
27
26
|
CALENDAR = 'calendar'
|
|
28
27
|
CBCM = 'cbcm'
|
|
@@ -162,7 +161,6 @@ PROJECT_APIS = [
|
|
|
162
161
|
'accesscontextmanager.googleapis.com',
|
|
163
162
|
'admin.googleapis.com',
|
|
164
163
|
'alertcenter.googleapis.com',
|
|
165
|
-
'analytics.googleapis.com',
|
|
166
164
|
'analyticsadmin.googleapis.com',
|
|
167
165
|
# 'audit.googleapis.com',
|
|
168
166
|
'calendar-json.googleapis.com',
|
|
@@ -201,7 +199,6 @@ PROJECT_APIS = [
|
|
|
201
199
|
_INFO = {
|
|
202
200
|
ACCESSCONTEXTMANAGER: {'name': 'Access Context Manager API', 'version': 'v1', 'v2discovery': True},
|
|
203
201
|
ALERTCENTER: {'name': 'AlertCenter API', 'version': 'v1beta1', 'v2discovery': True},
|
|
204
|
-
ANALYTICS: {'name': 'Analytics API', 'version': 'v3', 'v2discovery': False},
|
|
205
202
|
ANALYTICS_ADMIN: {'name': 'Analytics Admin API', 'version': 'v1beta', 'v2discovery': True},
|
|
206
203
|
CALENDAR: {'name': 'Calendar API', 'version': 'v3', 'v2discovery': True, 'mappedAPI': 'calendar-json'},
|
|
207
204
|
CBCM: {'name': 'Chrome Browser Cloud Management API', 'version': 'v1.1beta1', 'v2discovery': True, 'localjson': True},
|
|
@@ -532,10 +529,6 @@ _SVCACCT_SCOPES = [
|
|
|
532
529
|
'api': ALERTCENTER,
|
|
533
530
|
'subscopes': [],
|
|
534
531
|
'scope': 'https://www.googleapis.com/auth/apps.alerts'},
|
|
535
|
-
{'name': 'Analytics API - read only',
|
|
536
|
-
'api': ANALYTICS,
|
|
537
|
-
'subscopes': [],
|
|
538
|
-
'scope': 'https://www.googleapis.com/auth/analytics.readonly'},
|
|
539
532
|
{'name': 'Analytics Admin API - read only',
|
|
540
533
|
'api': ANALYTICS_ADMIN,
|
|
541
534
|
'subscopes': [],
|
gam/gamlib/glclargs.py
CHANGED
|
@@ -423,8 +423,6 @@ class GamCLArgs():
|
|
|
423
423
|
ARG_ANALYTICDATASTREAMS = 'analyticdatastreams'
|
|
424
424
|
ARG_ANALYTICPROPERTY = 'analyticproperty'
|
|
425
425
|
ARG_ANALYTICPROPERTIES = 'analyticproperties'
|
|
426
|
-
ARG_ANALYTICUAPROPERTY = 'analyticuaproperty'
|
|
427
|
-
ARG_ANALYTICUAPROPERTIES = 'analyticuaproperties'
|
|
428
426
|
ARG_API = 'api'
|
|
429
427
|
ARG_APIS = 'apis'
|
|
430
428
|
ARG_APIPROJECT = 'apiproject'
|
gam/gamlib/glentity.py
CHANGED
|
@@ -61,7 +61,6 @@ class GamEntity():
|
|
|
61
61
|
ANALYTIC_ACCOUNT_SUMMARY = 'anas'
|
|
62
62
|
ANALYTIC_DATASTREAM = 'anad'
|
|
63
63
|
ANALYTIC_PROPERTY = 'anap'
|
|
64
|
-
ANALYTIC_UA_PROPERTY = 'anau'
|
|
65
64
|
API = 'api '
|
|
66
65
|
APP_ACCESS_SETTINGS = 'apps'
|
|
67
66
|
APP_ID = 'appi'
|
|
@@ -412,7 +411,6 @@ class GamEntity():
|
|
|
412
411
|
ANALYTIC_ACCOUNT_SUMMARY: ['Analytic Account Summaries', 'Analytic Account Summary'],
|
|
413
412
|
ANALYTIC_DATASTREAM: ['Analytic Datastreams', 'Analytic Datastream'],
|
|
414
413
|
ANALYTIC_PROPERTY: ['Analytic GA4 Properties', 'Analytic GA4 Property'],
|
|
415
|
-
ANALYTIC_UA_PROPERTY: ['Analytic UA Properties', 'Analytic UA Property'],
|
|
416
414
|
API: ['APIs', 'API'],
|
|
417
415
|
APP_ACCESS_SETTINGS: ['Application Access Settings', 'Application Access Settings'],
|
|
418
416
|
APP_ID: ['Application IDs', 'Application ID'],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=s4okaQ_92Eml4EHKJJxlbpYggCz8UK750Ds-_gZxk38,3492639
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=nJuWha0xm5dHw_5ptGphwRoO-r36Ccpqiww9pCEDbSc,67484
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -23,10 +23,10 @@ gam/atom/token_store.py,sha256=7E6Ecvxa86WCvl1pJAhv78jg9OxQv8pMtIUcPhZCq04,3803
|
|
|
23
23
|
gam/atom/url.py,sha256=pxO1TlORxyKQTQ1bkBE1unFzjnv9c8LjJkm-UEORShY,4276
|
|
24
24
|
gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
|
|
25
25
|
gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
|
|
26
|
-
gam/gamlib/glapi.py,sha256=
|
|
26
|
+
gam/gamlib/glapi.py,sha256=85YwZ5LhBoVd9kU3m-gwLRq8FwTWCaRIwARuQvH8Mjc,34022
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=cV011FpIWge4oi5_dJrdof66vUqX6UCvTGWWTNVmYEg,28055
|
|
28
|
-
gam/gamlib/glclargs.py,sha256=
|
|
29
|
-
gam/gamlib/glentity.py,sha256=
|
|
28
|
+
gam/gamlib/glclargs.py,sha256=6irl5ZEu-pd4cGimc0PHZtJS8Ui6QHHgNzFO93beEcc,42206
|
|
29
|
+
gam/gamlib/glentity.py,sha256=fqWUlxQqPKlfFrkuPjCK2lZhhFBIZboCuO0qCxuEwqA,33691
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=xk3pEaIE-zHrTNCn5rJYERqqpbN55E1wXlKoqvWP44E,39232
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=Y73xM1RNhIbtcqnMv1gcZF3wDWOeLWW-7SvoQyWw6tA,9659
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.6.
|
|
69
|
-
gam7-7.6.
|
|
70
|
-
gam7-7.6.
|
|
71
|
-
gam7-7.6.
|
|
72
|
-
gam7-7.6.
|
|
68
|
+
gam7-7.6.12.dist-info/METADATA,sha256=Gm8h23k_mO_J3Fk_Wxcxg6PwNgojPfcZSnBpniWVddg,2970
|
|
69
|
+
gam7-7.6.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.6.12.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.6.12.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.6.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|