mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Merge branch 'master' of https://github.com/jay0lee/GAM
This commit is contained in:
@@ -1092,7 +1092,7 @@ gam create resource <ResourceID> <Name> <ResourceAttributes>*
|
||||
gam update resource <ResourceID> <ResourceAttributes>*
|
||||
gam delete resource <ResourceID>
|
||||
gam info resource <ResourceID>
|
||||
gam print resources [todrive] [allfields] <ResourceFieldName>*
|
||||
gam print resources [todrive] [allfields] <ResourceFieldName>* [query <String>]
|
||||
|
||||
gam create schema|schemas <SchemaName> <SchemaFieldDefinition>+
|
||||
gam update schema <SchemaName> <SchemaFieldDefinition>* (deletefield <FieldName>)*
|
||||
@@ -1176,7 +1176,7 @@ gam create vaultexport|export matter <MatterItem> [name <name>] corpus <drive|ma
|
||||
[terms <terms>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
|
||||
[excludedrafts <Boolean>] [format mbox|pst] [showconfidentialmodecontent <Boolean>]
|
||||
[includerooms]
|
||||
[driveversiondate <Date>|<Time>] [includeteamdrives] [includeaccessinfo <Boolean>]
|
||||
[driveversiondate <Date>|<Time>] [includeshareddrives|includeteamdrives] [includeaccessinfo <Boolean>]
|
||||
[region any|europe|us]
|
||||
gam delete export <MatterItem> <ExportItem>
|
||||
gam info export <MatterItem> <ExportItem>
|
||||
|
||||
18
src/gam.py
18
src/gam.py
@@ -2000,7 +2000,7 @@ def getCourseAttribute(myarg, value, body, croom, function):
|
||||
systemErrorExit(2, '%s is not a valid argument to "gam %s course"' % (myarg, function))
|
||||
|
||||
def _getCourseStates(croom, value, courseStates):
|
||||
validStates = _getValidCourseStates(croom)
|
||||
validStates = _getEnumValuesMinusUnspecified(croom._rootDesc['schemas']['Course']['properties']['courseState']['enum'])
|
||||
for state in value.replace(',', ' ').split():
|
||||
courseStates.append(_getValidatedState(state, validStates))
|
||||
|
||||
@@ -8231,10 +8231,12 @@ VAULT_SEARCH_METHODS_MAP = {
|
||||
'ou': 'ORG_UNIT',
|
||||
'room': 'ROOM',
|
||||
'rooms': 'ROOM',
|
||||
'teamdrive': 'TEAM_DRIVE',
|
||||
'teamdrives': 'TEAM_DRIVE',
|
||||
'shareddrive': 'SHARED_DRIVE',
|
||||
'shareddrives': 'SHARED_DRIVE',
|
||||
'teamdrive': 'SHARED_DRIVE',
|
||||
'teamdrives': 'SHARED_DRIVE',
|
||||
}
|
||||
VAULT_SEARCH_METHODS_LIST = ['accounts', 'orgunit', 'teamdrives', 'rooms', 'everyone']
|
||||
VAULT_SEARCH_METHODS_LIST = ['accounts', 'orgunit', 'shareddrives', 'rooms', 'everyone']
|
||||
|
||||
def doCreateVaultExport():
|
||||
v = buildGAPIObject('vault')
|
||||
@@ -8271,8 +8273,8 @@ def doCreateVaultExport():
|
||||
elif searchMethod == 'ORG_UNIT':
|
||||
body['query']['orgUnitInfo'] = {'orgUnitId': getOrgUnitId(sys.argv[i+1])[1]}
|
||||
i += 2
|
||||
elif searchMethod == 'TEAM_DRIVE':
|
||||
body['query']['teamDriveInfo'] = {'teamDriveIds': sys.argv[i+1].split(',')}
|
||||
elif searchMethod == 'SHARED_DRIVE':
|
||||
body['query']['sharedDriveInfo'] = {'sharedDriveIds': sys.argv[i+1].split(',')}
|
||||
i += 2
|
||||
elif searchMethod == 'ROOM':
|
||||
body['query']['hangoutsChatInfo'] = {'roomId': sys.argv[i+1].split(',')}
|
||||
@@ -8302,8 +8304,8 @@ def doCreateVaultExport():
|
||||
elif myarg in ['driveversiondate']:
|
||||
body['query'].setdefault('driveOptions', {})['versionDate'] = getDateZeroTimeOrFullTime(sys.argv[i+1])
|
||||
i += 2
|
||||
elif myarg in ['includeteamdrives']:
|
||||
body['query'].setdefault('driveOptions', {})['includeTeamDrives'] = getBoolean(sys.argv[i+1], myarg)
|
||||
elif myarg in ['includeshareddrives', 'includeteamdrives']:
|
||||
body['query'].setdefault('driveOptions', {})['includeSharedDrives'] = getBoolean(sys.argv[i+1], myarg)
|
||||
i += 2
|
||||
elif myarg in ['includerooms']:
|
||||
body['query']['hangoutsChatOptions'] = {'includeRooms': getBoolean(sys.argv[i+1], myarg)}
|
||||
|
||||
Reference in New Issue
Block a user