Add calendar to list
Adds an existing calendar to the user's list
Function AddCalendarToList(Val Token, Val Calendar) Export
| Parameter | CLI option | Type | Required | Description | 
|---|---|---|---|---|
| Token | --token | String | ✔ | Token | 
| Calendar | --calendar | String | ✔ | Calendar ID | 
Returns: Map Of KeyAndValue - serialized JSON response from Google
1C:Enterprise/OneScript code example
    Token    = "ya29.a0AQQ_BDQ_0g6De1s1jLOYbrGQ43QDri_VRPre92E-_aUXJNk52_zY1j3A74665Q7FVMzsgnjqjKN14ljBwB0PlswTyjZlgxcBIDMnuqIbFLhH8Hcxc5NfKIOpS...";
    Calendar = "b2a903233c889bf449fe90dc977c5d9b43dc18e7e2116a9507d942aac260bbe5@group.calendar.google.com";
    Result = OPI_GoogleCalendar.AddCalendarToList(Token, Calendar);
- Bash
- CMD/Bat
    oint gcalendar AddCalendarToList \
     --token "***" \
     --calendar "2b77d2c5b52a4315950e5a46180ee3441f2a288a72fca92c28b28c2ed993b522@group.calendar.google.com"
    oint gcalendar AddCalendarToList ^
     --token "***" ^
     --calendar "2b77d2c5b52a4315950e5a46180ee3441f2a288a72fca92c28b28c2ed993b522@group.calendar.google.com"
Result
{
 "kind": "calendar#calendarListEntry",
 "etag": "\"1760520916301583\"",
 "id": "2b77d2c5b52a4315950e5a46180ee3441f2a288a72fca92c28b28c2ed993b522@group.calendar.google.com",
 "summary": "New name",
 "description": "New description",
 "timeZone": "Europe/Moscow",
 "colorId": "17",
 "backgroundColor": "#9a9cff",
 "foregroundColor": "#000000",
 "selected": true,
 "accessRole": "owner",
 "defaultReminders": [],
 "conferenceProperties": {
  "allowedConferenceSolutionTypes": [
   "hangoutsMeet"
  ]
 }
}