Create calendar
Creates an empty calendar
- Parameters
- Advanced call ?
Function CreateCalendar(Val Token, Val Name) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| Name | --title | String | ✔ | Name of the created calendar |
Returns
Map Of KeyAndValue - serialized JSON response from Google
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "ya29.a0AT3oNZ89Gfvy6_DUg_tviJJnmBXSmGRrPL6Vym5gPCsPQEa3F606plSWJttyabLz5gHJY63An6XG9wKNlbVK4fkTSF_KNhqT5M6IGUm8THO6IWF0iGzg5z2SO...";
Name = "TestCalendar";
Result = OPI_GoogleCalendar.CreateCalendar(Token, Name);
- Bash
- CMD/Bat
oint gcalendar CreateCalendar \
--token "***" \
--title "TestCalendar"
oint gcalendar CreateCalendar ^
--token "***" ^
--title "TestCalendar"
Result
{
"kind": "calendar#calendar",
"etag": "\"Y38cVVIbUqRH-diLHoSDJFFp6dw\"",
"id": "22de81b2753934fc237d22032440576799c1bd66f90a04866bca3b785dd4340e@group.calendar.google.com",
"summary": "TestCalendar",
"timeZone": "Europe/Moscow",
"dataOwner": "bayselonarrend@gmail.com",
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
},
"labelProperties": {
"eventLabels": [
{
"id": "0e8239c7-dd10-48a9-9e23-4e7a90060ab5",
"backgroundColor": "#a79b8e"
},
{
"id": "120454de-7a4d-47a6-bcfe-94605205d2f2",
"backgroundColor": "#33b679"
},
{
"id": "166e8165-05e2-4a6c-a9c8-a13e341e8655",
"backgroundColor": "#795548"
},
{
"id": "1815bcc7-452d-4721-b09e-b219f729a835",
"backgroundColor": "#c0ca33"
},
{
"id": "1af4b6ea-8419-4279-a428-fd583ab38c19",
"backgroundColor": "#7cb342"
},
{
"id": "1c474656-5da9-42ea-ac15-96a40a3f9928",
"backgroundColor": "#b39ddb"
},
{
"id": "25c352a2-8845-4393-9e04-f68507fa50ae",
"backgroundColor": "#8e24aa"
},
{
"id": "3a1d0054-fec9-4e22-af20-0e040cd0259c",
"backgroundColor": "#ef6c00"
},
{
"id": "3c1bb42a-1dc9-488a-a0e1-18309d2b5c96",
"backgroundColor": "#0b8043"
},
{
"id": "49d11ef0-4d50-48b3-bffb-c4c2be52a810",
"backgroundColor": "#d50000"
},
{
"id": "4ecbf64c-297c-48fe-8dbe-57270fd2d6dc",
"backgroundColor": "#616161"
},
{
"id": "7aaaa162-8966-4097-8376-d8f80389140e",
"backgroundColor": "#039be5"
},
{
"id": "a41625e2-9673-48ef-9e46-c107a398ce99",
"backgroundColor": "#f4511e"
},
{
"id": "a9e2e745-73cc-49e2-9603-05c226b3731a",
"backgroundColor": "#e67c73"
},
{
"id": "ad8f5dbe-3636-4d24-91b1-cc1e981a45b6",
"backgroundColor": "#9e69af"
},
{
"id": "b2e80354-f7b7-48cb-8424-6d3061fb0574",
"backgroundColor": "#4285f4"
},
{
"id": "be7c0607-5aac-49e3-8762-2bc528c78a3d",
"backgroundColor": "#f09300"
},
{
"id": "cc33103f-0a85-4810-85e5-b5834e3f4d6f",
"backgroundColor": "#3f51b5"
},
{
"id": "cccc4a8e-977f-49a6-9903-1fdf76519a8d",
"backgroundColor": "#009688"
},
{
"id": "d68150b2-f444-47f2-8c78-2785c775107c",
"backgroundColor": "#e4c441"
},
{
"id": "e36353cc-d265-4a98-a3fc-5dfebac3cbbd",
"backgroundColor": "#7986cb"
},
{
"id": "ec6cc9fe-f224-4e43-b130-02437a1324a2",
"backgroundColor": "#d81b60"
},
{
"id": "faea755e-58ea-4b0c-a73e-29c73476bca5",
"backgroundColor": "#f6bf26"
},
{
"id": "fe0ce42f-33c3-4d57-ac02-9b93da7e678a",
"backgroundColor": "#ad1457"
}
]
}
}