1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-08-13 20:05:19 +02:00

Документация VK Teams

This commit is contained in:
Anton Titovets
2024-08-09 16:14:13 +03:00
parent 0d38b205f5
commit ca07245f04
39 changed files with 4794 additions and 4386 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1 @@
https://teams.vk.com/profile/1011893356

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

View File

@@ -0,0 +1,41 @@
---
id: VKTeams
sidebar_class_name: VKTeams
---
<img src={require('../../static/img/APIs/VKTeams.png').default} width='64px' />
# VK Teams
This section is dedicated to the library for working with VK Teams API. On this page, all the steps necessary to start working are described
## Getting started
1. Register, book a tariff and download the VK Teams app [on the home page](https://biz.mail.ru/teams)
![BF](../../static/img/Docs/VKTeams/5.png)
2. Log in to the application using the one-time password that should arrive in the mail. You can view the mail of the required user in the administration panel
![BF](../../static/img/Docs/VKTeams/6.png)
3. Start a dialog with [@metabot](http://teams.vk.com/profile/70001) and follow the procedure to create a new bot
![BF](../../static/img/Docs/VKTeams/1.png)
4. Generate a new **token** and enable the ability to add the bot to a group (if necessary)
![BF](../../static/img/Docs/VKTeams/2.png)
5. Save the bot ID by retrieving it using the "Show My Bots" button
![BF](../../static/img/Docs/VKTeams/4.png)
6. Form a link and click on it in your browser
```
At the end of the URL should be your bot ID
https://teams.vk.com/profile/1234567890
```
7. Start a dialog with the bot
Now you will be able to add a bot to groups and control it with **Token** and **ID of the desired dialog** (group or user)
![BF](../../static/img/Docs/VKTeams/3.png)

View File

@@ -0,0 +1,36 @@
---
sidebar_position: 1
---
# Check token
Checks if the bot token is functional
`Function CheckToken(Val Token) Export`
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| Token | --token | String | Bot token |
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
<br/>
:::tip
Method at API documentation: [GET /self/get](https://teams.vk.com/botapi/#/self/get_self_get)
:::
<br/>
```sh title="CLI command example"
oint vkteams CheckToken --token %token%
```

View File

@@ -0,0 +1,38 @@
---
sidebar_position: 2
---
# Get events
Receives bot events in Polling mode
`Function GetEvents(Val Token, Val LastID, Val Timeout = 0) Export`
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| Token | --token | String | Bot token |
| LastID | --last | String, Number | ID of the last event processed before this event |
| Timeout | --timeout | String, Number | Connection hold time for Long Polling |
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
<br/>
:::tip
Method at API documentation: [GET /events/get](https://teams.vk.com/botapi/#/events/get_events_get)
:::
<br/>
```sh title="CLI command example"
oint vkteams GetEvents --token %token% --last %last% --timeout %timeout%
```

View File

@@ -0,0 +1,4 @@
{
"label": "Common methods",
"position": "2"
}

View File

@@ -0,0 +1,43 @@
---
sidebar_position: 1
---
# Send text message
Sends a text message to a chat
`Function SendTextMessage(Val Token, Val ChatID, Val Text, Val ReplyID = 0, Val Keyboard = "", Val Markup = "MarkdownV2") Export`
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| Token | --token | String | Bot token |
| ChatID | --chatid | String, Number | Chat ID for message sending |
| Text | --text | String | Message text |
| ReplyID | --reply | String, Number | Replying message id if necessary |
| Keyboard | --keyboard | Array Of String | Buttons to the message if necessary |
| Markup | --parsemod | String | Markup type for message text: MarkdownV2 or HTML |
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
<br/>
:::tip
You can mention a user by appending their userId to the text in the following format @[userId]
Method at API documentation: [GET /messages/sendText](https://teams.vk.com/botapi/#/messages/get_messages_sendText)
:::
<br/>
```sh title="CLI command example"
oint vkteams SendTextMessage --token %token% --chatid %chatid% --text %text% --reply %reply% --keyboard %keyboard% --parsemod %parsemod%
```

View File

@@ -0,0 +1,4 @@
{
"label": "Message sending",
"position": "3"
}

View File

@@ -17,6 +17,7 @@
{ type: 'category', link: {type: 'doc', id:'Instructions/Telegram'}, label: 'Telegram', className: 'Telegram', items:[{type: 'autogenerated', dirName: 'Telegram'}]},
{ type: 'category', link: {type: 'doc', id:'Instructions/Viber'}, label: 'Viber', className: 'Viber', items:[{type: 'autogenerated', dirName: 'Viber'}]},
{ type: 'category', link: {type: 'doc', id:'Instructions/Slack'}, label: 'Slack', className: 'Slack', items:[{type: 'autogenerated', dirName: 'Slack'}]},
{ type: 'category', link: {type: 'doc', id:'Instructions/VKTeams'}, label: 'VK Teams', className: 'VKTeams', items:[{type: 'autogenerated', dirName: 'VKTeams'}]},
],
},
{

View File

@@ -0,0 +1 @@
oint vkteams ОтправитьТекстовоеСообщение --token %token% --chatid %chatid% --text %text% --reply %reply% --keyboard %keyboard% --parsemod %parsemod%

View File

@@ -0,0 +1 @@
oint vkteams ПолучитьСобытия --token %token% --last %last% --timeout %timeout%

View File

@@ -0,0 +1 @@
oint vkteams ПроверитьТокен --token %token%

View File

@@ -0,0 +1,41 @@
---
id: VKTeams
sidebar_class_name: VKTeams
---
<img src={require('../../static/img/APIs/VKTeams.png').default} width='64px' />
# VK Teams
Этот раздел посвящен библиотеке для работы с VK Teams API. На данной странице описаны все действия, необходимые для полноценного начала работы
## Начало работы
1. Зарегистрируйтесь, оформите тариф и скачайте приложение VK Teams [на главной странице](https://biz.mail.ru/teams)
![BF](../../static/img/Docs/VKTeams/5.png)
2. Войдите в приложении при помощи одноразового пароля, который должен прийти на почту. Просмотреть почту необходимого пользователя можно в панели администрирования
![BF](../../static/img/Docs/VKTeams/6.png)
3. Начните диалог с [@metabot](http://teams.vk.com/profile/70001) и пройдите процедуру создания нового бота
![BF](../../static/img/Docs/VKTeams/1.png)
4. Сгенерируйте новый **токен** и включите возможность добавлять бота в группу (если необходимо)
![BF](../../static/img/Docs/VKTeams/2.png)
5. Сохраните ID бота, получив его при помощи кнопки "Показать моих ботов"
![BF](../../static/img/Docs/VKTeams/4.png)
6. Сформируйте ссылку и перейдите по ней в браузере
```
На конце URL должен быть ваш ID бота
https://teams.vk.com/profile/1234567890
```
7. Начните диалог с ботом
Теперь вы сможете добавлять бота в группы и управлять им при помощи **Токена** и **ID необходимого диалога** (группы или пользователя)
![BF](../../static/img/Docs/VKTeams/3.png)

View File

@@ -0,0 +1,36 @@
---
sidebar_position: 1
---
# Проверить токен
Проверяет работоспособность токена бота
`Функция ПроверитьТокен(Знач Токен) Экспорт`
| Параметр | CLI опция | Тип | Назначение |
|-|-|-|-|
| Токен | --token | Строка | Токен бота |
Возвращаемое значение: Соответствие Из КлючИЗначение - сериализованный JSON ответа от VK Teams
<br/>
:::tip
Метод в документации API: [GET /self/get](https://teams.vk.com/botapi/#/self/get_self_get)
:::
<br/>
```sh title="Пример команды CLI"
oint vkteams ПроверитьТокен --token %token%
```

View File

@@ -0,0 +1,38 @@
---
sidebar_position: 2
---
# Получить события
Получает события бота в Polling режиме
`Функция ПолучитьСобытия(Знач Токен, Знач IDПоследнего, Знач Таймаут = 0) Экспорт`
| Параметр | CLI опция | Тип | Назначение |
|-|-|-|-|
| Токен | --token | Строка | Токен бота |
| IDПоследнего | --last | Строка, Число | ID последнего обработанного до этого события |
| Таймаут | --timeout | Строка, Число | Время удержания соединения для Long Polling |
Возвращаемое значение: Соответствие Из КлючИЗначение - сериализованный JSON ответа от VK Teams
<br/>
:::tip
Метод в документации API: [GET /events/get](https://teams.vk.com/botapi/#/events/get_events_get)
:::
<br/>
```sh title="Пример команды CLI"
oint vkteams ПолучитьСобытия --token %token% --last %last% --timeout %timeout%
```

View File

@@ -0,0 +1,4 @@
{
"label": "Общие методы",
"position": "2"
}

View File

@@ -0,0 +1,43 @@
---
sidebar_position: 1
---
# Отправить текстовое сообщение
Отправляет текстовое сообщение в чат
`Функция ОтправитьТекстовоеСообщение(Знач Токен, Знач IDЧата, Знач Текст, Знач IDЦитируемого = 0, Знач Клавиатура = "", Знач Разметка = "MarkdownV2") Экспорт`
| Параметр | CLI опция | Тип | Назначение |
|-|-|-|-|
| Токен | --token | Строка | Токен бота |
| IDЧата | --chatid | Строка, Число | ID чата для отправки сообщения |
| Текст | --text | Строка | Текст сообщения |
| IDЦитируемого | --reply | Строка, Число | ID цитируемого сообщения, если необходимо |
| Клавиатура | --keyboard | Массив Из Строка | Кнопки к сообщению, если необходимо |
| Разметка | --parsemod | Строка | Вид разметки для текста сообщения: MarkdownV2 или HTML |
Возвращаемое значение: Соответствие Из КлючИЗначение - сериализованный JSON ответа от VK Teams
<br/>
:::tip
Можно упомянуть пользователя, добавив в текст его userId в следующем формате @[userId]
Метод в документации API: [GET /messages/sendText](https://teams.vk.com/botapi/#/messages/get_messages_sendText)
:::
<br/>
```sh title="Пример команды CLI"
oint vkteams ОтправитьТекстовоеСообщение --token %token% --chatid %chatid% --text %text% --reply %reply% --keyboard %keyboard% --parsemod %parsemod%
```

View File

@@ -0,0 +1,4 @@
{
"label": "Отправка сообщений",
"position": "3"
}

View File

@@ -17,6 +17,7 @@ export default {
{ type: 'category', link: {type: 'doc', id:'Instructions/Telegram'}, label: 'Telegram', className: 'Telegram', items:[{type: 'autogenerated', dirName: 'Telegram'}]},
{ type: 'category', link: {type: 'doc', id:'Instructions/Viber'}, label: 'Viber', className: 'Viber', items:[{type: 'autogenerated', dirName: 'Viber'}]},
{ type: 'category', link: {type: 'doc', id:'Instructions/Slack'}, label: 'Slack', className: 'Slack', items:[{type: 'autogenerated', dirName: 'Slack'}]},
{ type: 'category', link: {type: 'doc', id:'Instructions/VKTeams'}, label: 'VK Teams', className: 'VKTeams', items:[{type: 'autogenerated', dirName: 'VKTeams'}]},
],
},
{