gam calendar ... infoevent command, few tests

This commit is contained in:
Jay Lee
2020-03-07 20:21:49 -05:00
parent 62a0a064aa
commit ff55b452eb
2 changed files with 12 additions and 0 deletions

View File

@@ -3626,6 +3626,14 @@ def doCalendarMoveOrDeleteEvent(moveOrDelete):
else:
print(f' would {moveOrDelete} eventId {eventId}. Add doit to command to actually {moveOrDelete} event')
def doCalendarInfoEvent():
calendarId, cal = buildCalendarDataGAPIObject(sys.argv[2])
if not cal:
return
eventId = sys.argv[4]
result = gapi.call(cal.events(), 'get', calendarId=calendarId, eventId=eventId)
display.print_json(result)
def doCalendarAddOrUpdateEvent(action):
calendarId, cal = buildCalendarDataGAPIObject(sys.argv[2])
if not cal:
@@ -14446,6 +14454,8 @@ def ProcessGAMCommand(args):
doCalendarAddOrUpdateEvent('add')
elif argument == 'updateevent':
doCalendarAddOrUpdateEvent('update')
elif argument == 'infoevent':
doCalendarInfoEvent()
elif argument == 'deleteevent':
doCalendarMoveOrDeleteEvent('delete')
elif argument == 'moveevent':