mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
gam calendar ... infoevent command, few tests
This commit is contained in:
10
src/gam.py
10
src/gam.py
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user