class JGoogleDataCalendar extends JGoogleData

Google Calendar data class for the Joomla Platform.

Methods

__construct( Registry $options = null, JGoogleAuth $auth = null)

Constructor.

boolean
authenticate()

Method to authenticate to Google

boolean
isAuthenticated()

Check authentication

mixed
getOption( string $key)

Get an option from the JGoogleData instance.

setOption( string $key, mixed $value)

Set an option for the JGoogleData instance.

boolean
removeCalendar( string $calendarID)

Method to remove a calendar from a user's calendar list

mixed
getCalendar( string $calendarID)

Method to get a calendar's settings from Google

mixed
addCalendar( string $calendarID, array $options = array())

Method to add a calendar to a user's Google Calendar list

mixed
listCalendars( array $options = array(), int $maxpages = 1)

Method to retrieve calendar list from Google

mixed
editCalendarSettings( string $calendarID, array $options)

Method to edit a Google Calendar's settings

boolean
clearCalendar( string $calendarID)

Method to clear a Google Calendar

boolean
deleteCalendar( string $calendarID)

Method to delete a calendar from Google

mixed
createCalendar( string $title, array $options = array())

Method to create a Google Calendar

mixed
editCalendar( string $calendarID, array $options)

Method to edit a Google Calendar

boolean
deleteEvent( string $calendarID, string $eventID)

Method to delete an event from a Google Calendar

mixed
getEvent( string $calendarID, string $eventID, array $options = array())

Method to get an event from a Google Calendar

mixed
createEvent( string $calendarID, mixed $start, mixed $end = false, array $options = array(), mixed $timezone = false, boolean $allday = false, boolean $notify = false)

Method to create a Google Calendar event

mixed
listRecurrences( string $calendarID, string $eventID, array $options = array(), int $maxpages = 1)

Method to retrieve a list of events on a Google calendar

mixed
listEvents( string $calendarID, array $options = array(), int $maxpages = 1)

Method to retrieve a list of events on a Google calendar

mixed
moveEvent( string $calendarID, string $eventID, string $destID, boolean $notify = false)

Method to move an event from one calendar to another

mixed
editEvent( string $calendarID, string $eventID, array $options, boolean $notify = false)

Method to edit a Google Calendar event

Details

__construct( Registry $options = null, JGoogleAuth $auth = null)

Constructor.

Parameters

Registry $options Google options object.
JGoogleAuth $auth Google data http client object.

boolean authenticate()

Method to authenticate to Google

Return Value

boolean True on success.

boolean isAuthenticated()

Check authentication

Return Value

boolean True if authenticated.

mixed getOption( string $key)

Get an option from the JGoogleData instance.

Parameters

string $key The name of the option to get.

Return Value

mixed The option value.

JGoogleData setOption( string $key, mixed $value)

Set an option for the JGoogleData instance.

Parameters

string $key The name of the option to set.
mixed $value The option value to set.

Return Value

JGoogleData This object for method chaining.

boolean removeCalendar( string $calendarID)

Method to remove a calendar from a user's calendar list

Parameters

string $calendarID ID of calendar to delete

Return Value

boolean Success or failure

Exceptions

UnexpectedValueException

mixed getCalendar( string $calendarID)

Method to get a calendar's settings from Google

Parameters

string $calendarID ID of calendar to get.

Return Value

mixed Data from Google

Exceptions

UnexpectedValueException

mixed addCalendar( string $calendarID, array $options = array())

Method to add a calendar to a user's Google Calendar list

Parameters

string $calendarID New calendar ID
array $options New calendar settings

Return Value

mixed Data from Google

Exceptions

UnexpectedValueException

mixed listCalendars( array $options = array(), int $maxpages = 1)

Method to retrieve calendar list from Google

Parameters

array $options Search settings
int $maxpages Maximum number of pages of calendars to return

Return Value

mixed Data from Google

Exceptions

UnexpectedValueException

mixed editCalendarSettings( string $calendarID, array $options)

Method to edit a Google Calendar's settings

Parameters

string $calendarID Calendar ID
array $options Calendar settings

Return Value

mixed Data from Google

Exceptions

UnexpectedValueException

boolean clearCalendar( string $calendarID)

Method to clear a Google Calendar

Parameters

string $calendarID ID of calendar to clear

Return Value

boolean Success or failure

Exceptions

UnexpectedValueException

boolean deleteCalendar( string $calendarID)

Method to delete a calendar from Google

Parameters

string $calendarID ID of calendar to delete.

Return Value

boolean Success or failure

Exceptions

UnexpectedValueException

mixed createCalendar( string $title, array $options = array())

Method to create a Google Calendar

Parameters

string $title New calendar title
array $options New calendar settings

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException

mixed editCalendar( string $calendarID, array $options)

Method to edit a Google Calendar

Parameters

string $calendarID Calendar ID.
array $options Calendar settings.

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException

boolean deleteEvent( string $calendarID, string $eventID)

Method to delete an event from a Google Calendar

Parameters

string $calendarID ID of calendar to delete from
string $eventID ID of event to delete.

Return Value

boolean Success or failure.

Exceptions

UnexpectedValueException

mixed getEvent( string $calendarID, string $eventID, array $options = array())

Method to get an event from a Google Calendar

Parameters

string $calendarID ID of calendar
string $eventID ID of event to get
array $options Options to send to Google

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException

mixed createEvent( string $calendarID, mixed $start, mixed $end = false, array $options = array(), mixed $timezone = false, boolean $allday = false, boolean $notify = false)

Method to create a Google Calendar event

Parameters

string $calendarID ID of calendar
mixed $start Event start time
mixed $end Event end time
array $options New event settings
mixed $timezone Timezone for event
boolean $allday Treat event as an all-day event
boolean $notify Notify participants

Return Value

mixed Data from Google.

Exceptions

InvalidArgumentException
UnexpectedValueException

mixed listRecurrences( string $calendarID, string $eventID, array $options = array(), int $maxpages = 1)

Method to retrieve a list of events on a Google calendar

Parameters

string $calendarID Calendar ID
string $eventID ID of the event to change
array $options Search settings
int $maxpages Minimum number of events to retrieve (more may be retrieved depending on page size)

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException

mixed listEvents( string $calendarID, array $options = array(), int $maxpages = 1)

Method to retrieve a list of events on a Google calendar

Parameters

string $calendarID Calendar ID
array $options Calendar settings
int $maxpages Cycle through pages of data to generate a complete list

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException

mixed moveEvent( string $calendarID, string $eventID, string $destID, boolean $notify = false)

Method to move an event from one calendar to another

Parameters

string $calendarID Calendar ID
string $eventID ID of the event to change
string $destID Calendar ID
boolean $notify Notify participants of changes

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException

mixed editEvent( string $calendarID, string $eventID, array $options, boolean $notify = false)

Method to edit a Google Calendar event

Parameters

string $calendarID Calendar ID
string $eventID ID of the event to change
array $options Event settings
boolean $notify Notify participants of changes

Return Value

mixed Data from Google.

Exceptions

UnexpectedValueException