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.a0AQQ_BDTgQbn9c5rXhPK3FCakms_7oKkdIWE1CCQFnSPftb2RxvloVqnYOcnsAKhXrD0Gq8Tz2Kgn5IBXG5E25uksZfvvTtXob-jFcuj_9LZYs9La4HrcFk766...";
Calendar = "a9168079abee0b7314a77e16ec7ada0ae393cdd389a6f4a8d3f4501aa958f8e9@group.calendar.google.com";

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