NAME

Google::RestApi::CalendarApi3::Calendar - Calendar object for Google Calendar.

SYNOPSIS

my $calendar = $cal_api->calendar(id => 'primary');

# Get calendar metadata
my $metadata = $calendar->get();

# Update calendar
$calendar->update(summary => 'New Name', description => 'New description');

# Delete calendar
$calendar->delete();

# Clear all events (primary calendar only)
$calendar->clear();

# Events
my @events = $calendar->events();
my $event = $calendar->event(id => 'event_id');
$calendar->event()->create(
  summary => 'Meeting',
  start => { dateTime => '2026-03-01T10:00:00Z' },
  end   => { dateTime => '2026-03-01T11:00:00Z' },
);

# ACL rules
my @rules = $calendar->acl_rules();
my $acl = $calendar->acl(id => 'rule_id');

DESCRIPTION

Represents a Google Calendar with full CRUD operations, event management, and access control.

METHODS

get(fields => $fields, params => \%params)

Retrieves calendar metadata.

update(summary => $name, description => $desc, ...)

Updates calendar metadata. Supports summary, description, location, and time_zone parameters.

delete()

Permanently deletes the calendar.

clear()

Clears all events from a calendar. Only works on the primary calendar.

event(id => $id)

Returns an Event object. Without id, can be used to create new events.

events(max_pages => $n)

Lists all events on the calendar. max_pages limits the number of pages fetched (default 0 = unlimited).

acl(id => $id)

Returns an Acl object. Without id, can be used to create new ACL rules.

acl_rules(max_pages => $n)

Lists all ACL rules on the calendar. max_pages limits the number of pages fetched (default 0 = unlimited).

calendar_id()

Returns the calendar ID.

calendar_api()

Returns the parent CalendarApi3 object.

AUTHORS

  • Robin Murray mvsjes@cpan.org

COPYRIGHT

Copyright (c) 2019-2026 Robin Murray. All rights reserved.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.