Skip to main content

Add calendar to list

Adds an existing calendar to the user's list

Function AddCalendarToList(Val Token, Val Calendar) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Calendar--calendarStringCalendar ID

Returns: Map Of KeyAndValue - serialized JSON response from Google


1C:Enterprise/OneScript code example
    Token    = "ya29.a0AZYkNZiCaf3vW8I05cl_i6pLKCRWSjff1YhC7Yi0SgLO50zysjwrX_9QPi1WejmqgGdFjcbaOJKsPO3tvT7gB712mg1gxgxiL1pCUVthx...";
Calendar = "eb6cf62ed0d8a131b78d5d654a4ec4eb828192397f987cb90f003e77804508ae@group.calendar.google.com";

Result = OPI_GoogleCalendar.AddCalendarToList(Token, Calendar);
    oint gcalendar AddCalendarToList \
--token "***" \
--calendar "9a5b22d26dd80f7b224f2d7ddf281550bad38d9666192b22e2f660467fd96b64@group.calendar.google.com"
Result
{
"kind": "calendar#calendarListEntry",
"etag": "\"1728454322437000\"",
"id": "48ff105e488eea0a588031479250116f2e769f150c2ca1274b7e79c4b057b46b@group.calendar.google.com",
"summary": "New name",
"description": "New description",
"timeZone": "Europe/Moscow",
"colorId": "4",
"backgroundColor": "#fa573c",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "owner",
"defaultReminders": [],
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}