Added additional options to gam <UserTypeEntity> print|show youtubechannels.

This commit is contained in:
Ross Scroggs
2023-11-22 20:36:43 -08:00
parent 51de288f27
commit 0562639715
12 changed files with 221 additions and 87 deletions

View File

@ -16,44 +16,7 @@
<FalseValues>= false|off|no|disabled|0
<TrueValues> ::= true|on|yes|enabled|1
<Charset> ::= ascii|latin1|mbcs|utf-8|utf-8-sig|utf-16|<String>
<CalendarColorIndex> ::= <Number in range 1-24>
<CalendarColorName> ::=
amethyst|avocado|banana|basil|birch|blueberry|
cherryblossom|citron|cobalt|cocoa|eucalyptus|flamingo|
grape|graphite|lavender|mango|peacock|pistachio|
pumpkin|radicchio|sage|tangerine|tomato|wisteria|
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
<ColorNameGoogle> ::=
asparagus|bluevelvet|bubblegum|cardinal|chocolateicecream|denim|desertsand|
earthworm|macaroni|marsorange|mountaingray|mountaingrey|mouse|oldbrickred|
pool|purpledino|purplerain|rainysky|seafoam|slimegreen|spearmint|
toyeggplant|vernfern|wildstrawberries|yellowcab
<ColorNameWeb> ::=
aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|
blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|
cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|
darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|
darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|
darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|
firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|
gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|
lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|
lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|
lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|
slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|
wheat|white|whitesmoke|yellow|yellowgreen
<ColorName> ::= <ColorNameGoogle>|<ColorNameWeb>
<ColorValue> ::= <ColorName>|<ColorHex>
<DayOfWeek> ::= mon|tue|wed|thu|fri|sat|sun
<DriveLabelLanguageCode> ::=
<BCP47LanguageCode> ::=
ar-sa| # Arabic Saudi Arabia
cs-cz| # Czech Czech Republic
da-dk| # Danish Denmark
@ -91,6 +54,43 @@
zh-cn| # Chinese China
zh-hk| # Chinese Hong Kong
zh-tw # Chinese Taiwan
<Charset> ::= ascii|latin1|mbcs|utf-8|utf-8-sig|utf-16|<String>
<CalendarColorIndex> ::= <Number in range 1-24>
<CalendarColorName> ::=
amethyst|avocado|banana|basil|birch|blueberry|
cherryblossom|citron|cobalt|cocoa|eucalyptus|flamingo|
grape|graphite|lavender|mango|peacock|pistachio|
pumpkin|radicchio|sage|tangerine|tomato|wisteria|
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
<ColorNameGoogle> ::=
asparagus|bluevelvet|bubblegum|cardinal|chocolateicecream|denim|desertsand|
earthworm|macaroni|marsorange|mountaingray|mountaingrey|mouse|oldbrickred|
pool|purpledino|purplerain|rainysky|seafoam|slimegreen|spearmint|
toyeggplant|vernfern|wildstrawberries|yellowcab
<ColorNameWeb> ::=
aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|
blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|
cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|
darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|
darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|
darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|
firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|
gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|
lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|
lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|
lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|
lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|
mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|
mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|
navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|
palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|
peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|
sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|
slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|
wheat|white|whitesmoke|yellow|yellowgreen
<ColorName> ::= <ColorNameGoogle>|<ColorNameWeb>
<ColorValue> ::= <ColorName>|<ColorHex>
<DayOfWeek> ::= mon|tue|wed|thu|fri|sat|sun
<EventColorIndex> ::= <Number in range 1-11>
<EventColorName> ::=
banana|basil|blueberry|flamingo|graphite|grape|

View File

