GCALENDAR

Members

gcalendar.startPubsub({ email = "" })

“Start the pubsub for the account passed”

Parameters:email (str) – mail of the account
gcalendar.stopPubsub({ email = "" })

“Stop the pubsub for the account passed”

Parameters:email (str) – mail of the account
gcalendar.getEvents({ calendar=nil, timeMax="", timeMin="" })

“Retrieve all the events in the calendar of the user”

Parameters:
  • calendar (instance) – gcalendar.GCalendarCalendar
  • timeMix (str) – from which date retrieve events. Defaults to first calendar’s event. OPTIONAL
  • timeMax (str) – till which date retrieve events. Defaults to now. OPTIONAL
Raises:

SCOPE_NOT_FOUND

Raises:

ACCOUNT_NOT_FOUND

Raises:

CALENDAR_NOT_FOUND

Return type:

gcalendar.GcalendarEventsEvent

class gcalendar.GcalendarEventsEvent
getSize()
Returns:number of events
getEvents()
Returns:arraylist of all events found
getEvent(int index)
Returns:GcalendarEvent object
gcalendar.addEvent({ calendar=nil, startTime="", endTime="", description = "", location = "", summary = "" })

“Add a calendar event”

Parameters:
  • calendar (instance) – gcalendar.GCalendarCalendar
  • startTime (str) – starting time of the event
  • endTime (str) – ending time of the event
  • description – event description. OPTIONAL
  • location (str) – event location. OPTIONAL
  • summary (str) – event summary. OPTIONAL
Return type:

gcalendar.GcalendarEvent

class gcalendar.GcalendarEvent
getCreator()
Returns:event creator
getSummary()
Returns:event summary
getId()
Returns:event gcalendar id
getLocation()
Returns:event location
getDescription()
Returns:event description
getStart()
Returns:event start time
getEnd()
Returns:event end time
gcalendar.getCalendar({ email="", calendarId = "" })

“Retrieve a GCalendarCalendar object”

Parameters:
  • email (str) – user email
  • calendarId (str) – user desired calendarId. Defaults to “primary”. OPTIONAL
Return type:

gcalendar.GCalendarCalendar

class gcalendar.GCalendarCalendar
getEmail()
Returns:calendar object email
getTimezone()
Returns:calendar timezone
getId()
Returns:calendar id
gcalendar.removeEvent({ calendar=nil, id="" })

“Remove a calendar event”

Parameters:
gcalendar.scheduleAlarm({ calendar=nil, id="", before=, after=, interval=, times= })

“Schedule an alarm on calendar event”

Parameters:
  • calendar (instance) – gcalendar.GCalendarCalendar
  • id (str) – gcalendar event id
  • before (int) – seconds to schedule alarm before event start
  • after (int) – seconds to schedule alarm after event end
  • interval (int) – interval in seconds between each notification, when times is set. Defaults to off. OPTIONAL
  • after – number of times we want a notification to be sent, with $interval sec between them. Defaults to 1. OPTIONAL
gcalendar.removeAlarm({ id="", alarmType="" })

“Schedule an alarm on calendar event”

Parameters:
  • alarmType (str) – Whether to remove an “after” or “before” alarm for the event
  • id (str) – gcalendar event id