Class: Google::Apis::CalendarV3::CalendarService

Inherits:
Google::Apis::Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/calendar_v3/service.rb

Overview

Calendar API

Manipulates events and other calendar data.

Examples:

require 'google/apis/calendar_v3'

Calendar = Google::Apis::CalendarV3 # Alias the module
service = Calendar::CalendarService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://www.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCalendarService

Returns a new instance of CalendarService.



51
52
53
54
55
56
# File 'lib/google/apis/calendar_v3/service.rb', line 51

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, 'calendar/v3/',
        client_name: 'google-apis-calendar_v3',
        client_version: Google::Apis::CalendarV3::GEM_VERSION)
  @batch_path = 'batch/calendar/v3'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



40
41
42
# File 'lib/google/apis/calendar_v3/service.rb', line 40

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



45
46
47
# File 'lib/google/apis/calendar_v3/service.rb', line 45

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



49
50
51
# File 'lib/google/apis/calendar_v3/service.rb', line 49

def user_ip
  @user_ip
end

Instance Method Details

#clear_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



747
748
749
750
751
752
753
754
# File 'lib/google/apis/calendar_v3/service.rb', line 747

def clear_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/clear', options)
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes an access control rule.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • rule_id (String)

    ACL rule identifier.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



84
85
86
87
88
89
90
91
92
# File 'lib/google/apis/calendar_v3/service.rb', line 84

def delete_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'calendars/{calendarId}/acl/{ruleId}', options)
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['ruleId'] = rule_id unless rule_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



781
782
783
784
785
786
787
788
# File 'lib/google/apis/calendar_v3/service.rb', line 781

def delete_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'calendars/{calendarId}', options)
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a calendar from the user's calendar list.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



409
410
411
412
413
414
415
416
# File 'lib/google/apis/calendar_v3/service.rb', line 409

def delete_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'users/me/calendarList/{calendarId}', options)
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_event(calendar_id, event_id, send_notifications: nil, send_updates: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes an event.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_id (String)

    Event identifier.

  • send_notifications (Boolean) (defaults to: nil)

    Deprecated. Please use sendUpdates instead. Whether to send notifications about the deletion of the event. Note that some emails might still be sent even if you set the value to false. The default is false.

  • send_updates (String) (defaults to: nil)

    Guests who should receive notifications about the deletion of the event.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'lib/google/apis/calendar_v3/service.rb', line 1083

def delete_event(calendar_id, event_id, send_notifications: nil, send_updates: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'calendars/{calendarId}/events/{eventId}', options)
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['eventId'] = event_id unless event_id.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['sendUpdates'] = send_updates unless send_updates.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::AclRule

Returns an access control rule.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • rule_id (String)

    ACL rule identifier.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



120
121
122
123
124
125
126
127
128
129
130
# File 'lib/google/apis/calendar_v3/service.rb', line 120

def get_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'calendars/{calendarId}/acl/{ruleId}', options)
  command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.response_class = Google::Apis::CalendarV3::AclRule
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['ruleId'] = rule_id unless rule_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Calendar

Returns metadata for a calendar.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



814
815
816
817
818
819
820
821
822
823
# File 'lib/google/apis/calendar_v3/service.rb', line 814

def get_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'calendars/{calendarId}', options)
  command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.response_class = Google::Apis::CalendarV3::Calendar
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::CalendarListEntry

Returns a calendar from the user's calendar list.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



442
443
444
445
446
447
448
449
450
451
# File 'lib/google/apis/calendar_v3/service.rb', line 442

