Show / Hide Table of Contents

Class CalendarsResource

The "calendars" collection of methods.

Inheritance
object
CalendarsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Calendar.v3
Assembly: Google.Apis.Calendar.v3.dll
Syntax
public class CalendarsResource

Constructors

CalendarsResource(IClientService)

Constructs a new resource.

Declaration
public CalendarsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Clear(string)

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

Declaration
public virtual CalendarsResource.ClearRequest Clear(string calendarId)
Parameters
Type Name Description
string calendarId

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.

Returns
Type Description
CalendarsResource.ClearRequest

Delete(string)

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

Declaration
public virtual CalendarsResource.DeleteRequest Delete(string calendarId)
Parameters
Type Name Description
string calendarId

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.

Returns
Type Description
CalendarsResource.DeleteRequest

Get(string)

Returns metadata for a calendar.

Declaration
public virtual CalendarsResource.GetRequest Get(string calendarId)
Parameters
Type Name Description
string calendarId

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.

Returns
Type Description
CalendarsResource.GetRequest

Insert(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.

Declaration
public virtual CalendarsResource.InsertRequest Insert(Calendar body)
Parameters
Type Name Description
Calendar body

The body of the request.

Returns
Type Description
CalendarsResource.InsertRequest

Patch(Calendar, string)

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

Declaration
public virtual CalendarsResource.PatchRequest Patch(Calendar body, string calendarId)
Parameters
Type Name Description
Calendar body

The body of the request.

string calendarId

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.

Returns
Type Description
CalendarsResource.PatchRequest

TransferOwnership(string, string, bool)

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:

  • https://www.googleapis.com/auth/calendar - https://www.googleapis.com/auth/calendar.calendars In the request, set useAdminAccess to true. The secondary calendar must be active to be transferred. Transferring disabled or deleted calendars isn't supported.
Declaration
public virtual CalendarsResource.TransferOwnershipRequest TransferOwnership(string calendarId, string newDataOwner, bool useAdminAccess)
Parameters
Type Name Description
string calendarId

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

string newDataOwner

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

bool useAdminAccess

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.

Returns
Type Description
CalendarsResource.TransferOwnershipRequest

Update(Calendar, string)

Updates metadata for a calendar.

Declaration
public virtual CalendarsResource.UpdateRequest Update(Calendar body, string calendarId)
Parameters
Type Name Description
Calendar body

The body of the request.

string calendarId

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.

Returns
Type Description
CalendarsResource.UpdateRequest
In this article
Back to top Generated by DocFX