@ -10,6 +10,10 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
### 6.65.15
Added additional options to `gam <UserTypeEntity> print|show youtubechannels`.
### 6.65.14
Fixed bug in gam <UserTypeEntity> copy|move drivefile` that caused a trap.

View File

@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAMADV-XTD3 6.65.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.65.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.10.8 64-bit final
MacOS High Sierra 10.13.6 x86_64
@ -1002,7 +1002,7 @@ writes the credentials into the file oauth2.txt.
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
C:\GAMADV-XTD3>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAMADV-XTD3 6.65.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.65.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
Windows-10-10.0.17134 AMD64

View File

@ -41,7 +41,7 @@ Supported editions for this feature: Business Standard and Business Plus; Enterp
<DriveLabelSelectionID> ::= <String>
<DriveLabelSelectionIDList> ::= "<DriveLabelSelectionID>(,<DriveLabelSelectionID)*"
<DriveLabelLanguageCode> ::=
<BCP47LanguageCode> ::=
ar-sa| # Arabic Saudi Arabia
cs-cz| # Czech Czech Republic
da-dk| # Danish Denmark
@ -94,12 +94,12 @@ Three forms of the commands are available:
```
gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>
[[basic|full] [languagecode <DriveLabelLanguageCode>]
[[basic|full] [languagecode <BCP47LanguageCode>]
[formatjson] [adminaccess|asadmin]
```
* `basic` - Display fields: name,id,revisionId,labelType,properties.*; this is the default
* `full` - Display all possible fields
* `languagecode <DriveLabelLanguageCode>` - The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.
* `languagecode <BCP47LanguageCode>` - The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.
* `adminaccess|asadmin` - Use the user's admin credentials. This will return all Labels within the customer.
By default, Gam displays the information as an indented list of keys and values.
@ -107,13 +107,13 @@ By default, Gam displays the information as an indented list of keys and values.
```
gam [<UserTypeEntity>] show drivelabels
[basic|full] [languagecode <DriveLabelLanguageCode>]
[basic|full] [languagecode <BCP47LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson] [adminaccess|asadmin]
```
* `basic` - Display fields: name,id,revisionId,labelType,properties.*; this is the default
* `full` - Display all possible fields
* `languagecode <DriveLabelLanguageCode>` - The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.
* `languagecode <BCP47LanguageCode>` - The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.
* `minimumrole applier|editor|organizer|reader` - Specifies the level of access the user must have on the returned Labels. Defaults to READER.
* `adminaccess|asadmin` - Use the user's admin credentials. This will return all Labels within the customer.
@ -122,13 +122,13 @@ By default, Gam displays the information as an indented list of keys and values.
```
gam [<UserTypeEntity>] print drivelabels [todrive <ToDriveAttribute>*]
[basic|full] [languagecode <DriveLabelLanguageCode>]
[basic|full] [languagecode <BCP47LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
```
* `basic` - Display fields: name,id,revisionId,labelType,properties.*; this is the default
* `full` - Display all possible fields
* `languagecode <DriveLabelLanguageCode>` - The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.
* `languagecode <BCP47LanguageCode>` - The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.
* `minimumrole applier|editor|organizer|reader` - Specifies the level of access the user must have on the returned Labels. Defaults to READER.
* `adminaccess|asadmin` - Use the user's admin credentials. This will return all Labels within the customer.

View File

@ -2,8 +2,8 @@
- [API documentation](#api-documentation)
- [Notes](#notes)
- [Definitions](#definitions)
- [Display Selected YouTube Channels](#display_selected-youtube_channels)
- [Display Owned YouTube Channels](#display-owned-youtube_channels)
- [Display Selected YouTube Channels](#display-selected-youtube-channels)
- [Display Owned YouTube Channels](#display-owned-youtube-channels)
## API documentation
* https://developers.google.com/youtube/v3/docs/channels/list
@ -18,6 +18,45 @@ gam user user@domain.com update serviceaccount
## Definitions
* [`<UserTypeEntity>`](Collections-of-Users)
```
<BCP47LanguageCode> ::=
ar-sa| # Arabic Saudi Arabia
cs-cz| # Czech Czech Republic
da-dk| # Danish Denmark
de-de| # German Germany
el-gr| # Modern Greek Greece
en-au| # English Australia
en-gb| # English United Kingdom
en-ie| # English Ireland
en-us| # English United States
en-za| # English South Africa
es-es| # Spanish Spain
es-mx| # Spanish Mexico
fi-fi| # Finnish Finland
fr-ca| # French Canada
fr-fr| # French France
he-il| # Hebrew Israel
hi-in| # Hindi India
hu-hu| # Hungarian Hungary
id-id| # Indonesian Indonesia
it-it| # Italian Italy
ja-jp| # Japanese Japan
ko-kr| # Korean Republic of Korea
nl-be| # Dutch Belgium
nl-nl| # Dutch Netherlands
no-no| # Norwegian Norway
pl-pl| # Polish Poland
pt-br| # Portuguese Brazil
pt-pt| # Portuguese Portugal
ro-ro| # Romanian Romania
ru-ru| # Russian Russian Federation
sk-sk| # Slovak Slovakia
sv-se| # Swedish Sweden
th-th| # Thai Thailand
tr-tr| # Turkish Turkey
zh-cn| # Chinese China
zh-hk| # Chinese Hong Kong
zh-tw # Chinese Taiwan
<YouTubeChannelID> ::= <String>
<YouTubeChannelIDList> ::= "<YouTubeChannelID>(,<YouTubeChannelID>)*"
@ -37,22 +76,30 @@ gam user user@domain.com update serviceaccount
Display YouTube channels selected by ID.
```
gam <UserTypeEntity> show youtubechannels
channels <YouTubeChannelIDList>
(mine|
(ids|channels <YouTubeChannelIDList>)|
(forusername <String>)|
(managedbyme <String>))
[languagecode <BCP47LanguageCode>]
[allfields|(fields <YouTubeChannelFieldNameList>)]
[formatjson]
```
By default, only the YouTube channel ID is displayed; use `allfields|fields` to selct additional fields for display.
By default, only the YouTube channel ID is displayed; use `allfields|fields` to select additional fields for display.
By default, Gam displays the YouTube channels as an indented list of keys and values.
* `formatjson` - Display the YouTube channels in JSON format
```
gam <UserTypeEntity> print youtubechannels [todrive <ToDriveAttribute>*]
[channels <YouTubeChannelIDList>]
(mine|
(ids|channels <YouTubeChannelIDList>)|
(forusername <String>)|
(managedbyme <String>))
[languagecode <BCP47LanguageCode>]
[allfields|(fields <YouTubeChannelFieldNameList>)]
[formatjson [quotechar <Character>]]
```
By default, only the YouTube channel ID is displayed; use `allfields|fields` to selct additional fields for display.
By default, only the YouTube channel ID is displayed; use `allfields|fields` to select additional fields for display.
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
* `formatjson` - Display the fields in JSON format.
@ -67,20 +114,26 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
Display YouTube channels owned by a user.
```
gam <UserTypeEntity> show youtubechannels
[languagecode <BCP47LanguageCode>]
[allfields|(fields <YouTubeChannelFieldNameList>)]
[formatjson]
```
By default, only the YouTube channel ID is displayed; use `allfields|fields` to selct additional fields for display.
By default, only the YouTube channel ID is displayed; use `allfields|fields` to select additional fields for display.
By default, Gam displays the YouTube channels as an indented list of keys and values.
* `formatjson` - Display the YouTube channels in JSON format
```
gam <UserTypeEntity> print youtubechannels [todrive <ToDriveAttribute>*]
(mine|
(ids|channels <YouTubeChannelIDList>)|
(forusername <String>)|
(managedbyme <String>))
[languagecode <BCP47LanguageCode>]
[allfields|(fields <YouTubeChannelFieldNameList>)]
[formatjson [quotechar <Character>]]
```
By default, only the YouTube channel ID is displayed; use `allfields|fields` to selct additional fields for display.
By default, only the YouTube channel ID is displayed; use `allfields|fields` to select additional fields for display.
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
* `formatjson` - Display the fields in JSON format.

View File

@ -4,7 +4,7 @@
Print the current version of Gam with details
```
gam version
GAMADV-XTD3 6.65.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.65.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
@ -16,7 +16,7 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information
```
gam version timeoffset
GAMADV-XTD3 6.65.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.65.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
@ -28,7 +28,7 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information
```
gam version extended
GAMADV-XTD3 6.65.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.65.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Version Check:
Current: 5.35.08
Latest: 6.65.14
Latest: 6.65.15
echo $?
1
```
@ -73,7 +73,7 @@ echo $?
Print the current version number without details
```
gam version simple
6.65.14
6.65.15
```
In Linux/MacOS you can do:
```
@ -83,7 +83,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 6.65.14 - https://github.com/taers232c/GAMADV-XTD3
GAM 6.65.15 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64

View File

@ -59,7 +59,7 @@ If an item contains spaces, it should be surrounded by ".
<ColorName> ::= <ColorNameGoogle>|<ColorNameWeb>
<ColorValue> ::= <ColorName>|<ColorHex>
<DayOfWeek> ::= mon|tue|wed|thu|fri|sat|sun
<DriveLabelLanguageCode> ::=
<BCP47LanguageCode> ::=
ar-sa| # Arabic Saudi Arabia
cs-cz| # Czech Czech Republic
da-dk| # Danish Denmark
@ -1558,9 +1558,17 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
<AttendeeAttendance> ::= optional|required
<AttendeeStatus> ::= accepted|declined|needsaction|tentative
<EventType> ::=
default|
focustime|
outofoffice|
workinglocation
<EventTypeList> ::= "<EventType>(,<EventType>)*"
<EventSelectProperty> ::=
(after|starttime|timemin <Time>)|
(before|endtime|timemax <Time>)|
(eventtypes <EventTypeList>)|
(query <QueryCalendar>)|
(privateextendedproperty <String>)|
(sharedextendedproperty <Syting>)|
@ -1635,11 +1643,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
tentative|
(timezone <TimeZone>)|
(transparency opaque|transparent)|
(visibility default|public|private)|
(workinglocation (home|
(custom <String>)|
(office <String> [building|buildingid <String>] [floor|floorname <String>]
[section|floorsection <String>] [desk|deskcode <String>])))
(visibility default|public|private)
The following attributes are equivalent:
available - transparency transparent
@ -1719,12 +1723,21 @@ gam calendar|calendars <CalendarEntity> empty calendartrash
creator.id|
creator.self
<EventFocusTimePropertiesSubfieldName> ::=
focustime.autodeclinemode|
focustime.chatstatus|
focustime.declinemessage
<EventOrganizerSubfieldName> ::=
organizer.displayname|
organizer.email|
organizer.id|
organizer.self
<EventOutOfOfficePropertiesSubfieldName> ::=
outofoffice.autodeclinemode|
outofoffice.declinemessage
<EventWorkingLocationPropertiesSubfieldName> ::=
workinglocationproperties.homeoffice|
workinglocationproperties.customlocation|
@ -1748,6 +1761,8 @@ gam calendar|calendars <CalendarEntity> empty calendartrash
endtimeunspecified|
extendedproperties|
eventtype|
focustimeproperties|
<EventFocusTimePropertiesSubfieldName>|
gadget|
guestscaninviteothers|
guestscanmodify|
@ -1761,6 +1776,8 @@ gam calendar|calendars <CalendarEntity> empty calendartrash
organizer|
<EventOrganizerSubfieldName>|
originalstart|originalstarttime|
outofofficeproperties|
<EventOutOfOfficePropertiesSubfieldName>
privatecopy|
recurrence|
recurringeventid|
@ -5534,12 +5551,20 @@ gam <UserTypeEntity> transfer seccals <UserItem> [keepuser] [sendnotifications <
<AttendeeAttendance> ::= optional|required
<AttendeeStatus> ::= accepted|declined|needsaction|tentative
<EventType> ::=
default|
focustime|
outofoffice|
workinglocation
<EventTypeList> ::= "<EventType>(,<EventType>)*"
<EventSelectProperty> ::=
(after|starttime|timemin <Time>)|
(before|endtime|timemax <Time>)|
(eventtypes <EventTypeList>)|
(query <QueryCalendar>)|
(privateextendedproperty <String>)|
(sharedextendedproperty <Syting>)|
(sharedextendedproperty <String>)|
showdeletedevents|
showhiddeninvitations|
singleevents|
@ -6129,15 +6154,15 @@ gam <UserTypeEntity> delete permissions <DriveFileEntity> <DriveFilePermissionID
<PermissionMatch>* [<PermissionMatchAction>]
gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>
[[basic|full] [languagecode <DriveLabelLanguageCode>]
[[basic|full] [languagecode <BCP47LanguageCode>]
[formatjson] [adminaccess|asadmin]
gam [<UserTypeEntity>] print <drivelabels> [todrive <ToDriveAttribute>*]
[basic|full] [languagecode <DriveLabelLanguageCode>]
[basic|full] [languagecode <BCP47LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson [quotechar <Character>]] [adminaccess|asadmin]
gam [<UserTypeEntity>] show drivelabels
[basic|full] [languagecode <DriveLabelLanguageCode>]
[basic|full] [languagecode <BCP47LanguageCode>]
[publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
[formatjson] [adminaccess|asadmin]
@ -7648,11 +7673,19 @@ gam print tokens|token [todrive <ToDriveAttribute>*] [clientid <ClientID>]
<YouTubeChannelFieldNameList> ::= "<YouTubeChannelFieldName>(,<YouTubeChannelFieldName>)*"
gam <UserTypeEntity> show youtubechannels
[channels <YouTubeChannelIDList>]
(mine|
(ids|channels <YouTubeChannelIDList>)|
(forusername <String>)|
(managedbyme <String>))
[languagecode <BCP47LanguageCode>]
[allfields|(fields <YouTubeChannelFieldNameList>)]
[formatjson]
gam <UserTypeEntity> print youtubechannels [todrive <ToDriveAttribute>*]
[channels <YouTubeChannelIDList>]
(mine|
(ids|channels <YouTubeChannelIDList>)|
(forusername <String>)|
(managedbyme <String>))
[languagecode <BCP47LanguageCode>]
[allfields|(fields <YouTubeChannelFieldNameList>)]
[formatjson [quotechar <Character>]]

View File

@ -2,6 +2,10 @@
Merged GAM-Team version
6.65.15
Added additional options to `gam <UserTypeEntity> print|show youtubechannels`.
6.65.14
Fixed bug in gam <UserTypeEntity> copy|move drivefile` that caused a trap.

View File

@ -48468,7 +48468,7 @@ def createWorkingLocation(users):
if not cal:
continue
jcount = len(dateList)
entityPerformAction([Ent.CALENDAR, user, Ent.WORKING_LOCATION, None], i, count)
entityPerformAction([Ent.CALENDAR, user, Ent.EVENT_WORKINGLOCATION, None], i, count)
Ind.Increment()
j = 0
for wlDate in dateList:
@ -48536,7 +48536,7 @@ def deleteWorkingLocation(users):
if not cal:
continue
jcount = len(dateList)
entityPerformAction([Ent.CALENDAR, user, Ent.WORKING_LOCATION, None], i, count)
entityPerformAction([Ent.CALENDAR, user, Ent.EVENT_WORKINGLOCATION, None], i, count)
Ind.Increment()
j = 0
for wlDate in dateList:
@ -48695,33 +48695,51 @@ YOUTUBE_CHANNEL_FIELDS_CHOICE_MAP = {
YOUTUBE_CHANNEL_TIME_OBJECTS = {'publishedAt'}
# gam <UserTypeEntity> show youtubechannels
# [channels <YouTubeChannelIDList>]
# (mine|
# (ids|channels <YouTubeChannelIDList>)|
# (forusername <String>)|
# (managedbyme <String>))
# [languagecode <BCP47LanguageCode>]
# [allfields|(fields <YouTubeChannelFieldNameList>)]
# [formatjson]
# gam <UserTypeEntity> print youtubechannels [todrive <ToDriveAttribute>*]
# [channels <YouTubeChannelIDList>]
# (mine|
# (ids|channels <YouTubeChannelIDList>)|
# (forusername <String>)|
# (managedbyme <String>))
# [languagecode <BCP47LanguageCode>]
# [allfields|(fields <YouTubeChannelFieldNameList>)]
# [formatjson [quotechar <Character>]]
def printShowYouTubeChannel(users):
csvPF = CSVPrintFile(['User', 'id'], 'sortall') if Act.csvFormat() else None
FJQC = FormatJSONQuoteChar(csvPF)
kwargs = {'mine': True}
languageCode = ''
fieldsList = ['id']
while Cmd.ArgumentsRemaining():
myarg = getArgument()
if csvPF and myarg == 'todrive':
csvPF.GetTodriveParameters()
elif myarg in {'channel', 'channels'}:
kwargs.pop('mine', None)
kwargs['id'] = ','.join(getEntityList(Cmd.OB_YOUTUBE_CHANNEL_ID_LIST))
elif myarg == 'mine':
kwargs = {'mine': True}
elif myarg in {'id', 'ids', 'channel', 'channels'}:
kwargs = {'id': ','.join(getEntityList(Cmd.OB_YOUTUBE_CHANNEL_ID_LIST))}
elif myarg == 'forusername':
kwargs = {'forUsername': getString(Cmd.OB_USER_NAME)}
elif myarg == 'managedbyme':
kwargs = {'managedByMe': True, 'onBehalfOfContentOwner': getString(Cmd.OB_USER_NAME)}
elif getFieldsList(myarg, YOUTUBE_CHANNEL_FIELDS_CHOICE_MAP, fieldsList):
pass
elif myarg == 'allfields':
for field in YOUTUBE_CHANNEL_FIELDS_CHOICE_MAP:
addFieldToFieldsList(field, YOUTUBE_CHANNEL_FIELDS_CHOICE_MAP, fieldsList)
elif myarg in {'languagecode', 'hl'}:
languageCode = getLanguageCode(BCP47_LANGUAGE_CODES_MAP)
else:
FJQC.GetFormatJSONQuoteChar(myarg, True)
kwargs['part'] = ','.join(set(fieldsList))
if languageCode:
kwargs['hl'] = languageCode
i, count, users = getEntityArgument(users)
for user in users:
i += 1
@ -48732,7 +48750,13 @@ def printShowYouTubeChannel(users):
channels = callGAPIpages(yt.channels(), 'list', 'items',
throwReasons=GAPI.YOUTUBE_THROW_REASONS,
fields='nextPageToken,items', **kwargs)
except GAPI.unsupportedSupervisedAccount as e:
except (GAPI.unsupportedSupervisedAccount, GAPI.unsupportedLanguageCode) as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
continue
except GAPI.contentOwnerAccountNotFound as e:
if 'managedByMe' in kwargs:
entityActionFailedWarning([Ent.USER, user, Ent.OWNER, kwargs['onBehalfOfContentOwner']], str(e), i, count)
else:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
continue
except (GAPI.serviceNotAvailable, GAPI.authError):
@ -59964,7 +59988,7 @@ def _showDriveLabel(label, j, jcount, FJQC):
Ind.Decrement()
# gam [<UserTypeEntity>] info drivelabels <DriveLabelNameEntity>
# [[basic|full] [languagecode <DriveLabelLanguageCode>]
# [[basic|full] [languagecode <BCP47LanguageCode>]
# [formatjson] [adminaccess|asadmin]
def infoDriveLabels(users, useAdminAccess=False):
driveLabelNameEntity = getUserObjectEntity(Cmd.OB_DRIVE_LABEL_NAME, Ent.DRIVE_LABEL_NAME, shlexSplit=True)
@ -60009,11 +60033,11 @@ def doInfoDriveLabels():
infoDriveLabels([_getAdminEmail()], True)
# gam [<UserTypeEntity>] print drivelabels> [todrive <ToDriveAttribute>*]
# [basic|full] [languagecode <DriveLabelLanguageCode>]
# [basic|full] [languagecode <BCP47LanguageCode>]
# [publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
# [formatjson [quotechar <Character>]] [adminaccess|asadmin]
# gam [<UserTypeEntity>] show drivelabels
# [basic|full] [languagecode <DriveLabelLanguageCode>]
# [basic|full] [languagecode <BCP47LanguageCode>]
# [publishedonly [<Boolean>]] [minimumrole applier|editor|organizer|reader]
# [formatjson] [adminaccess|asadmin]
def printShowDriveLabels(users, useAdminAccess=False):

View File

@ -586,6 +586,8 @@ class GamCLArgs():
ARG_FILETREE = 'filetree'
ARG_FILTER = 'filter'
ARG_FILTERS = 'filters'
ARG_FOCUSTIME = 'focustime'
ARG_FOCUSTIMES = 'focustimes'
ARG_FORM = 'form'
ARG_FORMS = 'forms'
ARG_FORMRESPONSE = 'formresponse'
@ -667,6 +669,8 @@ class GamCLArgs():
ARG_OUS = 'ous'
ARG_OUSHAREDDRIVE = 'oushareddrive'
ARG_OUSHAREDDRIVES = 'oushareddrives'
ARG_OUTOFOFFICE = 'outofoffice'
ARG_OUTOFOFFICES = 'outofoffices'
ARG_OUTREE = 'outree'
ARG_OWNERSHIP = 'ownership'
ARG_PARTICIPANTS = 'participants'

View File

@ -201,6 +201,9 @@ class GamEntity():
END_TIME = 'endt'
ENTITY = 'enti'
EVENT = 'evnt'
EVENT_FOCUSTIME = 'evft'
EVENT_OUTOFOFFICE = 'evoo'
EVENT_WORKINGLOCATION = 'evwl'
FEATURE = 'feat'
FIELD = 'fiel'
FILE = 'file'
@ -362,7 +365,6 @@ class GamEntity():
VAULT_OPERATION = 'vlto'
VAULT_QUERY = 'vltq'
WEBCLIPS_ENABLED = 'webc'
WORKING_LOCATION = 'wrkl'
YOUTUBE_CHANNEL = 'ytch'
# _NAMES[0] is plural, _NAMES[1] is singular unless the item name is explicitly plural (Calendar Settings)
# For items with Boolean values, both entries are singular (Forward, POP)
@ -528,6 +530,9 @@ class GamEntity():
END_TIME: ['End Times', 'End Time'],
ENTITY: ['Entities', 'Entity'],
EVENT: ['Events', 'Event'],
EVENT_FOCUSTIME: ['Focus Time Events', 'Focus Time Event'],
EVENT_OUTOFOFFICE: ['Out of Office Events', 'Out of Office Event'],
EVENT_WORKINGLOCATION: ['Working Location Events', 'Working Location Event'],
FEATURE: ['Features', 'Feature'],
FIELD: ['Fields', 'Field'],
FILE: ['Files', 'File'],
@ -689,7 +694,6 @@ class GamEntity():
VAULT_OPERATION: ['Vault Operations', 'Vault Operation'],
VAULT_QUERY: ['Vault Queries', 'Vault Query'],
WEBCLIPS_ENABLED: ['Web Clips Enabled', 'Web Clips Enabled'],
WORKING_LOCATION: ['Working Locations', 'Working Location'],
YOUTUBE_CHANNEL: ['YouTube Channels', 'YouTube Channel'],
ROLE_MANAGER: ['Managers', 'Manager'],
ROLE_MEMBER: ['Members', 'Member'],

View File

@ -52,6 +52,7 @@ CANNOT_SHARE_TEAMDRIVE_WITH_NONGOOGLE_ACCOUNTS = 'cannotShareTeamDriveWithNonGoo
CANNOT_UPDATE_PERMISSION = 'cannotUpdatePermission'
CONDITION_NOT_MET = 'conditionNotMet'
CONFLICT = 'conflict'
CONTENT_OWNER_ACCOUNT_NOT_FOUND = 'contentOwnerAccountNotFound'
CROSS_DOMAIN_MOVE_RESTRICTION = 'crossDomainMoveRestriction'
CUSTOMER_EXCEEDED_ROLE_ASSIGNMENTS_LIMIT = 'CUSTOMER_EXCEEDED_ROLE_ASSIGNMENTS_LIMIT'
CUSTOMER_NOT_FOUND = 'customerNotFound'
@ -164,6 +165,7 @@ TEAMDRIVES_SHORTCUT_FILE_NOT_SUPPORTED = 'teamDrivesShortcutFileNotSupported'
TIME_RANGE_EMPTY = 'timeRangeEmpty'
TRANSIENT_ERROR = 'transientError'
UNKNOWN_ERROR = 'unknownError'
UNSUPPORTED_LANGUAGE_CODE = 'unsupportedLanguageCode'
UNSUPPORTED_SUPERVISED_ACCOUNT = 'unsupportedSupervisedAccount'
UPLOAD_TOO_LARGE = 'uploadTooLarge'
USER_CANNOT_CREATE_TEAMDRIVES = 'userCannotCreateTeamDrives'
@ -263,7 +265,7 @@ SHEETS_ACCESS_THROW_REASONS = DRIVE_USER_THROW_REASONS+[NOT_FOUND, PERMISSION_DE
TASK_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
TASKLIST_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
USER_GET_THROW_REASONS = [USER_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, FORBIDDEN, BAD_REQUEST, SYSTEM_ERROR]
YOUTUBE_THROW_REASONS = [SERVICE_NOT_AVAILABLE, AUTH_ERROR, UNSUPPORTED_SUPERVISED_ACCOUNT]
YOUTUBE_THROW_REASONS = [SERVICE_NOT_AVAILABLE, AUTH_ERROR, UNSUPPORTED_SUPERVISED_ACCOUNT, UNSUPPORTED_LANGUAGE_CODE, CONTENT_OWNER_ACCOUNT_NOT_FOUND]
REASON_MESSAGE_MAP = {
ABORTED: [
@ -394,6 +396,8 @@ class conditionNotMet(Exception):
pass
class conflict(Exception):
pass
class contentOwnerAccountNotFound(Exception):
pass
class crossDomainMoveRestriction(Exception):
pass
class customerExceededRoleAssignmentsLimit(Exception):
@ -614,6 +618,8 @@ class transientError(Exception):
pass
class unknownError(Exception):
pass
class unsupportedLanguageCode(Exception):
pass
class unsupportedSupervisedAccount(Exception):
pass
class uploadTooLarge(Exception):
@ -659,6 +665,7 @@ REASON_EXCEPTION_MAP = {
CANNOT_UPDATE_PERMISSION: cannotUpdatePermission,
CONDITION_NOT_MET: conditionNotMet,
CONFLICT: conflict,
CONTENT_OWNER_ACCOUNT_NOT_FOUND: contentOwnerAccountNotFound,
CROSS_DOMAIN_MOVE_RESTRICTION: crossDomainMoveRestriction,
CUSTOMER_EXCEEDED_ROLE_ASSIGNMENTS_LIMIT: customerExceededRoleAssignmentsLimit,
CUSTOMER_NOT_FOUND: customerNotFound,
@ -769,6 +776,7 @@ REASON_EXCEPTION_MAP = {
TIME_RANGE_EMPTY: timeRangeEmpty,
TRANSIENT_ERROR: transientError,
UNKNOWN_ERROR: unknownError,
UNSUPPORTED_LANGUAGE_CODE: unsupportedLanguageCode,
UNSUPPORTED_SUPERVISED_ACCOUNT: unsupportedSupervisedAccount,
UPLOAD_TOO_LARGE: uploadTooLarge,
USER_CANNOT_CREATE_TEAMDRIVES: userCannotCreateTeamDrives,