Документация VK Teams
BIN
docs/docusaurus/static/img/APIs/VKTeams.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
docs/docusaurus/static/img/APIs/small/VKTeams.png
Normal file
After Width: | Height: | Size: 1012 B |
BIN
docs/docusaurus/static/img/Docs/VKTeams/1.png
Normal file
After Width: | Height: | Size: 42 KiB |
1
docs/docusaurus/static/img/Docs/VKTeams/1.txt
Normal file
@@ -0,0 +1 @@
|
||||
https://teams.vk.com/profile/1011893356
|
BIN
docs/docusaurus/static/img/Docs/VKTeams/2.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
docs/docusaurus/static/img/Docs/VKTeams/3.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
docs/docusaurus/static/img/Docs/VKTeams/4.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
docs/docusaurus/static/img/Docs/VKTeams/5.png
Normal file
After Width: | Height: | Size: 164 KiB |
41
docs/en/md/Instructions/VKTeams.md
Normal 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)
|
||||

|
||||
|
||||
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
|
||||

|
||||
|
||||
3. Start a dialog with [@metabot](http://teams.vk.com/profile/70001) and follow the procedure to create a new bot
|
||||

|
||||
|
||||
4. Generate a new **token** and enable the ability to add the bot to a group (if necessary)
|
||||

|
||||
|
||||
5. Save the bot ID by retrieving it using the "Show My Bots" button
|
||||

|
||||
|
||||
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)
|
||||

|
36
docs/en/md/VKTeams/Common-methods/Check-token.md
Normal 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%
|
||||
|
||||
```
|
||||
|
||||
|
38
docs/en/md/VKTeams/Common-methods/Get-events.md
Normal 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%
|
||||
|
||||
```
|
||||
|
||||
|
4
docs/en/md/VKTeams/Common-methods/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Common methods",
|
||||
"position": "2"
|
||||
}
|
43
docs/en/md/VKTeams/Message-sending/Send-text-message.md
Normal 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%
|
||||
|
||||
```
|
||||
|
||||
|
4
docs/en/md/VKTeams/Message-sending/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Message sending",
|
||||
"position": "3"
|
||||
}
|
@@ -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'}]},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
1
docs/ru/cli/VKTeams/ОтправитьТекстовоеСообщение.txt
Normal file
@@ -0,0 +1 @@
|
||||
oint vkteams ОтправитьТекстовоеСообщение --token %token% --chatid %chatid% --text %text% --reply %reply% --keyboard %keyboard% --parsemod %parsemod%
|
1
docs/ru/cli/VKTeams/ПолучитьСобытия.txt
Normal file
@@ -0,0 +1 @@
|
||||
oint vkteams ПолучитьСобытия --token %token% --last %last% --timeout %timeout%
|
1
docs/ru/cli/VKTeams/ПроверитьТокен.txt
Normal file
@@ -0,0 +1 @@
|
||||
oint vkteams ПроверитьТокен --token %token%
|
41
docs/ru/md/Instructions/VKTeams.md
Normal 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)
|
||||

|
||||
|
||||
2. Войдите в приложении при помощи одноразового пароля, который должен прийти на почту. Просмотреть почту необходимого пользователя можно в панели администрирования
|
||||

|
||||
|
||||
3. Начните диалог с [@metabot](http://teams.vk.com/profile/70001) и пройдите процедуру создания нового бота
|
||||

|
||||
|
||||
4. Сгенерируйте новый **токен** и включите возможность добавлять бота в группу (если необходимо)
|
||||

|
||||
|
||||
5. Сохраните ID бота, получив его при помощи кнопки "Показать моих ботов"
|
||||

|
||||
|
||||
6. Сформируйте ссылку и перейдите по ней в браузере
|
||||
|
||||
```
|
||||
|
||||
На конце URL должен быть ваш ID бота
|
||||
https://teams.vk.com/profile/1234567890
|
||||
|
||||
```
|
||||
|
||||
7. Начните диалог с ботом
|
||||
|
||||
Теперь вы сможете добавлять бота в группы и управлять им при помощи **Токена** и **ID необходимого диалога** (группы или пользователя)
|
||||

|
36
docs/ru/md/VKTeams/Common-methods/Check-token.md
Normal 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%
|
||||
|
||||
```
|
||||
|
||||
|
38
docs/ru/md/VKTeams/Common-methods/Get-events.md
Normal 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%
|
||||
|
||||
```
|
||||
|
||||
|
4
docs/ru/md/VKTeams/Common-methods/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Общие методы",
|
||||
"position": "2"
|
||||
}
|
43
docs/ru/md/VKTeams/Message-sending/Send-text-message.md
Normal 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%
|
||||
|
||||
```
|
||||
|
||||
|
4
docs/ru/md/VKTeams/Message-sending/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Отправка сообщений",
|
||||
"position": "3"
|
||||
}
|
@@ -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'}]},
|
||||
],
|
||||
},
|
||||
{
|
||||
|