Download the PHP package ft-ugm/google-calendar without Composer
On this page you can find all versions of the php package ft-ugm/google-calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ft-ugm/google-calendar
More information about ft-ugm/google-calendar
Files in ft-ugm/google-calendar
Package google-calendar
Short Description PHP client library for the Faculty of Engineering UGM calendar service.
License MIT
Informations about the package google-calendar
FT UGM Google Calendar
PHP client library for the Faculty of Engineering UGM calendar service.
Requirements
- PHP >= 7.4
- Composer
Installation
Install via Composer:
Usage
Create a GoogleCalendar instance with the Calendar API URL and API token:
Create Event
The start and end values can also be provided using DateTime:
When using DateTime, the timezone is automatically taken from the DateTime instance.
When using the array format, the dateTime value should follow the RFC 3339 format. The timeZone field is optional. When omitted, the Calendar API uses Asia/Jakarta as the default timezone.
The start and end values support both timed events and all-day events:
| Event type | start / end format |
Description |
|---|---|---|
| Timed event | dateTime |
An event with a specific start and end time. |
| All-day event | date |
An event that covers one or more whole days. |
For a timed event, use dateTime:
For an all-day event, use date:
For all-day events, the end date is exclusive. This means the end date is the day after the last day of the event.
For example:
| Event | start.date |
end.date |
|---|---|---|
| September 15 only | 2026-09-15 |
2026-09-16 |
| September 15–16 | 2026-09-15 |
2026-09-17 |
| September 15–17 | 2026-09-15 |
2026-09-18 |
In other words, start.date is the first day of the event, while end.date is the exclusive end date and is not included in the event.
[!IMPORTANT] Each
startandendvalue must contain eitherdateordateTime, but not both.
Get Event
Update Event
Replaces the event data with the provided representation.
Patch Event
Updates only the fields provided.
Delete Event
Error Handling
API and connection errors throw a GoogleCalendarException.
The exception provides the API response through getResponse() when available:
License
MIT