Skip to content

Commit

Permalink
Updated <CalendarAttribute> to allow specifying a list of email not…
Browse files Browse the repository at this point in the history
…ification event types.
  • Loading branch information
taers232c committed Mar 28, 2021
1 parent 63589ea commit 01ff6db
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 10 deletions.
22 changes: 15 additions & 7 deletions src/GamCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*] [formatjson
available|
(colorindex|colorid <EventColorIndex>))|
(description <String>)|
(end|endtime (allday <Date>)|<Time>)|
(end (allday <Date>)|<Time>)|
(guestscaninviteothers <Boolean>)|
guestscantinviteothers|
(guestscanmodify <Boolean>)|
Expand All @@ -1145,7 +1145,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*] [formatjson
(sequence <Integer>)|
(sharedproperty <PropertyKey> <PropertyValue>)|
(source <String> <URL>)|
(start|starttime (allday <Date>)|<Time>)|
(start (allday <Date>)|<Time>)|
(status confirmed|tentative|cancelled)|
(summary <String>)|
tentative|
Expand Down Expand Up @@ -3827,17 +3827,25 @@ gam <UserTypeEntity> print backupcodes|verificationcodes [todrive <ToDriveAttrib
((calendars <CalendarList>) | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>)|
<CalendarSelectProperty>*

<CalendarACLScope> ::= <EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|domain:<DomainName>)|domain|default
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
<CalendarACLScopeEntity>::= <CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>

<CalendarACLScope> ::=
<EmailAddress>|user:<EmailAdress>|group:<EmailAddress>|domain:<DomainName>)|domain|default
<CalendarACLScopeList> ::=
<CalendarACLScope>(,<CalendarACLScope>)*
<CalendarACLScopeEntity>::=
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>

<CalendarEmailNotificatonEventType> ::=
eventcreation|eventchange|eventcancellation|eventresponse|agenda
<CalendarEmailNotificatonEventTypeList> ::=
"<CalendarEmailNotificatonEventType>(,<CalendarEmailNotificatonEventType>)*"

<CalendarAttribute> ::=
(backgroundcolor <ColorValue>)|
(color <CalendarColorName>)|
(colorindex|colorid <CalendarColorIndex>)|
(foregroundcolor <ColorValue>)|
(hidden <Boolean>)|
(notification clear|(email eventcreation|eventchange|eventcancellation|eventresponse|agenda))|
(notification clear|(email <CalendarEmailNotificatonEventTypeList>))|
(reminder clear|(email|pop <Number>)|(<Number> email|pop))|
(selected <Boolean>)|
(summary <String>)
Expand Down
18 changes: 18 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
6.00.04

Updated `<CalendarAttribute>` to allow specifying a list of email notification event types.

Previously, you had to specify each email notification event type individually (this still works).
```
<CalendarEmailNotificatonEventType> ::=
eventcreation|eventchange|eventcancellation|eventresponse|agenda
<CalendarEmailNotificatonEventTypeList> ::=
<CalendarEmailNotificatonEventType>(,<CalendarEmailNotificatonEventType>)*

<CalendarAttribute> ::=
...
(notification clear|(email <CalendarEmailNotificatonEventTypeList>))|

gam user [email protected] update calendar primary notification email eventchange,eventcancellation
```

6.00.03

Fixed bug in `gam calendar update event` introduced in 5.34.02 where updating an event's start or end time appeared to work
Expand Down
12 changes: 9 additions & 3 deletions src/gam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"""

__author__ = 'Ross Scroggs <[email protected]>'
__version__ = '6.00.03'
__version__ = '6.00.04'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'

import base64
Expand Down Expand Up @@ -35779,8 +35779,14 @@ def _getCalendarAttributes(body):
body.setdefault('notificationSettings', {'notifications': []})
method = getChoice(CALENDAR_NOTIFICATION_METHODS+Cmd.CLEAR_NONE_ARGUMENT)
if method not in Cmd.CLEAR_NONE_ARGUMENT:
body['notificationSettings']['notifications'].append({'method': method,
'type': getChoice(CALENDAR_NOTIFICATION_TYPES_MAP, mapChoice=True)})
for ntype in _getFieldsList():
if ntype in CALENDAR_NOTIFICATION_TYPES_MAP:
body['notificationSettings']['notifications'].append({'method': method,
'type': CALENDAR_NOTIFICATION_TYPES_MAP[ntype]})
else:
invalidChoiceExit(ntype, CALENDAR_NOTIFICATION_TYPES_MAP, True)
else:
body['notificationSettings']['notifications'] = []
else:
unknownArgumentExit()
return colorRgbFormat
Expand Down

0 comments on commit 01ff6db

Please sign in to comment.