You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-12-05 22:53:35 +02:00
79 lines
2.3 KiB
Plaintext
Vendored
79 lines
2.3 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 2
|
|
description: Add calendar to list and other functions to work with Google Calendar in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Google Calendar]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# 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
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "ya29.a0AW4XtxhtghlL7aK7VhJX0jOgNWau4CUoOEDkQBr4uJEjPidCjKm-4r4l7AoJnODBt7yblowJtvv_3vETd6CulW4V5zxxPx8TTvQAMESj7...";
|
|
Calendar = "fe4bd80b7ead13d35f71c0ac29e9e95ab721e9292cb911fef6947f71ac87df84@group.calendar.google.com";
|
|
|
|
Result = OPI_GoogleCalendar.AddCalendarToList(Token, Calendar);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint gcalendar AddCalendarToList \
|
|
--token "***" \
|
|
--calendar "011d8cbafe64119ed6fd3af2b152cdb8fa5e238308392c96168cf3c2e203cca3@group.calendar.google.com"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint gcalendar AddCalendarToList ^
|
|
--token "***" ^
|
|
--calendar "011d8cbafe64119ed6fd3af2b152cdb8fa5e238308392c96168cf3c2e203cca3@group.calendar.google.com"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="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"
|
|
]
|
|
}
|
|
}
|
|
```
|