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

@@ -244,6 +244,8 @@ script:
- if [ "$e2e" = true ]; then $gam calendar $gam_user add editor $newuser; fi
- if [ "$e2e" = true ]; then $gam calendar $gam_user showacl; fi
- if [ "$e2e" = true ]; then $gam calendar $gam_user printacl | $gam csv - gam calendar $gam_user delete id ~id; fi
- if [ "$e2e" = true ]; then $gam calendar $gam_user addevent summary "Travis test event" start $(date '+%FT%T.%N%:z' -d "now + 1 hour") end $(date '+%FT%T.%N%:z' -d "now + 2 hours") attendee $gam_group hangoutsmeet guestscanmodify true sendupdates all; fi
- if [ "$e2e" = true ]; then $gam calendar $gam_user printevents after -0d; fi
- if [ "$e2e" = true ]; then $gam printer register; fi
- if [ "$e2e" = true ]; then source travis/set_printer_csv_filter.sh; fi
- if [ "$e2e" = true ]; then $gam print printers > printers.csv; fi

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':