def get_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'users/me/calendarList/{calendarId}', options)
  command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.response_class = Google::Apis::CalendarV3::CalendarListEntry
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_color(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Colors

Returns the color definitions for calendars and events.

Parameters:

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1040
1041
1042
1043
1044
1045
1046
1047
1048
# File 'lib/google/apis/calendar_v3/service.rb', line 1040

def get_color(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'colors', options)
  command.response_representation = Google::Apis::CalendarV3::Colors::Representation
  command.response_class = Google::Apis::CalendarV3::Colors
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_event(calendar_id, event_id, always_include_email: nil, max_attendees: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_id (String)

    Event identifier.

  • always_include_email (Boolean) (defaults to: nil)

    Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • time_zone (String) (defaults to: nil)

    Time zone used in the response. Optional. The default is the time zone of the calendar.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
# File 'lib/google/apis/calendar_v3/service.rb', line 1133

def get_event(calendar_id, event_id, always_include_email: nil, max_attendees: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'calendars/{calendarId}/events/{eventId}', options)
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['eventId'] = event_id unless event_id.nil?
  command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['timeZone'] = time_zone unless time_zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_setting(setting, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Setting

Returns a single user setting.

Parameters:

  • setting (String)

    The id of the user setting.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
# File 'lib/google/apis/calendar_v3/service.rb', line 1988

def get_setting(setting, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'users/me/settings/{setting}', options)
  command.response_representation = Google::Apis::CalendarV3::Setting::Representation
  command.response_class = Google::Apis::CalendarV3::Setting
  command.params['setting'] = setting unless setting.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#import_event(calendar_id, event_object = nil, conference_data_version: nil, event_label_version: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Imports an event. This operation is used to add a private copy of an existing event to a calendar. Only events with an eventType of default may be imported. Deprecated behavior: If a non-default event is imported, its type will be changed to default and any event-type-specific properties it may have will be dropped.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_object (Google::Apis::CalendarV3::Event) (defaults to: nil)
  • conference_data_version (Fixnum) (defaults to: nil)

    Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.

  • event_label_version (Fixnum) (defaults to: nil)

    Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color management. Version 1 enables support for event labels, and processes the eventLabelId in the event's body. In this case, the colorId field is ignored. The default is 0.

  • supports_attachments (Boolean) (defaults to: nil)

    Whether API client performing operation supports event attachments. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
# File 'lib/google/apis/calendar_v3/service.rb', line 1192

def import_event(calendar_id, event_object = nil, conference_data_version: nil, event_label_version: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/events/import', options)
  command.request_representation = Google::Apis::CalendarV3::Event::Representation
  command.request_object = event_object
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['conferenceDataVersion'] = conference_data_version unless conference_data_version.nil?
  command.query['eventLabelVersion'] = event_label_version unless event_label_version.nil?
  command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_acl(calendar_id, acl_rule_object = nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::AclRule

Creates an access control rule.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • acl_rule_object (Google::Apis::CalendarV3::AclRule) (defaults to: nil)
  • send_notifications (Boolean) (defaults to: nil)

    Whether to send notifications about the calendar sharing change. Optional. The default is True.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/google/apis/calendar_v3/service.rb', line 160

def insert_acl(calendar_id, acl_rule_object = nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/acl', options)
  command.request_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.request_object = acl_rule_object
  command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.response_class = Google::Apis::CalendarV3::AclRule
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_calendar(calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Calendar

Creates a secondary calendar. The authenticated user for the request is made the data owner of the new calendar. Note: We recommend to authenticate as the intended data owner of the calendar. You can use domain-wide delegation of authority to allow applications to act on behalf of a specific user. Don't use a service account for authentication. If you use a service account for authentication, the service account is the data owner, which can lead to unexpected behavior. For example, if a service account is the data owner, data ownership cannot be transferred.

Parameters:

  • calendar_object (Google::Apis::CalendarV3::Calendar) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



854
855
856
857
858
859
860
861
862
863
864
# File 'lib/google/apis/calendar_v3/service.rb', line 854

def insert_calendar(calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars', options)
  command.request_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.request_object = calendar_object
  command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.response_class = Google::Apis::CalendarV3::Calendar
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_calendar_list(calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::CalendarListEntry

Inserts an existing calendar into the user's calendar list.

Parameters:

  • calendar_list_entry_object (Google::Apis::CalendarV3::CalendarListEntry) (defaults to: nil)
  • color_rgb_format (Boolean) (defaults to: nil)

    Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/google/apis/calendar_v3/service.rb', line 479

def insert_calendar_list(calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'users/me/calendarList', options)
  command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.request_object = calendar_list_entry_object
  command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.response_class = Google::Apis::CalendarV3::CalendarListEntry
  command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_event(calendar_id, event_object = nil, conference_data_version: nil, event_label_version: nil, max_attendees: nil, send_notifications: nil, send_updates: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Creates an event.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_object (Google::Apis::CalendarV3::Event) (defaults to: nil)
  • conference_data_version (Fixnum) (defaults to: nil)

    Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.

  • event_label_version (Fixnum) (defaults to: nil)

    Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color management. Version 1 enables support for event labels, and processes the eventLabelId in the event's body. In this case, the colorId field is ignored. The default is 0.

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • send_notifications (Boolean) (defaults to: nil)

    Deprecated. Please use sendUpdates instead. Whether to send notifications about the creation of the new event. Note that some emails might still be sent even if you set the value to false. The default is false.

  • send_updates (String) (defaults to: nil)

    Whether to send notifications about the creation of the new event. Note that some emails might still be sent. The default is false.

  • supports_attachments (Boolean) (defaults to: nil)

    Whether API client performing operation supports event attachments. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
# File 'lib/google/apis/calendar_v3/service.rb', line 1260

def insert_event(calendar_id, event_object = nil, conference_data_version: nil, event_label_version: nil, max_attendees: nil, send_notifications: nil, send_updates: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/events', options)
  command.request_representation = Google::Apis::CalendarV3::Event::Representation
  command.request_object = event_object
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['conferenceDataVersion'] = conference_data_version unless conference_data_version.nil?
  command.query['eventLabelVersion'] = event_label_version unless event_label_version.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['sendUpdates'] = send_updates unless send_updates.nil?
  command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_acls(calendar_id, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Acl

Returns the rules in the access control list for the calendar.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/google/apis/calendar_v3/service.rb', line 218

def list_acls(calendar_id, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'calendars/{calendarId}/acl', options)
  command.response_representation = Google::Apis::CalendarV3::Acl::Representation
  command.response_class = Google::Apis::CalendarV3::Acl
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_calendar_lists(max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, show_own_organization_only: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::CalendarList

Returns the calendars on the user's calendar list.

Parameters:

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

  • min_access_role (String) (defaults to: nil)

    The minimum access role for the user in the returned entries. Optional. The default is no restriction.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted calendar list entries in the result. Optional. The default is False.

  • show_hidden (Boolean) (defaults to: nil)

    Whether to show hidden entries. Optional. The default is False.

  • show_own_organization_only (Boolean) (defaults to: nil)

    Whether to show only entries for calendars from the organization. This parameter is only applicable to Google Workspace users. Optional. The default is False.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted neither showHidden to False. To ensure client state consistency minAccessRole and showOwnOrganizationOnly query parameters cannot be specified together with nextSyncToken. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
# File 'lib/google/apis/calendar_v3/service.rb', line 544

def list_calendar_lists(max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, show_own_organization_only: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'users/me/calendarList', options)
  command.response_representation = Google::Apis::CalendarV3::CalendarList::Representation
  command.response_class = Google::Apis::CalendarV3::CalendarList
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['minAccessRole'] = min_access_role unless min_access_role.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['showHidden'] = show_hidden unless show_hidden.nil?
  command.query['showOwnOrganizationOnly'] = show_own_organization_only unless show_own_organization_only.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_event_instances(calendar_id, event_id, always_include_email: nil, max_attendees: nil, max_results: nil, original_start: nil, page_token: nil, show_deleted: nil, time_max: nil, time_min: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Events

Returns instances of the specified recurring event.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_id (String)

    Recurring event identifier.

  • always_include_email (Boolean) (defaults to: nil)

    Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.

  • original_start (String) (defaults to: nil)

    The original start time of the instance in the result. Optional.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events will still be included if singleEvents is False. Optional. The default is False.

  • time_max (DateTime) (defaults to: nil)

    Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset.

  • time_min (DateTime) (defaults to: nil)

    Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset.

  • time_zone (String) (defaults to: nil)

    Time zone used in the response. Optional. The default is the time zone of the calendar.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
# File 'lib/google/apis/calendar_v3/service.rb', line 1335

def list_event_instances(calendar_id, event_id, always_include_email: nil, max_attendees: nil, max_results: nil, original_start: nil, page_token: nil, show_deleted: nil, time_max: nil, time_min: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'calendars/{calendarId}/events/{eventId}/instances', options)
  command.response_representation = Google::Apis::CalendarV3::Events::Representation
  command.response_class = Google::Apis::CalendarV3::Events
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['eventId'] = event_id unless event_id.nil?
  command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['originalStart'] = original_start unless original_start.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['timeMax'] = time_max unless time_max.nil?
  command.query['timeMin'] = time_min unless time_min.nil?
  command.query['timeZone'] = time_zone unless time_zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_events(calendar_id, always_include_email: nil, event_types: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Events

Returns events on the specified calendar.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • always_include_email (Boolean) (defaults to: nil)

    Deprecated and ignored.

  • event_types (Array<String>, String) (defaults to: nil)

    Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.

  • i_cal_uid (String) (defaults to: nil)

    Specifies an event ID in the iCalendar format to be provided in the response. Optional. Use this if you want to search for an event by its iCalendar ID.

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non- empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.

  • order_by (String) (defaults to: nil)

    The order of the events returned in the result. Optional. The default is an unspecified, stable order.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • private_extended_property (Array<String>, String) (defaults to: nil)

    Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints.

  • q (String) (defaults to: nil)

    Free text search terms to find events that match these terms in the following fields:

    • summary
    • description
    • location
    • attendee's displayName
    • attendee's email
    • organizer's displayName
    • organizer's email
    • workingLocationProperties.officeLocation.buildingId
    • workingLocationProperties.officeLocation.deskId
    • workingLocationProperties.officeLocation.label
    • workingLocationProperties.customLocation.label These search terms also match predefined keywords against all display title translations of working location, out-of-office, and focus-time events. For example, searching for "Office" or "Bureau" returns working location events of type officeLocation, whereas searching for "Out of office" or "Abwesend" returns out-of-office events. Optional.
  • shared_extended_property (Array<String>, String) (defaults to: nil)

    Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False.

  • show_hidden_invitations (Boolean) (defaults to: nil)

    Whether to include hidden invitations in the result. Optional. The default is False.

  • single_events (Boolean) (defaults to: nil)

    Whether to expand recurring events into instances and only return single one- off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. These are:

    • iCalUID
    • orderBy
    • privateExtendedProperty
    • q
    • sharedExtendedProperty
    • timeMin
    • timeMax
    • updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.
  • time_max (DateTime) (defaults to: nil)

    Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06- 03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin.

  • time_min (DateTime) (defaults to: nil)

    Lower bound (exclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06- 03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax.

  • time_zone (String) (defaults to: nil)

    Time zone used in the response. Optional. The default is the time zone of the calendar.

  • updated_min (DateTime) (defaults to: nil)

    Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
# File 'lib/google/apis/calendar_v3/service.rb', line 1486

def list_events(calendar_id, always_include_email: nil, event_types: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'calendars/{calendarId}/events', options)
  command.response_representation = Google::Apis::CalendarV3::Events::Representation
  command.response_class = Google::Apis::CalendarV3::Events
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
  command.query['eventTypes'] = event_types unless event_types.nil?
  command.query['iCalUID'] = i_cal_uid unless i_cal_uid.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['privateExtendedProperty'] = private_extended_property unless private_extended_property.nil?
  command.query['q'] = q unless q.nil?
  command.query['sharedExtendedProperty'] = shared_extended_property unless shared_extended_property.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['showHiddenInvitations'] = show_hidden_invitations unless show_hidden_invitations.nil?
  command.query['singleEvents'] = single_events unless single_events.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['timeMax'] = time_max unless time_max.nil?
  command.query['timeMin'] = time_min unless time_min.nil?
  command.query['timeZone'] = time_zone unless time_zone.nil?
  command.query['updatedMin'] = updated_min unless updated_min.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_settings(max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Settings

Returns all user settings for the authenticated user.

Parameters:

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
# File 'lib/google/apis/calendar_v3/service.rb', line 2033

def list_settings(max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'users/me/settings', options)
  command.response_representation = Google::Apis::CalendarV3::Settings::Representation
  command.response_class = Google::Apis::CalendarV3::Settings
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#move_event(calendar_id, event_id, destination, send_notifications: nil, send_updates: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; birthday, focusTime, fromGmail, outOfOffice and workingLocation events cannot be moved.

Parameters:

  • calendar_id (String)

    Calendar identifier of the source calendar where the event currently is on.

  • event_id (String)

    Event identifier.

  • destination (String)

    Calendar identifier of the target calendar where the event is to be moved to.

  • send_notifications (Boolean) (defaults to: nil)

    Deprecated. Please use sendUpdates instead. Whether to send notifications about the change of the event's organizer. Note that some emails might still be sent even if you set the value to false. The default is false.

  • send_updates (String) (defaults to: nil)

    Guests who should receive notifications about the change of the event's organizer.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'lib/google/apis/calendar_v3/service.rb', line 1551

def move_event(calendar_id, event_id, destination, send_notifications: nil, send_updates: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/events/{eventId}/move', options)
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['eventId'] = event_id unless event_id.nil?
  command.query['destination'] = destination unless destination.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['sendUpdates'] = send_updates unless send_updates.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_acl(calendar_id, rule_id, acl_rule_object = nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::AclRule

Updates an access control rule. This method supports patch semantics.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • rule_id (String)

    ACL rule identifier.

  • acl_rule_object (Google::Apis::CalendarV3::AclRule) (defaults to: nil)
  • send_notifications (Boolean) (defaults to: nil)

    Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/google/apis/calendar_v3/service.rb', line 263

def patch_acl(calendar_id, rule_id, acl_rule_object = nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'calendars/{calendarId}/acl/{ruleId}', options)
  command.request_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.request_object = acl_rule_object
  command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.response_class = Google::Apis::CalendarV3::AclRule
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['ruleId'] = rule_id unless rule_id.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Calendar

Updates metadata for a calendar. This method supports patch semantics.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • calendar_object (Google::Apis::CalendarV3::Calendar) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/google/apis/calendar_v3/service.rb', line 891

def patch_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'calendars/{calendarId}', options)
  command.request_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.request_object = calendar_object
  command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.response_class = Google::Apis::CalendarV3::Calendar
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::CalendarListEntry

Updates an existing calendar on the user's calendar list. This method supports patch semantics.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • calendar_list_entry_object (Google::Apis::CalendarV3::CalendarListEntry) (defaults to: nil)
  • color_rgb_format (Boolean) (defaults to: nil)

    Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/google/apis/calendar_v3/service.rb', line 592

def patch_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'users/me/calendarList/{calendarId}', options)
  command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.request_object = calendar_list_entry_object
  command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.response_class = Google::Apis::CalendarV3::CalendarListEntry
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_event(calendar_id, event_id, event_object = nil, always_include_email: nil, conference_data_version: nil, event_label_version: nil, max_attendees: nil, send_notifications: nil, send_updates: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Updates an event. This method supports patch semantics.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_id (String)

    Event identifier.

  • event_object (Google::Apis::CalendarV3::Event) (defaults to: nil)
  • always_include_email (Boolean) (defaults to: nil)

    Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).

  • conference_data_version (Fixnum) (defaults to: nil)

    Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.

  • event_label_version (Fixnum) (defaults to: nil)

    Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color management. Version 1 enables support for event labels, and processes the eventLabelId in the event's body. In this case, the colorId field is ignored. The default is 0.

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • send_notifications (Boolean) (defaults to: nil)

    Deprecated. Please use sendUpdates instead. Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.

  • send_updates (String) (defaults to: nil)

    Guests who should receive notifications about the event update (for example, title changes, etc.).

  • supports_attachments (Boolean) (defaults to: nil)

    Whether API client performing operation supports event attachments. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
# File 'lib/google/apis/calendar_v3/service.rb', line 1624

def patch_event(calendar_id, event_id, event_object = nil, always_include_email: nil, conference_data_version: nil, event_label_version: nil, max_attendees: nil, send_notifications: nil, send_updates: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'calendars/{calendarId}/events/{eventId}', options)
  command.request_representation = Google::Apis::CalendarV3::Event::Representation
  command.request_object = event_object
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['eventId'] = event_id unless event_id.nil?
  command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
  command.query['conferenceDataVersion'] = conference_data_version unless conference_data_version.nil?
  command.query['eventLabelVersion'] = event_label_version unless event_label_version.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['sendUpdates'] = send_updates unless send_updates.nil?
  command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#query_freebusy(free_busy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::FreeBusyResponse

Returns free/busy information for a set of calendars.

Parameters:

  • free_busy_request_object (Google::Apis::CalendarV3::FreeBusyRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
# File 'lib/google/apis/calendar_v3/service.rb', line 1954

def query_freebusy(free_busy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'freeBusy', options)
  command.request_representation = Google::Apis::CalendarV3::FreeBusyRequest::Representation
  command.request_object = free_busy_request_object
  command.response_representation = Google::Apis::CalendarV3::FreeBusyResponse::Representation
  command.response_class = Google::Apis::CalendarV3::FreeBusyResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#quick_add_event(calendar_id, text, send_notifications: nil, send_updates: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Creates an event based on a simple text string.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • text (String)

    The text describing the event to be created.

  • send_notifications (Boolean) (defaults to: nil)

    Deprecated. Please use sendUpdates instead. Whether to send notifications about the creation of the event. Note that some emails might still be sent even if you set the value to false. The default is false.

  • send_updates (String) (defaults to: nil)

    Guests who should receive notifications about the creation of the new event.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
# File 'lib/google/apis/calendar_v3/service.rb', line 1678

def quick_add_event(calendar_id, text, send_notifications: nil, send_updates: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/events/quickAdd', options)
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['sendUpdates'] = send_updates unless send_updates.nil?
  command.query['text'] = text unless text.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Stop watching resources through this channel

Parameters:

  • channel_object (Google::Apis::CalendarV3::Channel) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'lib/google/apis/calendar_v3/service.rb', line 1010

def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'channels/stop', options)
  command.request_representation = Google::Apis::CalendarV3::Channel::Representation
  command.request_object = channel_object
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#transfer_calendar_ownership(calendar_id, new_data_owner, use_admin_access, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Transfers a secondary calendar between users within a Google Workspace organization. Requires user authentication with Manage Calendars administrator privilege, and one of the following authorization scopes:

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs, call the calendarList.list method.

  • new_data_owner (String)

    The email address of a user who will become the data owner of the calendar.

  • use_admin_access (Boolean)

    When true, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the Manage Calendars privilege. This method currently only supports admin access, thus only true is accepted for this field.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



940
941
942
943
944
945
946
947
948
949
# File 'lib/google/apis/calendar_v3/service.rb', line 940

def transfer_calendar_ownership(calendar_id, new_data_owner, use_admin_access, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/transferOwnership', options)
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['newDataOwner'] = new_data_owner unless new_data_owner.nil?
  command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_acl(calendar_id, rule_id, acl_rule_object = nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::AclRule

Updates an access control rule.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • rule_id (String)

    ACL rule identifier.

  • acl_rule_object (Google::Apis::CalendarV3::AclRule) (defaults to: nil)
  • send_notifications (Boolean) (defaults to: nil)

    Whether to send notifications about the calendar sharing change. Note that there are no notifications on access removal. Optional. The default is True.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/google/apis/calendar_v3/service.rb', line 308

def update_acl(calendar_id, rule_id, acl_rule_object = nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'calendars/{calendarId}/acl/{ruleId}', options)
  command.request_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.request_object = acl_rule_object
  command.response_representation = Google::Apis::CalendarV3::AclRule::Representation
  command.response_class = Google::Apis::CalendarV3::AclRule
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['ruleId'] = rule_id unless rule_id.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Calendar

Updates metadata for a calendar.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • calendar_object (Google::Apis::CalendarV3::Calendar) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



976
977
978
979
980
981
982
983
984
985
986
987
# File 'lib/google/apis/calendar_v3/service.rb', line 976

def update_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'calendars/{calendarId}', options)
  command.request_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.request_object = calendar_object
  command.response_representation = Google::Apis::CalendarV3::Calendar::Representation
  command.response_class = Google::Apis::CalendarV3::Calendar
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::CalendarListEntry

Updates an existing calendar on the user's calendar list.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • calendar_list_entry_object (Google::Apis::CalendarV3::CalendarListEntry) (defaults to: nil)
  • color_rgb_format (Boolean) (defaults to: nil)

    Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/google/apis/calendar_v3/service.rb', line 636

def update_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'users/me/calendarList/{calendarId}', options)
  command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.request_object = calendar_list_entry_object
  command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation
  command.response_class = Google::Apis::CalendarV3::CalendarListEntry
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_event(calendar_id, event_id, event_object = nil, always_include_email: nil, conference_data_version: nil, event_label_version: nil, max_attendees: nil, send_notifications: nil, send_updates: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Event

Updates an event.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • event_id (String)

    Event identifier.

  • event_object (Google::Apis::CalendarV3::Event) (defaults to: nil)
  • always_include_email (Boolean) (defaults to: nil)

    Deprecated and ignored. A value will always be returned in the email field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).

  • conference_data_version (Fixnum) (defaults to: nil)

    Version number of conference data supported by the API client. Version 0 assumes no conference data support and ignores conference data in the event's body. Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. The default is 0.

  • event_label_version (Fixnum) (defaults to: nil)

    Version number of the event label feature supported by the API client. Version 0 assumes no event label support and processes the colorId field for color management. Version 1 enables support for event labels, and processes the eventLabelId in the event's body. In this case, the colorId field is ignored. The default is 0.

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • send_notifications (Boolean) (defaults to: nil)

    Deprecated. Please use sendUpdates instead. Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to false. The default is false.

  • send_updates (String) (defaults to: nil)

    Guests who should receive notifications about the event update (for example, title changes, etc.).

  • supports_attachments (Boolean) (defaults to: nil)

    Whether API client performing operation supports event attachments. Optional. The default is False.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
# File 'lib/google/apis/calendar_v3/service.rb', line 1750

def update_event(calendar_id, event_id, event_object = nil, always_include_email: nil, conference_data_version: nil, event_label_version: nil, max_attendees: nil, send_notifications: nil, send_updates: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'calendars/{calendarId}/events/{eventId}', options)
  command.request_representation = Google::Apis::CalendarV3::Event::Representation
  command.request_object = event_object
  command.response_representation = Google::Apis::CalendarV3::Event::Representation
  command.response_class = Google::Apis::CalendarV3::Event
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.params['eventId'] = event_id unless event_id.nil?
  command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
  command.query['conferenceDataVersion'] = conference_data_version unless conference_data_version.nil?
  command.query['eventLabelVersion'] = event_label_version unless event_label_version.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['sendNotifications'] = send_notifications unless send_notifications.nil?
  command.query['sendUpdates'] = send_updates unless send_updates.nil?
  command.query['supportsAttachments'] = supports_attachments unless supports_attachments.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_acl(calendar_id, channel_object = nil, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Channel

Watch for changes to ACL resources.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • channel_object (Google::Apis::CalendarV3::Channel) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)

    Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All entries deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/google/apis/calendar_v3/service.rb', line 368

def watch_acl(calendar_id, channel_object = nil, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/acl/watch', options)
  command.request_representation = Google::Apis::CalendarV3::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::CalendarV3::Channel::Representation
  command.response_class = Google::Apis::CalendarV3::Channel
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_calendar_list(channel_object = nil, max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, show_own_organization_only: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Channel

Watch for changes to CalendarList resources.

Parameters:

  • channel_object (Google::Apis::CalendarV3::Channel) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)

    Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

  • min_access_role (String) (defaults to: nil)

    The minimum access role for the user in the returned entries. Optional. The default is no restriction.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted calendar list entries in the result. Optional. The default is False.

  • show_hidden (Boolean) (defaults to: nil)

    Whether to show hidden entries. Optional. The default is False.

  • show_own_organization_only (Boolean) (defaults to: nil)

    Whether to show only entries for calendars from the organization. This parameter is only applicable to Google Workspace users. Optional. The default is False.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If only read-only fields such as calendar properties or ACLs have changed, the entry won't be returned. All entries deleted and hidden since the previous list request will always be in the result set and it is not allowed to set showDeleted neither showHidden to False. To ensure client state consistency minAccessRole and showOwnOrganizationOnly query parameters cannot be specified together with nextSyncToken. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
# File 'lib/google/apis/calendar_v3/service.rb', line 703

def watch_calendar_list(channel_object = nil, max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, show_own_organization_only: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'users/me/calendarList/watch', options)
  command.request_representation = Google::Apis::CalendarV3::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::CalendarV3::Channel::Representation
  command.response_class = Google::Apis::CalendarV3::Channel
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['minAccessRole'] = min_access_role unless min_access_role.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['showHidden'] = show_hidden unless show_hidden.nil?
  command.query['showOwnOrganizationOnly'] = show_own_organization_only unless show_own_organization_only.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_event(calendar_id, channel_object = nil, always_include_email: nil, event_types: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Channel

Watch for changes to Events resources.

Parameters:

  • calendar_id (String)

    Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

  • channel_object (Google::Apis::CalendarV3::Channel) (defaults to: nil)
  • always_include_email (Boolean) (defaults to: nil)

    Deprecated and ignored.

  • event_types (Array<String>, String) (defaults to: nil)

    Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.

  • i_cal_uid (String) (defaults to: nil)

    Specifies an event ID in the iCalendar format to be provided in the response. Optional. Use this if you want to search for an event by its iCalendar ID.

  • max_attendees (Fixnum) (defaults to: nil)

    The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non- empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional.

  • order_by (String) (defaults to: nil)

    The order of the events returned in the result. Optional. The default is an unspecified, stable order.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • private_extended_property (Array<String>, String) (defaults to: nil)

    Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints.

  • q (String) (defaults to: nil)

    Free text search terms to find events that match these terms in the following fields:

    • summary
    • description
    • location
    • attendee's displayName
    • attendee's email
    • organizer's displayName
    • organizer's email
    • workingLocationProperties.officeLocation.buildingId
    • workingLocationProperties.officeLocation.deskId
    • workingLocationProperties.officeLocation.label
    • workingLocationProperties.customLocation.label These search terms also match predefined keywords against all display title translations of working location, out-of-office, and focus-time events. For example, searching for "Office" or "Bureau" returns working location events of type officeLocation, whereas searching for "Out of office" or "Abwesend" returns out-of-office events. Optional.
  • shared_extended_property (Array<String>, String) (defaults to: nil)

    Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints.

  • show_deleted (Boolean) (defaults to: nil)

    Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False.

  • show_hidden_invitations (Boolean) (defaults to: nil)

    Whether to include hidden invitations in the result. Optional. The default is False.

  • single_events (Boolean) (defaults to: nil)

    Whether to expand recurring events into instances and only return single one- off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False. There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state. These are:

    • iCalUID
    • orderBy
    • privateExtendedProperty
    • q
    • sharedExtendedProperty
    • timeMin
    • timeMax
    • updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.
  • time_max (DateTime) (defaults to: nil)

    Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06- 03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin.

  • time_min (DateTime) (defaults to: nil)

    Lower bound (exclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06- 03T10:00:00Z. Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax.

  • time_zone (String) (defaults to: nil)

    Time zone used in the response. Optional. The default is the time zone of the calendar.

  • updated_min (DateTime) (defaults to: nil)

    Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
# File 'lib/google/apis/calendar_v3/service.rb', line 1902

def watch_event(calendar_id, channel_object = nil, always_include_email: nil, event_types: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'calendars/{calendarId}/events/watch', options)
  command.request_representation = Google::Apis::CalendarV3::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::CalendarV3::Channel::Representation
  command.response_class = Google::Apis::CalendarV3::Channel
  command.params['calendarId'] = calendar_id unless calendar_id.nil?
  command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil?
  command.query['eventTypes'] = event_types unless event_types.nil?
  command.query['iCalUID'] = i_cal_uid unless i_cal_uid.nil?
  command.query['maxAttendees'] = max_attendees unless max_attendees.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['privateExtendedProperty'] = private_extended_property unless private_extended_property.nil?
  command.query['q'] = q unless q.nil?
  command.query['sharedExtendedProperty'] = shared_extended_property unless shared_extended_property.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['showHiddenInvitations'] = show_hidden_invitations unless show_hidden_invitations.nil?
  command.query['singleEvents'] = single_events unless single_events.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['timeMax'] = time_max unless time_max.nil?
  command.query['timeMin'] = time_min unless time_min.nil?
  command.query['timeZone'] = time_zone unless time_zone.nil?
  command.query['updatedMin'] = updated_min unless updated_min.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_setting(channel_object = nil, max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CalendarV3::Channel

Watch for changes to Settings resources.

Parameters:

  • channel_object (Google::Apis::CalendarV3::Channel) (defaults to: nil)
  • max_results (Fixnum) (defaults to: nil)

    Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional.

  • page_token (String) (defaults to: nil)

    Token specifying which result page to return. Optional.

  • sync_token (String) (defaults to: nil)

    Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken. Learn more about incremental synchronization. Optional. The default is to return all entries.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
# File 'lib/google/apis/calendar_v3/service.rb', line 2081

def watch_setting(channel_object = nil, max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'users/me/settings/watch', options)
  command.request_representation = Google::Apis::CalendarV3::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::CalendarV3::Channel::Representation
  command.response_class = Google::Apis::CalendarV3::Channel
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['syncToken'] = sync_token unless sync_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end