diff --git a/.gitignore b/.gitignore index 1c120d4..41f35f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,131 +1,11 @@ - -# Created by https://www.gitignore.io/api/python,visualstudiocode -# Edit at https://www.gitignore.io/?templates=python,visualstudiocode - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# pyenv -.python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -### VisualStudioCode ### -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -### VisualStudioCode Patch ### -# Ignore all local history of files -.history - -# End of https://www.gitignore.io/api/python,visualstudiocode - -### - -.vs/ -database*.json -tests +**/__pycache__ +.vscode/ *.zip -test*.py -*.log +*.log* +LP.py +*.bat +_version.py +*.svg database.json +pylama.ini +/.*venv \ No newline at end of file diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md new file mode 100644 index 0000000..d661607 --- /dev/null +++ b/CONTRIBUTE.md @@ -0,0 +1,90 @@ +# Как предложить свои изменения в коде + +1. [Регистрация на GitHub](./CONTRIBUTE.md#Регистрация-на-GitHub) ([Блиц-реквест](./CONTRIBUTE.md#Блиц-реквест)) +2. Внесение изменений в свой репозиторий + * [Первый вариант](./CONTRIBUTE.md#Вариант-1) (не требует установки никаких программ) +3. [Создание *pull request*](./CONTRIBUTE.md#Создание-pull-request) + +--- + +# Регистрация на [GitHub](https://github.com/signup) + +Переходишь по [ссылочке](https://github.com/signup), заполняешь все поля. Готово! + +Теперь нужно форкнуть репозиторий, для этого зайти на [его страницу в GitHub](https://github.com/elchinchel/ICAD) и тыкнуть кнопочку **Fork** +![](https://sun9-67.userapi.com/impg/yhZ279ZOkNrJvM4XyUQ3I-9ao3zcg8Q1VSDJ-w/PR0Rq32yUlM.jpg?size=1280x677&quality=96&sign=69567704d0782d67d9cd364b08aea8b6&type=album) + +## Блиц-реквест + +>*ЭТОТ РЕКВЕСТ НУЖЕН МНЕ ЗДЕСЬ И СЕЙЧАС!!1!* + +1. Открываешь нужный файлик в [репозитории ICAD](https://github.com/elchinchel/ICAD), тыкаешь на карандашик +![](https://sun9-51.userapi.com/impg/NMVJL4_zmSlVWkHEgLJaPmrUg7DFQaV2HrStZw/ezZI5sgZOhE.jpg?size=1280x677&quality=96&sign=4f75b1cbeab2946dafd095e7c18b1686&type=album) + +2. Вносишь изменения, описываешь их с помощью двух полей в самом низу и тыкаешь *предложить изменения* (*Propose changes*) +![](https://sun9-83.userapi.com/impg/2W_b1EotOjqkH1UNx7VqsS2vLGeVLW8LhZ6f2g/KAnyM9VBfSw.jpg?size=1280x677&quality=96&sign=cb78e624d315a68cec0cc8b3ba1074b4&type=album) + +3. ??????? + +4. Жди рассмотрения! + +## Вариант 1 + +>*Вариант, который не потребует установки каких-либо программ, всё через браузер* + +Заходишь к себе на [PythonAnywhere](https://eu.pythonanywhere.com) (или регистрируешь новый акк, если его нет) + +Если не создал ранее, создаёшь веб приложение. + +Открываешь *bash* консоль (которая у тебя уже была создана при установке вебхука) и клонируешь СВОЙ репозиторий (используешь ссылку из своего репозитория) +![](https://sun9-61.userapi.com/impg/lwa-EpeLjJik8r4Yb1JJRnFhwbz0lNEIHRu5DA/jNc0AcU-eA8.jpg?size=1280x677&quality=96&sign=5330f4818ce2374218627ffa66e6b36c&type=album) + +> **Внимание!** Если у тебя уже установлен вебхук, команда **rm** его сотрёт. Поэтому можешь использовать вместо неё команду **mv**, которая переименует старую папку с вебхуком (например, "*mv ICAD ICAD_old*") + +```bash +rm -rf ICAD +git clone ЗдесьСсылкаНаТвойРепозиторий ICAD +``` + +### Настройка **git** +1. Укажи своё имя/псевдоним и E-mail: + ```bash + git config --global user.name "Твоё Имя" + git config --global user.email "твояпочта@чёутебятам.com" + ``` + +2. Зайди на [страницу создания токенов в GitHub](https://github.com/settings/tokens) + +3. Создай токен (не забудь отметить чекбокс **repo** в списке разрешений) +![](https://sun9-68.userapi.com/impg/2UnynhTTSHZYqpFzyTMKbcRzXhFhuWuMBVSfiw/3zm4OkS8q8s.jpg?size=722x138&quality=96&sign=4c0a9657730d3c080dd2360f1275d091&type=album) +4. Сохрани полученный GitHub токен куда-нибудь (но относись к нему как к паролю, он позволяет получить доступ к твоему аккаунту) + +Начни делать, что хочешь, открывай вкладку Files, папку ICAD и редактируй код + +> Не забывай перезапускать веб-приложение после изменений (кнопка *Reload* на вкладке *Web*) + +Когда решишь, что всё готово и можно публиковать, открывай *bash* и пиши следующее: +```bash +git add * +git commit -m "Краткое описание изменений" +git push origin master-beta +``` + +Введи логин своего аккаунта GitHub и токен (да, он попросит пароль, введи вместо него [ранее полученный](./CONTRIBUTE.md#Настройка-git) токен) + +Если всё сделал правильно, твои изменения появятся в твоём репозитории GitHub и ты сможешь перейти к [следующему шагу](./CONTRIBUTE.md#Создание-pull-request) + +# Создание pull request + +Закоммитил в свой репозиторий то, что хотел? Открывай GitHub, тыкай на Contribute и Open pull request +![](https://sun9-58.userapi.com/impg/G-5bYsn1lUpjFBzTXykOs5MNulSABhs8B4Tz-g/wh4v3p71bX8.jpg?size=1280x677&quality=96&sign=583039d5b55223e70f4a3a111b57518d&type=album) + +Проверяй изменения и если всё окей, тыцкай **Create pull request** +![](https://sun9-55.userapi.com/impg/ydPS1nS01HyYHUtET6EiUTdMJfBaeDqjRhzo2A/sXxWKqqbTyQ.jpg?size=1280x677&quality=96&sign=45fea27179ee0bf3d3a8d96c89df50e3&type=album) + +![](https://sun9-42.userapi.com/impg/-aTACZ3hhoNSvTaZJBX-OcoRlF0Yl3LPMUW2fA/mNt2awNoVbY.jpg?size=1280x677&quality=96&sign=3b404b098e0f58e0079b816e4e61d824&type=album) + +## Готово! +## Можешь написать о своём крутом пулл реквесте в беседу и ждать, пока его рассмотрят + +*ещё приколы допишу потом* \ No newline at end of file diff --git a/LICENSE b/LICENSE index 3c6d029..a6175e4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,21 @@ +Copyright (c) 2020 Юрий Юшманов, Эльчин Саркаров + +Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации +(в дальнейшем именуемыми «Модификация»), безвозмездно использовать Модификацию в некоммерческих целях, +включая право на использование, копирование, изменение, слияние, публикацию, +распространение копий Модификации, при соблюдении следующих условий: + +Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части Модификации. +Модификацию запрещается использовать для получения материальной выгоды, в том числе продавать измененные копии Модификации. + +ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, +ВКЛЮЧАЯ ГАРАНТИИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ, НО НЕ ОГРАНИЧИВАЯСЬ ИМИ. +НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО КАКИМ-ЛИБО ИСКАМ, ЗА УЩЕРБ ИЛИ ПО ИНЫМ ТРЕБОВАНИЯМ, +В ТОМ ЧИСЛЕ, ПРИ ДЕЙСТВИИ КОНТРАКТА, ДЕЛИКТЕ ИЛИ ИНОЙ СИТУАЦИИ, ВОЗНИКШИМ ИЗ-ЗА ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ +ИЛИ ИНЫХ ДЕЙСТВИЙ С ДАННЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ. + +Далее приводится текст оригинальной лицензии: + MIT License Copyright (c) 2020 Yuriy Yushmanov diff --git a/README.md b/README.md index 9edb93a..3234f67 100644 --- a/README.md +++ b/README.md @@ -1,120 +1,94 @@ -# IDM - Iris Duty Manager +# IrCA Duty - дежурный Iris Chat Manager ## Содержание -1. [Вступление](https://github.com/LordRalInc/IDM#Вступление) -2. [Как установить](https://github.com/LordRalInc/IDM#Как-установить) -3. [Как обновить](https://github.com/LordRalInc/IDM#Как-обновить) -4. [Сигналы](https://github.com/LordRalInc/IDM#Сигналы) +1. [Как установить](./README.md#Как-установить) +2. [Как обновить](./README.md#Как-обновить) +3. [Сигналы](./README.md#Сигналы) +4. [Благодарности](./README.md#Благодарности) +5. [**Статья про ЛП**](http://vk.ru/@ircaduty-lp-module) -## Вступление +### [Здесь](https://vk.ru/video332619272_456239231) есть видео. + + -Этот проект есть ни что иное как Дежурный для [Iris | Чат-менеджер](https://vk.com/iris_cm). +## Как установить -С помощью Iris Callback API вы можете получать сигналы из бесед, на которые вы подписались. Это поможет вам обрабатывать информацию способом, который удобен для вас без каких-либо ограничений. +Для установки мы будем использовать сайт [pythonanywhere.com](https://www.eu.pythonanywhere.com/) -Для этого необходимо создать свой сервер, который будет принимать запросы от серверов Iris. +Переходим по [ссылке](https://www.eu.pythonanywhere.com/registration/register/beginner/), заполняем форму и нажимаем *Register* + +*(Под словами "вкладка X" далее по тексту, имеются в виду ссылки на этой панели)* +[![](https://sun9-35.userapi.com/GvwS8jmduczHApabBhlJyeJcAzhMLkFEE8Bqmw/_UZT_5jUQtk.jpg)](https://sun9-35.userapi.com/GvwS8jmduczHApabBhlJyeJcAzhMLkFEE8Bqmw/_UZT_5jUQtk.jpg) -## Как установить -Для установки мы будем использовать сайт [pythonanywhere.com](https://www.pythonanywhere.com/) -И так переходим по ссылке [pythonanywhere.com](https://www.pythonanywhere.com/registration/register/beginner/) заомлняем форму и нажимаем *Register* +Открываем вкладку *Web*\ +Кликаем на *Add a new web app*\ +В появившемся окошке *next* -> *Flask* -> *Python3.8*\ +В путь вводим /home/`имя аккаунта`/ICAD/start.py -Даллее кликаем на кнопку *Web* -Кликаем на *Add a new web app* -В появившемся окошке *next* -> *Flask* -> *Python3.7* -В путь вводим /home/`имя аккаунта`/IDM/routes.py +[![](https://sun1-88.userapi.com/7GyijrmWOq2WKYg-RqZMsZjn_5J9FAN0yTv8hA/EzO72_mIHwc.jpg)](https://sun1-88.userapi.com/7GyijrmWOq2WKYg-RqZMsZjn_5J9FAN0yTv8hA/EzO72_mIHwc.jpg) -Переходим по ссылке [pythonanywhere.com/consoles/](https://www.pythonanywhere.com/consoles/) -Ищем блок *Start a new console*, в нем выбираем *Bash* +Тыкаем на вкладку *Files*. Смотрим на картинку:\ +[![](https://sun9-79.userapi.com/impf/UxI4dBLSwiYBT_JojwqN1O6xq_I0tZSVqKvBoQ/zVjLKL9NpKc.jpg?size=777x137&quality=96&sign=fd988e120467f5046da6a4ce944947d8&type=album)](https://sun9-79.userapi.com/impf/UxI4dBLSwiYBT_JojwqN1O6xq_I0tZSVqKvBoQ/zVjLKL9NpKc.jpg?size=777x137&quality=96&sign=fd988e120467f5046da6a4ce944947d8&type=album) -После загрузки консоли набираем в консоли -```bash -rm -r IDM -git clone https://github.com/LordRalInc/IDM.git +Вставляем в открывшийся редактор следующий текст и тыкаем на кнопку **Run** +```python +import os +os.system('rm -rf ICAD') +os.system('git clone https://github.com/elchinchel/ICAD') ``` -Далее переходим во вкладку *Web* и нажимаем *Reload * `имя аккаунта`.pythonanywhere.com -Переходим по ссылке `имя аккаунта`.pythonanywhere.com/install вводим данные, нажимаем сохранить. +Далее переходим во вкладку *Web* и нажимаем на кнопку *Reload* `имя аккаунта`.eu.pythonanywhere.com -Заходим на тот аккаунт с который будет дежурным и переходим по ссылке [https://vk.me/-174105461](https://vk.me/-174105461) +Переходим по ссылке `имяаккаунта`.eu.pythonanywhere.com (ссылка над кнопкой перезагрузки) -Пишем команду -``` -+api [ваш секретный код дежурного] https://[ваше имя аккаунта].pythonanywhere.com/callback -``` -в ответ получаем +[![](https://sun9-58.userapi.com/BQNI2zd65Erkq0AU9DlMfohvqJ8id8rFZ0yx3A/UVdo0UBPYSo.jpg)](https://sun9-58.userapi.com/BQNI2zd65Erkq0AU9DlMfohvqJ8id8rFZ0yx3A/UVdo0UBPYSo.jpg) -[![](https://sun9-66.userapi.com/c200716/v200716076/5e9fa/Zn7Gk5YpZbk.jpg)](https://sun9-66.userapi.com/c200716/v200716076/5e9fa/Zn7Gk5YpZbk.jpg) +Вводим данные, нажимаем *Установить*. -Осталось в нужном чате написать `+api` и все дежурный готов и работает. +Проверяем ЛС Ириса. Если наблюдается похожая картина, все прошло успешно. -### Как создать приложение ВК -Далее переходим по ссылке [https://vk.com/editapp?act=create](https://vk.com/editapp?act=create "https://vk.com/editapp?act=create"), в поле платформа выбираем *сайт* +[![](https://sun9-30.userapi.com/sVe1HXsLTeJJAooKetexpUA2SgzebW5x04XRPQ/IiwM_MRWBdc.jpg)](https://sun9-30.userapi.com/sVe1HXsLTeJJAooKetexpUA2SgzebW5x04XRPQ/IiwM_MRWBdc.jpg) -Адрес сайта и базовый домен `https://{имя вашего аккаунта}.pythonanywhere.com` +Поздравляю, у тебя теперь есть дежурный. Подключиться к нужному чату можно, написав в нем команду `+api` -[![](https://sun9-35.userapi.com/c854028/v854028210/1f14ef/nivEJzpzMZ4.jpg)](https://sun9-35.userapi.com/c854028/v854028210/1f14ef/nivEJzpzMZ4.jpg)` - -Кликаем на *подключить сайт*. +### **Внимание!** Через три месяца на бесплатном тарифе сайт отключается! +Чтобы этого не произошло, нужно как минимум раз в три месяца заходить в аккаунт и нажимать на эту кнопку (на вкладке Web под кнопкой перезагрузки)\ +[![](https://sun9-45.userapi.com/jCRPUmhR1BziUy5dWC-9RFd6ymSU9zbNC3DgCg/AlaKKXFA_Ko.jpg)](https://sun9-45.userapi.com/jCRPUmhR1BziUy5dWC-9RFd6ymSU9zbNC3DgCg/AlaKKXFA_Ko.jpg) ## Как обновить +*".c обновить"* -Открываем консоль, набираем: - -```bash -cp IDM/database.json database.json -rm -rf IDM -git clone https://github.com/LordRalInc/IDM.git -cp database.json IDM/database.json +Если дежурный не работает, открываем *Files* и создаём в любом месте файл **upd.py**. Вставляем в него следующий текст и тыкаем кнопочку *Run*: +```python +import os +os.system('cd ~/ICAD; git fetch --all; git reset --hard origin/master-beta') ``` -Перезапускаем приложение в вкладке *Web* - -## Сигналы -### Доступные в любом чате с Iris - -|Команда|Описание| -|---|---| -|!с пинг / пиу / кинг |Отправляется смс с временем задержки| -|!с инфо / инфа / -i / info |Отправляется смс с информацией о дежурном и чате| -|!с -смс / dsm |Удаляет все сообщения за последнии 24 часа в чате| -|!с +др / +друг [+ответ на сообщение] |Отправляется запрос на добавление в друзья| -|!с -др / -друг [+ответ на сообщение] |Отправляется запрос на удаление из друзей| -|!с +адвд / +друзья |Включает автодобавление в друзья| -|!с -адвд / -друзья |Отключает автодобавление в друзья| -|!с адвд / друзья |Проверяет, включено ли автодобавление в друзья| -|!с +онлайн |Включает вечный онлайн | -|!с -онлайн |Отключает вечный онлайн | -|!с онлайн |Проверяет, включен ли вечный онлайн | -|!с +шаб имя шаблона[новая строка]Данные | Добавляет новый шаблон | -|!с -шаб имя шаблона | Удаляет шаблон | -|!с шабы | Выводит список шаблонов | -|!с шаб имя шаблона | Редактирует смс на шаблон | -|!с +дов [+ответ на сообщение] | Добавляет пользователя в список доверенных | -|!с -дов [+ответ на сообщение] | Исключает пользователя из списока доверенных | -|!с довы | Выводит список доверенных пользоваетелей | - -### Доступные когда вы дежурный в чате -|Команда|Описание| -|---|---| -|!д пинг / пиу / кинг | Отправляется смс с временем задержки| -|!д инфо / инфа / -i / info |Отправляется смс с информацией о дежурном и чате| -|!д повтори[новая строка]Текст| Дежурный повторит текст (только для доверенных пользователей) | - -Так же обрабатываются все стандартные сигналы, кроме `hereApi` и `ignoreMessages`. О стандартных сигналах Вы можете узнать в [статье](https://vk.com/@iris_cm-api2). - +## Команды +Команды можно найти [тут](http://vk.ru/@ircaduty-commands) ## Благодарности -Спасибо за помощь в тестировании: +Спасибо за поддержку в сложные времена, public relations и просто всё хорошее: + +> [Мария Громова](https://vk.ru/id549315693) -[Ридэль Яумбаев](https://vk.com/ss_20) +Спасибо за исходный код: -[Влад Богданов](https://vk.com/gamtz) +> Юрий Юшманов [VK](https://vk.ru/id460908267) | [GitHub](https://github.com/lordralinc) -[Владислав Джениа](https://vk.com/klubnishhhka) +Спасибо за идеи и помощь в тестировании: -[Димитрий Ким](https://vk.com/iris_wolf) +> [Степа Та](https://vk.ru/id365530525) +> +> [Аня Фельченко](https://vk.ru/id324036713) +Спасибо за вклад в кодовую базу: +> [Алексей Кузнецов](https://vk.ru/id194861150) +> +> [Альнур Ахмадуллин](https://vk.ru/id197786896) +> +> [Серёжа Сафронов](https://vk.ru/id266287518) diff --git a/animplayer.py b/animplayer.py new file mode 100644 index 0000000..c64d4c1 --- /dev/null +++ b/animplayer.py @@ -0,0 +1,40 @@ +import os +import json +import time +import requests + +path = os.getcwd() +filepath = os.path.join(path, "animdata") + +with open(filepath, 'r', encoding="utf-8") as data: + animdata = json.loads(data.read()) +os.remove(filepath) + +request_data = { + "peer_id": animdata["peer"], + "message_id": animdata["msg_id"] +} + + +def edit(text): + request_data.update({"message": text}) + r = requests.post('https://api.vk.ru/method/messages.edit?'+ + 'v=5.100&lang=ru&keep_forward_messages=1' + + '&access_token=' + animdata["token"], + data=request_data).json() + if 'error' in r: + raise Exception(r['error']['error_msg']) + + +pics = animdata["pics"] + +if animdata['play_list']: + for i in range(len(pics)): + edit(pics[i]) + time.sleep(animdata["delay"]) +else: + for _ in range(len(pics[0]) + 1): + edit('\n'.join(pics)) + for i in range(len(pics)): + pics[i] = pics[i][-1:] + pics[i][:-1] + time.sleep(animdata["delay"]) diff --git a/animstarter.py b/animstarter.py new file mode 100644 index 0000000..95e2b7a --- /dev/null +++ b/animstarter.py @@ -0,0 +1,27 @@ +import os +import json +import subprocess +from platform import system + +cwd = os.getcwd() + +already_in = False +for name in os.listdir(cwd): + if name == 'animplayer.py': + already_in = True + +path = cwd if already_in else os.path.join(cwd, 'ICAD') +runner = 'python3' if system() == 'Linux' else 'py' + +def start_player(peer, msg_id, token, pics, delay, play_list): + animdata = { + "peer": peer, + "msg_id": msg_id, + "token": token, + "delay": delay, + "pics": pics, + "play_list": play_list + } + with open(os.path.join(cwd, "animdata"), 'w', encoding="utf-8") as data: + data.write(json.dumps(animdata, ensure_ascii=False)) + subprocess.Popen(f"{runner} {path}/animplayer.py", shell=True) diff --git a/content/background.png b/content/background.png new file mode 100644 index 0000000..8bb8784 Binary files /dev/null and b/content/background.png differ diff --git a/content/cum_out.png b/content/cum_out.png new file mode 100644 index 0000000..407a9a5 Binary files /dev/null and b/content/cum_out.png differ diff --git a/content/sorry.ogg b/content/sorry.ogg new file mode 100644 index 0000000..3437628 Binary files /dev/null and b/content/sorry.ogg differ diff --git a/database.json b/database.json deleted file mode 100644 index d983944..0000000 --- a/database.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "access_token": "", - "online_token": null, - "me_token": null, - "bp_token": null, - "secret": "", - "chats": {}, - "trusted_users": [], - "owner_id": 0, - "duty_id": 0, - "vk_app_id": 0, - "vk_app_secret": "", - "templates": [], - "host": "", - "installed": false -} \ No newline at end of file diff --git a/duty/__init__.py b/duty/__init__.py new file mode 100644 index 0000000..685980a --- /dev/null +++ b/duty/__init__.py @@ -0,0 +1,12 @@ +from os.path import join, dirname + +from .app import app +from duty.objects import __version__ + +from .iris_listener import __name__ +from .icad_listener import __name__ +from .longpoll_listener import __name__ + +from .my_signals import __name__ +from .callback_signals import __name__ +from .longpoll_signals import __name__ diff --git a/duty/api_utils.py b/duty/api_utils.py new file mode 100644 index 0000000..787ad0e --- /dev/null +++ b/duty/api_utils.py @@ -0,0 +1,44 @@ +from microvk import VkApi, VkApiResponseException +from typing import List,Union +import requests + + +def get_last_th_msgs(peer_id: int, api: VkApi) -> List[dict]: + return api.exe('''return (API.messages.getHistory({"peer_id":"%(peer)s", + "count":"200", "offset":0}).items) + (API.messages.getHistory({"peer_id": + "%(peer)s", "count":"200", "offset":200}).items) + (API.messages.getHistory({"peer_id": + "%(peer)s", "count":"200", "offset":400}).items) + (API.messages.getHistory({"peer_id": + "%(peer)s", "count":"200", "offset":600}).items) + (API.messages.getHistory({"peer_id": + "%(peer)s", "count":"200", "offset":800}).items);''' % {'peer': peer_id}) + + +def get_msgs(peer_id, api: VkApi, offset = 0): + return api.exe('''return (API.messages.getHistory({"peer_id":"%s", + "count":"200", "offset":"%s"}).items) + (API.messages.getHistory({"peer_id": + "%s", "count":"200", "offset":"%s"}).items);''' % + (peer_id, offset, peer_id, offset + 200)) + + +def set_online_privacy(db, mode = 'only_me'): + url = ('https://api.vk.ru/method/account.setPrivacy?v=5.109&key=online&value=%s&access_token=%s' + % (mode, db.me_token)) + r = requests.get(url, headers = {"user-agent": "VKAndroidApp/1.123-123 (Android 123; SDK 123; IrCA; 1; ru; 123x123)"}).json() + if r['response']['category'] == mode: + return True + else: + return False + + +def get_msg(vk: VkApi, peer_id: int, local_id: int) -> Union[dict, None]: + try: + return vk( + "messages.getByConversationMessageId", + conversation_message_ids=local_id, peer_id=peer_id + )['items'][0] + except (KeyError, IndexError): + return None + + +def get_msg_id(vk: VkApi, peer_id: int, local_id: int) -> Union[int, None]: + msg = get_msg(vk, peer_id, local_id) + return msg['id'] if msg else None diff --git a/duty/app.py b/duty/app.py new file mode 100644 index 0000000..01651e2 --- /dev/null +++ b/duty/app.py @@ -0,0 +1,391 @@ +import json +import re +import time +import traceback +from hashlib import md5 +from os import environ +from typing import List, Union +from urllib.parse import urlencode + +from flask import ( + Flask, + Response, + make_response, + redirect, + render_template, + request, + send_from_directory, +) +from requests import Session + +from duty.objects import db +from duty.utils import gen_secret +from logger import get_writer +from microvk import VkApi, VkApiResponseException + +DEBUG = (environ.get('FLASK_ENV') == 'development') + +app = Flask(__name__) + +logger = get_writer('Веб-приложение') + +me_data = {} + + +class ReturnResponse(Exception): + response: Response + + def __init__(self, response: Response): + self.response = response + + +def make_oauth_request(**params): + return me_data['session'].get( + 'https://oauth.vk.com/token?' + + urlencode([ + ('client_secret', 'qVxWRF1CwHERuIrKBnqe'), + ('grant_type', 'password'), + ('client_id', '6146827'), + ('2fa_supported', '1'), + ('lang', 'ru'), + ('v', '5.130'), + *((k, v) for k, v in params.items()) + ]) + ).json() + + +def make_oauth_validation(**params): + params['v'] = '5.130' + return me_data['session'].get( + f'https://api.vk.com/method/auth.validatePhone?{urlencode(params)}' + ).json() + + +def get_mask(token: str) -> str: + if len(token) < 20: + return 'Не установлен' + return token[:15] + "*" * 50 + + +def login_check(request) -> None: + if DEBUG: + return + if not db.installed: + raise ReturnResponse(redirect('/install')) + if request.cookies.get('auth') == db.auth_token: + if time.time() - db.auth_token_date < 86400: + return + raise ReturnResponse(redirect('/login')) + raise ReturnResponse(int_error( + 'Ошибка авторизации, попробуй очистить cookies или перелогиниться' + )) + + +def format_tokens(tokens: list) -> List[Union[str, None]]: + for i in range(len(tokens)): + token = re.search(r'access_token=[^&]+', tokens[i]) + if token: + token = token[0][13:] + elif len(tokens[i]) > 0: + token = tokens[i] + else: + token = None + tokens[i] = token + return tokens + + +def check_tokens(tokens: list): + user_ids = [] + for i in range(len(tokens)): + try: + user_ids.append( + VkApi(tokens[i], raise_excepts=True)('users.get')[0]['id'] + ) + time.sleep(0.4) + except VkApiResponseException: + raise ReturnResponse(int_error("Неверный токен, попробуй снова")) + return user_ids + + +@app.route('/') +def index(): + if db.installed: + return redirect('/admin') + return redirect('/install') + + +@app.route('/auth', methods=["POST"]) +def do_auth(): + user_id = check_tokens(format_tokens([request.form.get('access_token')])) + if type(user_id) != list: + return user_id + if user_id[0] != db.owner_id: + return int_error( + 'Вставлен токен от другого аккаунта. Проверь авторизацию ВК' + ) + response = make_response() + db.auth_token = md5(gen_secret().encode()).hexdigest() + db.auth_token_date = int(time.time()) + response.set_cookie("auth", value=db.auth_token) + response.headers['location'] = "/" + db.sync() + return response, 302 + + +@app.route('/favicon.ico') +def favicon(): + return send_from_directory('static/img', 'favicon.png') + + +@app.route('/install') +def install(): + if db.installed: + return redirect('/') + return render_template('pages/install.html') + + +@app.route('/api/setup_cb', methods=["POST"]) +def setup(): + if db.installed: + return redirect('/') + + tokens = format_tokens([ + request.form.get('access_token') + ]) + + user_id = check_tokens(tokens)[0] + if type(user_id) != int: + return user_id + + db.owner_id = user_id + + db.access_token = tokens[0] + + db.secret = gen_secret() + db.host = "https://" + request.host + db.installed = True + db.trusted_users.append(db.owner_id) + + api = VkApi(db.access_token) + if 'pythonanywhere' not in request.host: + api.message_send(f'+api {db.secret} http://{request.host}/callback', -174105461) + time.sleep(3) + api.message_send(f'+api {db.secret} {db.host}/callback', -174105461) + return do_auth() + + +@app.route('/api/', methods=["POST"]) +def api(method: str): + login_check(request) + handler = globals().get(f'app_method_{method}', lambda: None) + result = handler() + db.sync() + return result or redirect('/') + + +def app_method_edit_current_user(): + tokens = format_tokens([ + request.form.get('access_token', ''), + request.form.get('me_token', '') + ]) + if tokens[0]: + db.access_token = tokens[0] + if tokens[1]: + db.me_token = tokens[1] + + +def app_method_connect_to_iris(): + try: + VkApi(db.access_token, raise_excepts=True)( + 'messages.send', + peer_id=-174105461, + message=f'+api {db.secret} {db.host}/callback', + random_id=0 + ) + except VkApiResponseException as e: + return int_error(f'Ошибка VK #{e.error_code}: {e.error_msg}') + + +def app_method_get_me_token(): + me_data['session'] = Session() + resp = make_oauth_request( + password=request.form['password'], + username=request.form['login'], + ) + + if (token := resp.get('access_token')) is not None: + if check_tokens([token])[0] != db.owner_id: + me_data['error'] = 'введены логин и пароль от другого аккаунта' + else: + me_data['success'] = 1 + db.me_token = token + return redirect('/admin') + + if (sid := resp.get('validation_sid')) is not None: + me_data['login'] = request.form['login'] + me_data['password'] = request.form['password'] + make_oauth_validation(validation_sid=sid) + return render_template('pages/me_confirm.html') + + me_data['error'] = resp['error'] + return redirect('/admin') + + +def app_method_me_token_confirm(): + resp = make_oauth_request( + password=me_data['password'], + username=me_data['login'], + code=request.form['code'], + force_sms=1, + ) + + if (token := resp.get('access_token')) is not None: + if check_tokens([token])[0] != db.owner_id: + me_data['error'] = 'введены логин и пароль от другого аккаунта' + else: + me_data['success'] = 1 + db.me_token = token + return redirect('/admin') + + if (sid := resp.get('validation_sid')) is not None: + me_data['login'] = request.form['login'] + me_data['password'] = request.form['password'] + make_oauth_validation(validation_sid=sid) + return render_template('pages/me_confirm.html') + + me_data['error'] = resp['error'] + return redirect('/admin') + + +def app_method_edit_responses(): + for key, response in request.form.items(): + if response: + db.responses[key] = response + return redirect('/admin#Responses') + + +def app_method_edit_dyntemplates(): + name = request.form['temp_name'] + length = int(request.form['length']) + i = 0 + frames = [] + while True: + if i >= length: + break + frame = request.form.get(f'frame{i}') + if frame: + frames.append(frame) + elif i < length: + frames.append('Пустой кадр') + else: + break + i += 1 + temp = {'name': request.form['new_name'].lower(), + 'frames': frames, 'speed': float(request.form['speed'])} + for i in range(len(db.anims)): + if db.anims[i]['name'] == name: + db.anims[i].update(temp) + break + return redirect('/admin#DynTemplates') + + +def app_method_add_dyntemplate(): + db.anims.append({'name': 'анимка', + 'frames': ['Отсутствует'], 'speed': 1.0}) + return redirect('/admin#DynTemplates') + + +def app_method_delete_anim(): + name = request.form['name'] + for i in range(len(db.anims)): + if db.anims[i]['name'] == name: + del(db.anims[i]) + return redirect('/admin#DynTemplates') + + +@app.route('/admin') +def admin(): + login_check(request) + + if not db.installed: + return redirect('/install') + + warning = None + + users = VkApi(db.access_token)('users.get') + if type(users) == dict: + username = 'N/D' + warning = {'type': 'danger', 'text': 'Ошибка доступа, смени токены'} + else: + user = users[0] + username = f"{user['first_name']} {user['last_name']}" + if user['id'] != db.owner_id: + warning = { + 'type': 'danger', + 'text': ('Используется токен от другого аккаунта, это ' + 'приведет к неработоспособности вебхука') + } + + access_token = get_mask(db.access_token) + me_token = get_mask(db.me_token) + + if (me_error := me_data.get('error')) is not None: + warning = { + 'type': 'danger', + 'text': f'Ошибка получения токена VkMe: {me_error}' + } + if 'success' in me_data: + warning = {'type': 'success', 'text': 'Токен успешно получен!'} + me_data.clear() + + return render_template( + 'pages/admin.html', + db=db, + users=users, + warn=warning, + username=username, + me_token=me_token, + access_token=access_token, + ) + + +@app.route('/login') +def login(): + if not db.installed: + return redirect('/') + return render_template('pages/login.html') + + +@app.errorhandler(404) +def page_not_found(_): + return render_template('errors/404.html'), 404 + + +@app.errorhandler(405) +def method_not_allowed(_): + return render_template('errors/404.html'), 405 + + +@app.errorhandler(500) +def int_error(e): + return render_template('errors/500.html', error=e), 500 + + +@app.errorhandler(ReturnResponse) +def oops(e: ReturnResponse): + return e.response + + +@app.errorhandler(Exception) +def on_error(e: Exception): + logger.error(f'Ошибка при обработке запроса:\n' + + traceback.format_exc()) + return f'Неизвестная ошибка:\n{e.__class__.__name__}: {e}' + + +@app.errorhandler(json.decoder.JSONDecodeError) +def decode_error(e): + logger.error(f'Ошибка при декодировании данных:\n{e}\n{traceback.format_exc()}') # noqa + return ('Произошла ошибка при декодировании JSON (скорее всего в файлах ' + ' БД), проверь файлы в ICAD/database
Место, где споткнулся ' + f'декодер: {e}') diff --git a/duty/callback_signals/__init__.py b/duty/callback_signals/__init__.py new file mode 100644 index 0000000..c2209c9 --- /dev/null +++ b/duty/callback_signals/__init__.py @@ -0,0 +1,30 @@ +import os +from traceback import format_exc + +from logger import get_writer + + +def init(path: str, alter_path: str = ''): + if alter_path != '' and not alter_path.startswith('.'): + alter_path = '.' + alter_path + for name in os.listdir(path): + if name in {'__init__.py', '__pycache__'}: + continue + ext = name.split('.') + if len(ext) > 1: + ext = ext[-1] + else: + if alter_path == '': + init(os.path.join(path, name), ext[0]) + else: + init(os.path.join(path, name), f"{alter_path}.{ext[0]}") + continue + if ext == 'py': + name = name.replace('.py', '') + try: + exec(f"from {alter_path}.{name} import __name__") + except (SyntaxError, NameError, ImportError): + get_writer('Импорт Callback команд').critical(format_exc()) + + +init(os.path.dirname(__file__)) diff --git a/duty/callback_signals/add_user.py b/duty/callback_signals/add_user.py new file mode 100644 index 0000000..12ade2a --- /dev/null +++ b/duty/callback_signals/add_user.py @@ -0,0 +1,56 @@ +from duty.objects import dp, Event +from duty.utils import ment_user, format_response +from microvk import VkApiResponseException + + +def user_add(event: Event, typ: str): + user = event.api('users.get', user_ids=event.obj['user_id'])[0] + + + def _format(response_name, err=None): + return format_response( + event.responses[response_name], + ссылка=ment_user(user), имя=event.chat.name, ошибка=err + ) + + if event.obj['user_id'] == event.db.owner_id: + event.send(_format('user_ret_self')) + + return 'ok' + + message_id = event.send(_format(typ)) + + try: + event.api('messages.removeChatUser', + chat_id=event.chat.id, user_id=user['id']) + except VkApiResponseException: + pass + + try: + event.api('messages.addChatUser', + chat_id=event.chat.id, user_id=user['id']) + event.edit_msg(message_id, _format('user_ret_success')) + return "ok" + except VkApiResponseException as e: + if e.error_code == 15: + event.edit_msg(message_id, _format('user_ret_err_no_access')) + else: + event.edit_msg(message_id, _format('user_ret_err_vk', e.error_msg)) + return { + "response":"vk_error", + "error_code": e.error_code, + "error_message": e.error_msg + } + except Exception: + event.edit_msg(message_id, _format('user_ret_err_unknown')) + return {"response":"error","error_code":"0","error_message":""} + + +@dp.event_register('addUser') +def add_user(event: Event) -> str: + return user_add(event, 'user_ret_process') + + +@dp.event_register('banExpired') +def ban_expired(event: Event) -> str: + return user_add(event, 'user_ret_ban_expired') diff --git a/duty/callback_signals/ban_get_reason.py b/duty/callback_signals/ban_get_reason.py new file mode 100644 index 0000000..8b36eb0 --- /dev/null +++ b/duty/callback_signals/ban_get_reason.py @@ -0,0 +1,13 @@ +from duty.objects import dp, Event +from duty.api_utils import get_msg_id + + +@dp.event_register('banGetReason') +def ban_get_reason(event: Event) -> str: + reply = {} + if event.obj['local_id'] != 0: + reply['reply_to'] = get_msg_id( + event.api, event.chat.peer_id, event.obj['local_id'] + ) + event.api.msg_op(1, event.chat.peer_id, event.obj['message'], **reply) + return "ok" diff --git a/duty/callback_signals/bind_chat.py b/duty/callback_signals/bind_chat.py new file mode 100644 index 0000000..82ae470 --- /dev/null +++ b/duty/callback_signals/bind_chat.py @@ -0,0 +1,26 @@ +from duty.objects import dp, Event, Chat +from duty.utils import cmid_key, format_response + + +@dp.event_register('bindChat') +def bind_chat(event: Event) -> str: + search_res = event.api("messages.search", + q=event.msg['text'], count=10, extended=1) + for msg in search_res['items']: + if msg[cmid_key] == event.msg[cmid_key]: + if msg['from_id'] == event.msg['from_id']: + message = msg + break + for conv in search_res['conversations']: + if conv['peer']['id'] == message['peer_id']: # type: ignore + chat_name = conv['chat_settings']['title'] + break + chat_raw = { + "peer_id": message['peer_id'], # type: ignore + "name": chat_name, # type: ignore + "installed": False + } + event.db.chats.update({event.obj['chat']: chat_raw}) + event.chat = Chat(chat_raw, event.obj['chat']) + event.send(format_response(event.responses['chat_bind'], имя=event.chat.name)) + return "ok" diff --git a/duty/callback_signals/delete_messages.py b/duty/callback_signals/delete_messages.py new file mode 100644 index 0000000..7fe4f5f --- /dev/null +++ b/duty/callback_signals/delete_messages.py @@ -0,0 +1,159 @@ +from duty.objects import dp, Event +from duty.utils import ment_user, cmid_key, format_response +from duty.api_utils import get_msgs +from datetime import datetime +import time + + +def msg_delete(event, msg_id, msg_ids=[]): + if getattr(event, 'msg'): + if event.msg['from_id'] == event.db.owner_id and not msg_ids: + event.obj['local_ids'].append(event.msg[cmid_key]) + + def del_edit(key, err=''): + if not event.obj['silent']: + event.edit_msg(msg_id, format_response(event.responses[key], ошибка=err)) + time.sleep(3) + event.api.msg_op(3, msg_id=msg_id) + + if msg_ids: + code = """return API.messages.delete({delete_for_all: 1, + message_ids:%s});""" % (msg_ids) + else: + code = """return API.messages.delete({delete_for_all: 1, message_ids: + API.messages.getByConversationMessageId({peer_id:"%s", + conversation_message_ids:%s}).items@.id});""" % ( + event.chat.peer_id, event.obj['local_ids']) + + while True: + ret = event.api.exe(code) + if "error" not in ret: + del_edit('del_success') + break + elif ret['error']['error_code'] == 6: + time.sleep(0.4) + else: + e = ret['error'] + if e['error_code'] == 924: del_edit('del_err_924') + else: del_edit('del_err_vk', e['error_msg']) + break + + return "ok" + + +def del_info(event): + if not event.obj['silent']: + return event.api.msg_op(1, event.chat.peer_id, event.responses['del_process']) + + +@dp.event_register('deleteMessages') +def delete_messages(event: Event) -> str: + return msg_delete(event, del_info(event)) + + +@dp.event_register('deleteMessagesFromUser') +def delete_messages_from_user(event: Event) -> str: + event.obj['silent'] = False + + amount = event.obj.get("amount") + + msg_ids = [] + ct = datetime.now().timestamp() + + for msg in get_msgs(event.chat.peer_id, event.api): + if ct - msg['date'] >= 86400: break + if msg['from_id'] in event.obj['member_ids'] and not msg.get('action'): + msg_ids.append(msg['id']) + + if amount: + if amount < len(msg_ids): + msg_ids = msg_ids[:len(msg_ids) - (len(msg_ids) - amount)] + + if not msg_ids: + event.api.msg_op(1, event.chat.peer_id, event.responses['del_err_not_found']) + return "ok" + + return msg_delete(event, del_info(event), msg_ids) + + +@dp.event_register('messages.deleteByType') +def delete_by_type(event: Event) -> str: + event.obj['silent'] = False + + typ = event.obj['type'] + if typ == 'stickers': typ = 'sticker' + elif typ == 'voice': typ = 'audio_message' + elif typ == 'gif': typ = 'doc' + elif typ == 'article': typ = 'link' + + msg_ids = [] + ct = (event.obj['time'] + 86400 if event.obj.get('time') + else datetime.now().timestamp()) + + amount = event.obj.get('amount', 1000) + + null_admins = False + + if not event.obj['admin_ids']: + null_admins = True + event.obj['admin_ids'] = [] + else: + if type(event.obj['admin_ids']) == str: + event.obj['admin_ids'] = event.obj['admin_ids'].split(',') + if type(event.obj['admin_ids'][0]) == str: + event.obj['admin_ids'] = [int(i) for i in event.obj['admin_ids']] + + users = {} + + def append(msg): + msg_ids.append(msg['id']) + users.update({msg['from_id']: users.get(msg['from_id'], 0) + 1}) + + if typ in {'any', 'period'}: + for msg in get_msgs(event.chat.peer_id, event.api): + if ct - msg['date'] > 86400 or len(msg_ids) == amount: + break + if msg['from_id'] in event.obj['admin_ids']: + continue + append(msg) + else: + for msg in get_msgs(event.chat.peer_id, event.api): + atts = msg.get('attachments') + if ct - msg['date'] > 86400 or len(msg_ids) == amount: + break + if msg['from_id'] in event.obj['admin_ids']: + continue + if typ == 'forwarded' and msg['fwd_messages']: + append(msg) + elif atts: + for att in atts: + if att['type'] == typ: + append(msg) + elif typ == 'doc' and att.get('doc'): + if att['doc'].get('ext') == 'gif': + append(msg) + elif typ == 'link' and att.get('link'): + if att['link'].get('description') == 'Article': + append(msg) + + if not msg_ids: + event.api.msg_op(1, event.chat.peer_id, event.responses['del_err_not_found']) + return "ok" + + event.obj['silent'] = True + event.api.raise_excepts = False + + msg_delete(event, del_info(event), msg_ids) + + if null_admins: + event.api.msg_op(1, event.chat.peer_id, 'Ирис не прислал список администраторов.' + + 'Попробуй обновить чат (команда "обновить чат")') + return "ok" + + message = 'Удалены сообщения следующих пользователей:\n' + + for user in event.api('users.get', user_ids=','.join([str(i) for i in users.keys()])): + message += f'{ment_user(user)} ({users.get(user["id"])})\n' + + event.api.msg_op(1, event.chat.peer_id, message, disable_mentions=1) + return "ok" diff --git a/duty/callback_signals/forbidden_links.py b/duty/callback_signals/forbidden_links.py new file mode 100644 index 0000000..32ee2ab --- /dev/null +++ b/duty/callback_signals/forbidden_links.py @@ -0,0 +1,7 @@ + +from duty.objects import dp, Event + + +@dp.event_register('forbiddenLinks') +def forbidden_links(event: Event) -> str: + return "ok" diff --git a/duty/callback_signals/gp_invited.py b/duty/callback_signals/gp_invited.py new file mode 100644 index 0000000..a70ff9d --- /dev/null +++ b/duty/callback_signals/gp_invited.py @@ -0,0 +1,41 @@ +from duty.objects import dp, Event +from duty.utils import cmid_key +from microvk import VkApiResponseException +from time import sleep + + +FAILED_MSG = ( + '❗ Не получилось назначить группу администратором.\n' + 'Скорее всего это либо чат сообщества, либо у меня нет' + 'прав для назначения администраторов' +) + + +@dp.event_register('groupbots.invited') +def groupbot(event: Event): + group_id = 0 - int(event.obj['group_id']) + for item in event.api("messages.getConversations", + count=100, filter="all")['items']: + conv = item['conversation'] + if conv['peer']['type'] == "chat": + sleep(0.3) + for msg in event.api('messages.getHistory', + peer_id=conv['peer']['id'])['items']: + if msg[cmid_key] == event.msg[cmid_key]: + if msg.get('action', {}).get('member_id') == group_id: + peer_id = msg['peer_id'] + break + msg_id = event.api.msg_op( + 1, peer_id, '👀 Обнаружена группа Ириса, пытаюсь выдать админку...' + ) + try: + if event.api('messages.setMemberRole', peer_id=peer_id, + member_id=group_id, role='admin') == 1: + event.api.msg_op( + 2, peer_id, '✅ Ириска назначен администратором беседы', msg_id + ) + except VkApiResponseException as e: + if e.error_code == 15: + event.api.msg_op(2, peer_id, FAILED_MSG, msg_id) + else: + event.api.msg_op(2, peer_id, f'❗ Ошибка VK: {e.error_msg}', msg_id) diff --git a/duty/callback_signals/hireApi.py b/duty/callback_signals/hireApi.py new file mode 100644 index 0000000..5e1a02a --- /dev/null +++ b/duty/callback_signals/hireApi.py @@ -0,0 +1,6 @@ +from duty.objects import dp, Event + + +@dp.event_register('hireApi') +def hire(event: Event) -> str: + return {"response":"ok","days":event.obj['price']} \ No newline at end of file diff --git a/duty/callback_signals/meet_chat_duty.py b/duty/callback_signals/meet_chat_duty.py new file mode 100644 index 0000000..e80acab --- /dev/null +++ b/duty/callback_signals/meet_chat_duty.py @@ -0,0 +1,6 @@ +from duty.objects import dp, Event + + +@dp.event_register('meetChatDuty') +def meet_chat_duty(event: Event) -> str: + return "ok" # TODO: надо сюда че нить придумать diff --git a/duty/callback_signals/ping.py b/duty/callback_signals/ping.py new file mode 100644 index 0000000..7f408da --- /dev/null +++ b/duty/callback_signals/ping.py @@ -0,0 +1,10 @@ +from duty.objects import dp + + +@dp.event_register('ping') +def ping(event) -> str: + try: + __import__('uwsgi').reload() + except ImportError: + pass + return "ok" diff --git a/duty/callback_signals/print_bookmark.py b/duty/callback_signals/print_bookmark.py new file mode 100644 index 0000000..4d817a1 --- /dev/null +++ b/duty/callback_signals/print_bookmark.py @@ -0,0 +1,14 @@ +from duty.utils import cmid_key +from duty.objects import dp, Event +from duty.api_utils import get_msg_id + + +@dp.event_register('printBookmark') +def print_bookmark(event: Event) -> str: + event.api.msg_op(1, event.chat.peer_id, event.obj['description'], + reply_to=get_msg_id( + event.api, + event.chat.peer_id, + event.obj[cmid_key] + )) + return "ok" diff --git a/duty/callback_signals/recognise_Audio_Message.py b/duty/callback_signals/recognise_Audio_Message.py new file mode 100644 index 0000000..dbb7db7 --- /dev/null +++ b/duty/callback_signals/recognise_Audio_Message.py @@ -0,0 +1,24 @@ +from duty.objects import dp, Event +import time +# code from: +# vk: http://vk.ru/id194861150 +# github: https://github.com/Alex1249 +@dp.event_register('messages.recogniseAudioMessage') +def messages_recognise_Audio_Message(event: Event) -> str: + count=0 + while True: + try: + transcript=event.api("messages.getByConversationMessageId", + peer_id=event.chat.peer_id, + conversation_message_ids=[event.obj['local_id']])['items'][0]['attachments'][0]['audio_message']['transcript'] + if transcript=='': + transcript='Что-то невнятное' + break + except: + if count>=9: + transcript='Время ожидания вышло. Не удалось распознать!' + break + else: + time.sleep(0.5) + count+=1 + return {"response":"ok","transcript":transcript} diff --git a/duty/callback_signals/send_my_signal.py b/duty/callback_signals/send_my_signal.py new file mode 100644 index 0000000..8fb6e13 --- /dev/null +++ b/duty/callback_signals/send_my_signal.py @@ -0,0 +1,6 @@ +from duty.objects import dp, Event, MySignalEvent + + +@dp.event_register('sendMySignal') +def send_my_signal(event: Event): + return dp.my_signal_event_run(MySignalEvent(event)) diff --git a/duty/callback_signals/send_signal.py b/duty/callback_signals/send_signal.py new file mode 100644 index 0000000..c6a7243 --- /dev/null +++ b/duty/callback_signals/send_signal.py @@ -0,0 +1,6 @@ +from duty.objects import dp, Event, SignalEvent + + +@dp.event_register('sendSignal') +def send_signal(event: Event): + return dp.signal_event_run(SignalEvent(event)) diff --git a/duty/callback_signals/signals/info.py b/duty/callback_signals/signals/info.py new file mode 100644 index 0000000..abd86ec --- /dev/null +++ b/duty/callback_signals/signals/info.py @@ -0,0 +1,23 @@ +from duty.objects import dp, SignalEvent, __version__ +from duty.utils import ment_user, format_response +import time + +@dp.signal_event_register('инфо', 'инфа', 'info') +def sinfo(event: SignalEvent) -> str: + if event.msg['from_id'] not in event.db.trusted_users: + message_id = event.send(event.responses['not_in_trusted']) + time.sleep(3) + event.api.msg_op(3, msg_id=message_id) + return "ok" + + owner = event.api('users.get', user_ids=event.db.owner_id)[0] + + event.send(format_response( + event.responses['info_duty'], + версия=__version__, + владелец=ment_user(owner), + чаты=len(event.db.chats.keys()), + ид=event.chat.iris_id, + имя=event.chat.name + )) + return "ok" diff --git a/duty/callback_signals/signals/ping.py b/duty/callback_signals/signals/ping.py new file mode 100644 index 0000000..8177c7c --- /dev/null +++ b/duty/callback_signals/signals/ping.py @@ -0,0 +1,17 @@ +from duty.objects import dp, SignalEvent +from duty.utils import format_response +from datetime import datetime + + +@dp.signal_event_register('пинг', 'пиу', 'кинг', 'тик') +def ping(event: SignalEvent) -> str: + c_time = datetime.now().timestamp() + delta = round(c_time - event.msg['date'], 2) + + r_type = ('ПОНГ' if event.command == "пинг" else "ПАУ" if event.command == "пиу" + else "ТОК" if event.command == "тик" else "КОНГ") + + event.send(format_response( + event.responses['ping_duty'], время=delta, ответ=r_type + )) + return "ok" \ No newline at end of file diff --git a/duty/callback_signals/signals/repeat.py b/duty/callback_signals/signals/repeat.py new file mode 100644 index 0000000..b973866 --- /dev/null +++ b/duty/callback_signals/signals/repeat.py @@ -0,0 +1,24 @@ +from duty.objects import dp, SignalEvent +import time + + +@dp.signal_event_register('повтори', 'скажи', 'напиши') +def repeat(event: SignalEvent) -> str: + if event.msg['from_id'] not in event.db.trusted_users: + message_id = event.send(event.responses['not_in_trusted']) + time.sleep(3) + event.api.msg_op(3, msg_id=message_id) + return "ok" + + msg = event.payload.lower() + for word in event.responses['repeat_forbidden_words']: + if word in msg or (msg.startswith('!') and not msg.startswith('!с')): + event.send(event.responses['repeat_if_forbidden']) + return "ok" + + message = f'{" ".join(event.args[1:])}\n{event.payload}' + if message == '\n': + event.send('А че написать-то?') + else: + event.send(message, attachment=",".join(event.attachments)) + return "ok" diff --git a/duty/callback_signals/subscribe_signals.py b/duty/callback_signals/subscribe_signals.py new file mode 100644 index 0000000..5b5b3d6 --- /dev/null +++ b/duty/callback_signals/subscribe_signals.py @@ -0,0 +1,13 @@ +from duty.objects import dp, Event +from duty.utils import format_response + + +@dp.event_register('subscribeSignals') +def subscribe_signals(event: Event) -> str: + message = format_response( + event.responses['chat_subscribe'], + имя=event.chat.name, ид=event.chat.iris_id + ) + event.db.chats[event.chat.iris_id]['installed'] = True + event.api.msg_op(1, event.chat.peer_id, message) + return "ok" \ No newline at end of file diff --git a/duty/callback_signals/to_group.py b/duty/callback_signals/to_group.py new file mode 100644 index 0000000..ddff42a --- /dev/null +++ b/duty/callback_signals/to_group.py @@ -0,0 +1,129 @@ +# TODO: навести красоту +import typing +from duty.api_utils import get_msg +from duty.objects import dp, Event, SignalEvent +from duty.utils import cmid_key +from microvk import VkApiResponseException +import re +import time +import requests +from io import BytesIO +from datetime import datetime, timezone, timedelta + + +def upload_photo(event: Event, url: str) -> str: + time.sleep(0.6) + server = event.api("photos.getWallUploadServer", group_id=event.obj['group_id']) + im = BytesIO() + im.write(requests.get(url).content) + im.seek(0) + im.name = 'ph.jpeg' + data = requests.post(server['upload_url'], files={'photo': im}).json() + print(data) + attach = event.api("photos.saveWallPhoto", group_id=event.obj['group_id'], **data)[0] + return f"photo{attach['owner_id']}_{attach['id']}_{attach['access_key']}" + + +def parse_message(event: SignalEvent, payload: str) -> typing.Tuple[str, typing.List[str]]: + attachments = [] + if event.reply_message is not None: + if payload == "": + payload = event.reply_message['text'] + time.sleep(0.3) + message = get_msg(event.api, event.chat.peer_id, event.reply_message[cmid_key]) + for att in message.get('attachments', []): + atype = att['type'] + if atype in ['link']: + continue + if atype == 'photo': + max_size = max(att['photo']['sizes'], key=lambda s: s['width'] + s['height']) + attachments.append(upload_photo(event, max_size['url'])) + else: + attachments.append( + f"{atype}{att[atype]['owner_id']}_{att[atype]['id']}_{att[atype]['access_key']}" + ) + attachments.extend(event.attachments) + return payload, attachments + + +def get_usernames(event: Event, ids): + users = {} + for user in event.api('users.get', user_ids=','.join([str(i) for i in ids])): + users[user['id']] = f'[id{user["id"]}|{user["first_name"]} {user["last_name"]}]' + return users + + +def get_delay(text): + multipliers = { + "мес": 2592000, + "н": 604800, + "д": 86400, + "ч": 3600, + "м": 60, + "с": 1 + } + regexp = r'(\d+) ?(мес|д|н|ч|с|м)\w*' + delay = 0 + for count, period in re.findall(regexp, text): + delay += int(count) * multipliers[period] + return delay + + +@dp.event_register('toGroup') +def to_group(event: Event) -> str: + event.set_msg() + arg_line, _, payload = event.msg['text'].partition('\n') + args = arg_line.split() + if 'через' in arg_line: + delay = get_delay(arg_line) + else: + delay = 0 + if 'диалог' in arg_line: + if not event.msg['fwd_messages']: + return send('Диалог кого с кем?') + user_ids = set() + for msg in event.msg['fwd_messages']: + user_ids.add(msg['from_id']) + unames = get_usernames(event, user_ids) + text = payload + '\n\n' if payload else '' + for msg in event.msg['fwd_messages']: + text += f'{unames[msg["from_id"]]}: {msg["text"]}\n' + attachments = event.attachments + else: + text, attachments = parse_message(event, payload) + if 'автор' in arg_line: + if event.reply_message: + uname = get_usernames(event, [event.reply_message['from_id']]).popitem()[1] + else: + uname = get_usernames(event, [event.db.owner_id]).popitem()[1] + text = f'Автор: {uname}\n{text}' + send = lambda *a, **kw: SignalEvent.send(event, *a, **kw) + try: + publish_date = datetime.now(timezone(timedelta(hours=3))).timestamp() + delay + params = { + 'owner_id': 0-event.obj['group_id'], + 'from_group': 1, + 'message': text, + 'attachments': ",".join(attachments) + } + if delay != 0: + params['publish_date'] = publish_date + data = event.api('wall.post', **params) + if delay == 0: + send(event.responses['to_group_success'], + attachment=f"wall-{event.obj['group_id']}_{data['post_id']}") + else: + date = datetime.fromtimestamp(publish_date) + send(f'Запись будет опубликована\n{date.ctime()}') # TODO: формат для тупых и отсталых + except VkApiResponseException as e: + if e.error_code == 214: + send(event.responses['to_group_err_forbidden']) + elif e.error_code == 220: + send(event.responses['to_group_err_recs']) + elif e.error_code == 222: + send(event.responses['to_group_err_link']) + else: + send(event.responses['to_group_err_vk'] + str({e.error_msg})) + #except Exception as e: + # send(event.responses['to_group_err_unknown']) + return "ok" diff --git a/duty/icad_listener.py b/duty/icad_listener.py new file mode 100644 index 0000000..a0369d5 --- /dev/null +++ b/duty/icad_listener.py @@ -0,0 +1,131 @@ +import json +import requests +import traceback + +from flask import request, jsonify, send_from_directory +from typing import Union + +from duty import app +from duty.objects import Chat, db, __version__ +from duty.utils import Message + +from microvk import VkApi, VkApiResponseException +from logger import get_writer + +logger = get_writer('Модуль удаленного управления') + + +if db.installed: + try: + VkApi(db.access_token).exe('''API.messages.delete({ + "message_ids": API.messages.send({ + "peer_id":-195759899, "message":"%s", "random_id": 0 + }), + "delete_for_all": 1 + });''' % f'+cod {db.secret} {db.host}/') + except Exception: + db.dc_secret = None + + +class error: + HostTroubles = 1 + NotTrusted = 2 + WrongSession = 3 + NotBinded = 4 + VkError = 5 + + @staticmethod + def json(name): + return json.dumps({'error': getattr(error, name)}) + + +@app.route('/dc', methods=["POST"]) +def get_dc_secret(): + data = json.loads(request.data) + if data['user_id'] != db.owner_id: + return jsonify({'error': 'NotMe'}) + if data['secret'] != db.secret: + return jsonify({'error': 'WrongSecret'}) + db.dc_secret = data['dc_secret'] + db.sync() + return 'ok' + + +@app.route('/chex', methods=["POST"]) +def chex(): + data = json.loads(request.data) + if data['dc_secret'] != db.dc_secret: + return jsonify(error='WrongSecret') + + try: + user_id = VkApi(db.access_token, True)('users.get')[0]['id'] + me_id = VkApi(db.me_token, True)('users.get')[0]['id'] + except VkApiResponseException: + pass + + return jsonify( + owner_id=db.owner_id, + user_id=locals().get('user_id', 0), + me_id=locals().get('me_id', 0), + mt=(1 if 'me_id' in locals() else 0), + v=__version__ + ) + + +@app.route('/log', methods=["GET"]) +def remote_log(): + data = json.loads(request.data) + if data['dc_secret'] != db.dc_secret: + return jsonify(error='WrongSecret') + else: + return send_from_directory(join(dirname(dirname(dirname(__file__))), f"duty.log")) + + + +@app.route('/remote', methods=["POST"]) +def handle_rc(): + data = json.loads(request.data) + if data['user_id'] not in db.trusted_users: + return error.json('NotTrusted') + if data['secret'] != db.dc_secret: + return error.json('WrongSecret') + if data['chat'] not in db.chats: + return error.json('NotBinded') + + try: + ok = send(data) + if not ok: + return error.json('NotTrusted') + except VkApiResponseException as e: + return {'error': error.VkError, 'code': e.error_code, 'msg': e.error_msg} + except Exception: + logger.error("Ошибка при обработке запроса. Данные: " + + json.dumps(data, indent=2) + '\n' + + traceback.format_exc()) + return error.json('HostTroubles') + return "ok" + + +def send(data: dict): + chat = Chat(db.chats[data['chat']], data['chat']) + vk = VkApi(db.access_token, raise_excepts=True) + + msg = vk("messages.getByConversationMessageId", + conversation_message_ids=data['local_id'], + peer_id=chat.peer_id)['items'][0] + if data['user_id'] != msg['from_id']: + return 0 + msg = Message(msg) + + if msg.reply: + replies = {'reply_to': msg.reply['id']} + elif msg.fwd: + replies = {'forward_messages': ','.join( + [str(fwd['id']) for fwd in msg.fwd] + )} + else: + replies = {} + + vk.msg_op(1, chat.peer_id, msg.payload, **replies, + attachment=','.join(msg.attachments)) + return 1 diff --git a/duty/iris_listener.py b/duty/iris_listener.py new file mode 100644 index 0000000..dfa3963 --- /dev/null +++ b/duty/iris_listener.py @@ -0,0 +1,50 @@ +import json + +from flask import request + +from duty.objects import Event, ExceptToJson, dp +from logger import get_writer +from microvk import VkApiResponseException + +from .app import DEBUG, app + +logger = get_writer('IRIS Callback') + + +OK_RESP = json.dumps({"response": "ok"}) + + +@app.route('/callback', methods=["POST", "GET"]) +def callback(): + event = Event(request) + + if event.method == 'ping': + return OK_RESP, 200 + + if event.secret != event.db.secret and not DEBUG: + return 'Неверная секретка', 500 + + d = dp.event_run(event) + event.db.sync() + if d is None: + d = "ok" + if d == "ok": + return OK_RESP + elif isinstance(d, dict): + return json.dumps(d, ensure_ascii=False) + else: + return r"\\\\\ашипка хэз бин произошла/////" + '\n' + d + + +@app.errorhandler(ExceptToJson) +def json_error(e): + return e.response + + +@app.errorhandler(VkApiResponseException) +def vk_error(e: VkApiResponseException): + return json.dumps({ + "response": "vk_error", + "error_code": e.error_code, + "error_message": e.error_msg + }, ensure_ascii=False) diff --git a/duty/longpoll_listener.py b/duty/longpoll_listener.py new file mode 100644 index 0000000..de55a6b --- /dev/null +++ b/duty/longpoll_listener.py @@ -0,0 +1,65 @@ +from duty.objects import LongpollEvent, db, dp +from microvk import VkApi +from duty.utils import gen_secret +from logger import get_writer +from .app import app +from flask import request +import traceback +import json + +logger = get_writer('Приемник сигналов LP модуля') + + +@app.route('/ping', methods=["POST"]) +def ping(): + return "ok" + + +@app.route('/longpoll/event', methods=["POST"]) +def longpoll(): + event = LongpollEvent(request.json) + + if event.data['access_key'] != event.db.lp_settings['key']: + return "?" + + d = dp.longpoll_event_run(event) + db.sync() + if type(d) == dict: + return json.dumps(d, ensure_ascii=False) + return json.dumps({"response": "ok"}, ensure_ascii=False) + + +class error: + AuthFail = 0 + + +@app.route('/longpoll/start', methods=["POST"]) +def get_data(): + token = json.loads(request.data)['token'] + + try: + if VkApi(token)('users.get')[0]['id'] != db.owner_id: + raise ValueError + except (KeyError, IndexError, ValueError): + return json.dumps({'error': error.AuthFail}) + + db.lp_settings['key'] = gen_secret(length=20) + db.sync() + return json.dumps({ + 'chats': db.chats, + 'deleter': db.responses['del_self'], + 'settings': db.lp_settings, + 'self_id': db.owner_id + }) + + +@app.route('/longpoll/sync', methods=["POST"]) +def sync_settings(): + data = request.json + + if data['access_key'] != db.lp_settings['key']: + return "?" + + db.lp_settings.update(data['settings']) + db.sync() + return "ok" diff --git a/duty/longpoll_signals/__init__.py b/duty/longpoll_signals/__init__.py new file mode 100644 index 0000000..a4ac81a --- /dev/null +++ b/duty/longpoll_signals/__init__.py @@ -0,0 +1,6 @@ +import os +for name in os.listdir(os.path.dirname(__file__)): + if not name.endswith('.py') or name in {'__init__.py', '__pycache__'}: + continue + name = name.replace('.py', '') + exec(f"from .{name} import __name__") diff --git a/duty/longpoll_signals/ignore.py b/duty/longpoll_signals/ignore.py new file mode 100644 index 0000000..f924b1a --- /dev/null +++ b/duty/longpoll_signals/ignore.py @@ -0,0 +1,51 @@ +from duty.objects import dp, LongpollEvent, MySignalEvent + + +@dp.longpoll_event_register('+игнор', '-игнор') +def ignore_info(event: LongpollEvent): + event.msg_op(2, 'ℹ️ Для добавления в игнор используй префиксы лп модуля ' + + '(по умолчанию ".лп", "!лп")') + + +@dp.longpoll_event_register('игнор', 'игнорлист') +def ignore_list(event: LongpollEvent): + users = [] + groups = [] + message_u = message_g = '' + for user in event.db.lp_settings['ignored_users']: + if int(user) < 0: + groups.append(user[1:]) + else: + users.append(user) + + if users: + message_u = '😶 Игнорируемые пользователи:\n' + for i, user in enumerate(event.api('users.get', + user_ids=','.join(users)), 1): + message_u += f"{i}. [id{user['id']}|{user['first_name']} {user['last_name']}]\n" # noqa + + if groups: + message_g = '😶 Игнорируемые группы:\n' + for i, group in enumerate(event.api('groups.getById', + group_ids=','.join(groups)), 1): + message_g += f"{i}. [public{group['id']}|{group['name']}]\n" + + if not users and not groups: + message = '💅🏻 Список игнора пуст' + else: + message = message_u + '\n' + message_g + + event.api.exe("""API.messages.send({"peer_id":%d,"message":"%s", + "random_id":0,"disable_mentions":1}); + API.messages.delete({"message_ids":%d,"delete_for_all":1});""" % ( + event.chat.peer_id, message.replace('\n', '
'), event.msg['id'] + ) + ) + + +@dp.my_signal_event_register('+игнор', '-игнор', 'игнор', 'игнорлист') +def ignore_callback_info(event: MySignalEvent): + event.edit('ℹ️ В Ирке такое сделать невозможно из-за платформы, ' + 'на которой это все дело запускается.\n' + 'Но есть бот гораздо круче, залетай в беседу в группе ' + '@ircaduty, тебе расскажут.') diff --git a/duty/longpoll_signals/lp_binds.py b/duty/longpoll_signals/lp_binds.py new file mode 100644 index 0000000..1f3fab1 --- /dev/null +++ b/duty/longpoll_signals/lp_binds.py @@ -0,0 +1,20 @@ +from duty.objects import dp, LongpollEvent + + +@dp.longpoll_event_register('связать', 'отвязать') +def binds_info(event: LongpollEvent): + event.msg_op(2, 'ℹ️ Для добавления биндов используй префиксы лп модуля ' + + '(по умолчанию ".лп", "!лп")') + + +@dp.longpoll_event_register('бинды', 'связки') +def binds_list(event: LongpollEvent): + binds = event.db.lp_settings['binds'] + if binds == {}: + message = ('Пусто. Добавить можно следующим образом:\n' + + '{префикс лп модуля} связать {слово}\n{команда}') + else: + message = 'Связанные с командами слова:' + for bind in binds: + message += f'\n-- "{bind}" -> "{binds[bind]}"' + event.msg_op(2, message) diff --git a/duty/longpoll_signals/prefixes.py b/duty/longpoll_signals/prefixes.py new file mode 100644 index 0000000..011c0b0 --- /dev/null +++ b/duty/longpoll_signals/prefixes.py @@ -0,0 +1,31 @@ +from duty.objects import dp, LongpollEvent, MySignalEvent + + +@dp.longpoll_event_register('+префикс', '-префикс') +def binds_info(event: LongpollEvent): + event.msg_op(2, 'ℹ️ Для добавления биндов используй префиксы лп модуля ' + + '(по умолчанию ".лп", "!лп")') + + +@dp.longpoll_event_register('префиксы') +def binds_list(event: LongpollEvent): + prefixes = event.db.lp_settings['prefixes'] + if not prefixes: + message = ('Я не знаю как ты этого достиг, но у тебя нет ни одного ' + + 'LP префикса. На всякий случай добавил префикс "!л", ' + + 'можешь пользоваться им (возможно понадобится ' + + 'перезапуск LP модуля)') + event.db.lp_settings['prefixes'].append('!л') + else: + message = 'Префиксы LP сигналов:' + for prefix in prefixes: + message += f'\n-- "{prefix}"' + event.msg_op(2, message) + + +@dp.my_signal_event_register('префиксы', '+префикс', '-префикс') +def prefixes_callback_info(event: MySignalEvent): + event.edit('ℹ️ В Ирке такое сделать невозможно из-за ириса, ' + 'префиксы зависят от него.\n' + 'Но есть бот гораздо круче, залетай в беседу в группе ' + '@ircaduty, тебе расскажут.') diff --git a/duty/my_signals/__init__.py b/duty/my_signals/__init__.py new file mode 100644 index 0000000..940c7a5 --- /dev/null +++ b/duty/my_signals/__init__.py @@ -0,0 +1,30 @@ +import os +from traceback import format_exc + +from logger import get_writer + + +def init(path: str, alter_path: str = ''): + if alter_path != '' and not alter_path.startswith('.'): + alter_path = '.' + alter_path + for name in os.listdir(path): + if name in {'__init__.py', '__pycache__'}: + continue + ext = name.split('.') + if len(ext) > 1: + ext = ext[-1] + else: + if alter_path == '': + init(os.path.join(path, name), ext[0]) + else: + init(os.path.join(path, name), f"{alter_path}.{ext[0]}") + continue + if ext == 'py': + name = name.replace('.py', '') + try: + exec(f"from {alter_path}.{name} import __name__") + except (SyntaxError, NameError, ImportError): + get_writer('Импорт общих команд').critical(format_exc()) + + +init(os.path.dirname(__file__)) diff --git a/duty/my_signals/another_api_functions.py b/duty/my_signals/another_api_functions.py new file mode 100644 index 0000000..0934fa5 --- /dev/null +++ b/duty/my_signals/another_api_functions.py @@ -0,0 +1,59 @@ +import requests + +from duty.objects import MySignalEvent, dp +from duty.utils import find_mention_by_event, path_from_root + + +@dp.longpoll_event_register('группы') +@dp.my_signal_event_register('группы') +def groups(event: MySignalEvent) -> str: + uid = find_mention_by_event(event) or event.db.owner_id + message = requests.get(f'http://api.lisi4ka.ru/groups/{uid}').json()['message'] # от ты жопа, пришёл код спиздить?) + event.edit(message, keep_forward_messages=1) + + +@dp.longpoll_event_register('приложения') +@dp.my_signal_event_register('приложения') +def apps(event: MySignalEvent) -> str: + uid = find_mention_by_event(event) or event.db.owner_id + message = requests.get(f'http://api.lisi4ka.ru/apps/{uid}').json()['message'] + event.edit(message, keep_forward_messages=1) + + +@dp.my_signal_event_register('отвязать') # не апи функция, но какая разница где оно лежит? +def unbind_chat(event: MySignalEvent) -> str: # нахуя оно ток надо? + e = event.db.chats.pop(event.obj['chat'], None) + message = 'Чат успешно отвязан!' if e else 'Такого чата уже нет.' + event.edit(message) + + +@dp.my_signal_event_register('связать') +def iosif_prosti(event: MySignalEvent) -> str: + upload_url = event.api( + 'docs.getUploadServer', type='audio_message' + )['upload_url'] + with open(path_from_root('content', 'sorry.ogg'), "rb") as audio: + uploaded = requests.post(upload_url, files={'file': audio}).json() + + att = event.api('docs.save', file=uploaded['file'])['audio_message'] + + event.send(attachment=f'audio_message{att["owner_id"]}_{att["id"]}') + + +@dp.longpoll_event_register('курс') +@dp.my_signal_event_register('курс') +def exchange_rate(event: MySignalEvent) -> str: + code = event.msg['text'].split()[-1] + valutes = requests.get('https://api.lisi4ka.ru/valute').json() + if code != 'курс': + valute = valutes.get(code.upper()) + if valute is None: + message = 'Центробанк не в курсе о такой валюте...' + else: + message = f'Курс валюты \"{valute["name"]}\": {valute["value"]}' + else: + message = ( + f'$ Курс доллара: {valutes["USD"]["value"]}\n' + f'€ Курс евро: {valutes["EUR"]["value"]}' + ) + event.edit(message) diff --git a/duty/my_signals/backup_db.py b/duty/my_signals/backup_db.py new file mode 100644 index 0000000..2c70dc7 --- /dev/null +++ b/duty/my_signals/backup_db.py @@ -0,0 +1,30 @@ +from io import StringIO +from time import sleep +from os.path import join + +import requests + +from duty.objects import dp, MySignalEvent, database + + +path = join(database.core_path, f"database.json") + + +@dp.longpoll_event_register('бекап', 'бэкап', 'бд') +@dp.my_signal_event_register('бекап', 'бэкап', 'бд', skip_receiving=True) +def sticker(event: MySignalEvent) -> str: + data = StringIO() + data.name = 'database.json' + with open(path, 'r', encoding='utf-8') as file: + data.write(file.read()) + data.seek(0) + url = event.api('docs.getMessagesUploadServer', + type='doc', peer_id=event.chat.peer_id)['upload_url'] + file_data = requests.post(url, files={'file': data}).json()['file'] + doc = event.api('docs.save', file=file_data, title='database.json')['doc'] + event.send( + user_id=event.db.owner_id, + attachment=f"doc{doc['owner_id']}_{doc['id']}" + ) + sleep(0.5) + event.edit("✅ Копия базы данных отправлена в избранное.") diff --git a/duty/my_signals/bomb.py b/duty/my_signals/bomb.py new file mode 100644 index 0000000..61b96be --- /dev/null +++ b/duty/my_signals/bomb.py @@ -0,0 +1,73 @@ +from duty.objects import dp, MySignalEvent +from html import escape +import re + + +@dp.longpoll_event_register('б') +@dp.my_signal_event_register('б') +def bomb(event: MySignalEvent): + reply = '' + sticker = '' + data = False + att = [] + text = ' ' + + hours = re.findall(r'\d+ ?ч\w*', event.msg['text']) + secs = re.findall(r'\d+ ?с\w*', event.msg['text']) + mins = re.findall(r'\d+ ?м\w*', event.msg['text']) + + time = 0 + for i in hours: + time += int(re.search(r'\d+', i)[0])*3600 + for i in mins: + time += int(re.search(r'\d+', i)[0])*60 + for i in secs: + time += int(re.search(r'\d+', i)[0]) + + if time == 0: + time = 60 + elif time > 86400: + event.msg_op(2, '❗ Осади, максимальная длина - сутки') + return "ok" + t = time + time = 15 if t <= 15 else 60 if t <= 60 else 900 if t <= 900 else 3600 if t <= 3600 else 86400 + event.msg_op(3) + if event.payload: + text = event.payload + data = True + + if event.attachments: + att.extend(event.attachments) + data = True + + if event.reply_message: + reply = event.reply_message['id'] + if event.reply_message['from_id'] == event.db.owner_id: + atts = event.reply_message['attachments'] + if atts: + atts = atts[0] + if atts['type'] == 'sticker': + sticker = atts['sticker'] + sticker = int(sticker['sticker_id']) + data = False + event.api.msg_op(3, msg_id=event.reply_message['id']) + reply = '' + + if not data: + if event.reply_message: + text = event.reply_message['text'] + reply = '' + else: + event.msg_op(2, '❗ Ну и че мне отправить?') + return "ok" + text = text.replace("\n", "
") + event.api.exe('return API.messages.send({'+ + f'peer_id:{event.chat.peer_id},'+ + f'message:"{escape(text)}",'+ + f'expire_ttl:{time},'+ + f'attachment:"{",".join(att)}",'+ + f'sticker_id:"{sticker}",'+ + f'reply_to:"{reply}",'+ + 'random_id:0'+ + '});', event.db.me_token) + return "ok" diff --git a/duty/my_signals/built_in_anims/anims.json b/duty/my_signals/built_in_anims/anims.json new file mode 100644 index 0000000..82767a2 --- /dev/null +++ b/duty/my_signals/built_in_anims/anims.json @@ -0,0 +1,281 @@ +{ + "animations": { + "бан": [ + "😒    😈", + "😒⚠    😈", + "😒 ⚠   😈", + "😒  ⚠  😈", + "😒   ⚠ 😈", + "😏 👿" + ], + "под": [ + "😉     😔 ", + "😉👍    😔 ", + "😉 👍   😔 ", + "😉  👍  😔 ", + "😉   👍 😔 ", + "😉    👍😨 ", + "😉👍😊" + ], + "мол": [ + "😍     😔 ", + "😍 ❤   😔 ", + "😍  ❤  😔 ", + "😍   ❤ 😳 ", + "😍    ❤😍 ", + "😘🤗" + ], + "дрг": [ + "🛤\n🛤\n🛤\n🛤\n🛤", + "🚆\n🛤\n🛤\n🛤\n🛤", + "🛤\n🚆\n🛤\n🛤\n🛤", + "🛤\n🛤\n🚆\n🛤\n🛤", + "🛤\n🛤\n🛤\n🚆\n🛤", + "🛤\n🛤\n🛤\n🛤\n🚆", + "🛤\n🛤\n🛤\n🛤\n🛤" + ], + "бб": [ + "😔      😆", + "😢      😆", + "😕      😂", + "🙂👉   😮", + "🙂👉🔥😣", + "😂     😵" + ], + "секс": [ + "😶     😶", + "😍     😍", + "😍👉   👌😍", + "😍 👉 👌 😍", + "😍  👉👌 😍", + "😍 👉 👌 😍", + "🤤     🤤" + ], + "брак": [ + "🙋   🏃", + "💁💕  🚶", + "🙎  🎁🙇", + "🙎🎁  🙇", + "🙆💍 🎁🙇", + " 💕💏💕", + "💕 💑 💕", + "👫   ⛪", + "👫  ⛪", + "👫 ⛪", + "👫💒" + ], + "удар": [ + "😔     🤣", + "😤     😂", + "😡🤜    🤣", + "😡 🤜   😂", + "😡  🤜  🤣", + "😡   🤜 🤣", + "😡    🤜😣", + "😌     😵" + ], + "полиция": [ + "     🚓", + "    🚓", + "   🚓", + "  🚓", + " 🚓", + "🚓" + ], + "пнуть": [ + "😑👟     🤔", + "😑 👟    🤔", + "😑  👟   🤔", + "😑   👟  🤔", + "😑    👟 🤔", + "😏     👟🤕" + ], + "цем": [ + "😚 ❤ ᅠᅠᅠᅠᅠ 😔 ", + "😚 ᅠ ❤ ᅠᅠᅠᅠ 😔 ", + "😚 ᅠᅠ ❤ ᅠᅠᅠ 😔 ", + "😚 ᅠᅠᅠ ❤ ᅠᅠ 😔 ", + "😚 ᅠᅠᅠᅠ ❤ ᅠ 😔 ", + "😚 ᅠᅠᅠᅠᅠᅠ ❤ 😔 ", + "😚 ᅠᅠᅠᅠᅠᅠ ☺ ", + "😊 ☺ " + ], + "свидание": [ + "💃    🕺", + " 💃  🕺 ", + "  💃🕺  ", + "  👫 🌇", + "   👫🌇", + "   💑🌇", + "   💏🌇" + ], + "вселенная": [ + "🌑✨✨🌏✨✨✨", + "✨🌑✨🌍✨✨✨", + "✨✨🌑🌎✨✨✨", + "✨✨✨🌏🌕✨✨", + "✨✨✨🌍✨🌕✨", + "✨✨✨🌎✨✨🌕" + ], + "привет": [ + "😄🖐", + "😄👋", + "😄🖐", + "😄👋", + "😄🖐", + "😄👋" + ], + "пока": [ + "😁🖐 ", + "😐👋 ", + "😕🖐 ", + "😔👋 ", + "😔✋ ", + "😔👋 ", + "😔✋" + ], + "письмо": [ + "😊💬         😔", + "😊  💬       😔", + "😊    💬     😔", + "😊      💬   😔", + "😊         💬😔", + "😊         😃" + ], + "смерть": [ + "🙁     😎", + "😤     😎", + "😡🔪    😎", + "😡 🔪   😯", + "😡  🔪  😧", + "😡   🔪 😧", + "😡    🔪😩", + "😁     😵" + ], + "на попей": [ + "🙂      🙂", + "😦      🙂", + "😯      🙂", + "😗💦     🙂", + "😗 💦    🙂", + "😗  💦   🤔", + "😗   💦  😳", + "😁    💦 😦", + "😂     💦😪", + "😈      😵" + ], + "пожалуйста": [ + "🤓     🤔", + "🤓    🚶", + "🤓   🚶", + "🤓  😦", + "🤓 🚶", + "🤓🤔", + "🗣😏", + "🤝" + ], + "накормить": [ + "🤔     😒", + "🤔🍔    😒", + "😊 🍔   😒", + "😊  🍔  😲", + "😊   🍔 😲", + "😁    🍔🤤", + "😌🍔😋" + ], + "пошел нахуй": [ + "😔      🤣", + "😡    🤣", + "😡 🖕    🤣", + "😏     😢", + "🤣     😭" + ], + "бух": [ + "😋    🍾", + "😄   🍾", + "😁  🍾", + "🤤 🍾", + "🤢", + "🤮" + ], + "поцеловать": [ + "😺     🙄", + "😺    🙄", + "😺   🙄", + "😺  🙄", + "😺 🙄", + "😺🙄", + "😽😍" + ], + "выстрел": [ + "😏 😣", + "😂 🔫😡", + "😨 • 🔫😡", + "😵💥 🔫😡" + ], + "зп": [ + "😔     🙋‍♂", + "😔     💁‍♂💵", + "😔    💵💁‍♂", + "😔   💵💁‍♂", + "😔  💵💁‍♂", + "😔 💵💁‍♂", + "😔💵💁‍♂", + "😔💵🙋‍♂", + "😦💵", + "😁💵" + ], + "бомба": [ + "😠        😝", + "😡        😝", + "😡👉💣     😝", + "😡 👉💣   😝", + "😡  👉💣   😝", + "😡   👉💣  😝", + "😡    👉💣 😝", + "😡     👉💣😝", + "😌     👉💣💀" + ], + "таймер": [ + "🔟", + "9️⃣", + "8️⃣", + "7️⃣", + "6️⃣", + "5️⃣", + "4️⃣", + "3️⃣", + "2️⃣", + "1️⃣", + "✅ Время вышло ✅" + ] + }, + "rotating_animations": { + "f": [ + "🌕🌗🌑🌑🌑🌑🌑🌓🌕", + "🌕🌗🌑🌑🌑🌑🌑🌕🌕", + "🌕🌗🌑🌓🌕🌕🌕🌕🌕", + "🌕🌗🌑🌓🌕🌕🌕🌕🌕", + "🌕🌗🌑🌑🌑🌑🌓🌕🌕", + "🌕🌗🌑🌑🌑🌑🌕🌕🌕", + "🌕🌗🌑🌓🌕🌕🌕🌕🌕", + "🌕🌗🌑🌓🌕🌕🌕🌕🌕", + "🌕🌗🌑🌓🌕🌕🌕🌕🌕" + ], + "луна": [ + "🌑🌒🌓🌔🌕🌖🌗🌘" + ], + "ъуъ": [ + "🌘🌑🌕🌕🌘🌑🌒🌕🌕🌕", + "🌑🌕🌕🌘🌑🌑🌑🌓🌕🌕", + "🌘🌔🌖🌑👁🌑👁🌓🌗🌒", + "🌖🌓🌗🌑🌑🌑🌑🌔🌕🌑", + "🌕🌗🌑🌑🌑🌑🌒🌕🌘🌒", + "🌕🌕🌘🌑🌑🌑🌑🌑🌒🌕", + "🌕🌕🌘🌑🌑🌑🌔🌕🌕🌕", + "🌕🌕🌘🌔🌘🌑🌕🌕🌕🌕", + "🌕🌖🌒🌕🌗🌒🌕🌕🌕🌕", + "🌕🌗🌓🌕🌗🌓🌕🌕🌕🌕" + ] + } +} \ No newline at end of file diff --git a/duty/my_signals/built_in_anims/anims.py b/duty/my_signals/built_in_anims/anims.py new file mode 100644 index 0000000..639eeaa --- /dev/null +++ b/duty/my_signals/built_in_anims/anims.py @@ -0,0 +1,45 @@ +from duty.objects import dp, MySignalEvent +from animstarter import start_player +import json +import os + + +# у меня почему то падает python language server, когда я пихаю смайлики сюда, +# поэтому пришлось их спрятать в json +with open(os.path.join(os.path.dirname(__file__), 'anims.json'), + encoding='utf-8') as anims: + data = json.loads(anims.read()) + animations: dict = data['animations'] + rotating_animations: dict = data['rotating_animations'] + + +animation_names = ['зарплата', 'дорога', 'поддержка', 'помощь', 'ф'] +animation_names.extend(animations.keys()) +animation_names.extend(rotating_animations.keys()) + + +@dp.longpoll_event_register(*animation_names) +@dp.my_signal_event_register(*animation_names) +def animation_play(event: MySignalEvent): + text = ' '.join(event.msg['text'].split(' ')[1:]) + + if text in {'ф', 'f', 'луна', 'ъуъ'}: + if text == 'ф': + text = text.replace('ф', 'f') + pics = rotating_animations.get(text) + start_player(event.chat.peer_id, event.msg['id'], event.db.access_token, pics, 1, False) + return "ok" + + if 'зарплата' in text: + text = text.replace('зарплата', 'зп') + elif 'дорога' in text: + text = text.replace('дорога', 'дрг') + elif 'поддержка' in text: + text = text.replace('поддержка', 'под') + elif 'помощь' in text: + text = text.replace('помощь', 'под') + + pic = animations.get(text) + if pic: + start_player(event.chat.peer_id, event.msg['id'], event.db.access_token, pic, 1, True) + return "ok" \ No newline at end of file diff --git a/duty/my_signals/chat_administration.py b/duty/my_signals/chat_administration.py new file mode 100644 index 0000000..5e5a92a --- /dev/null +++ b/duty/my_signals/chat_administration.py @@ -0,0 +1,99 @@ +import requests, io +from duty.utils import get_index, find_mention_by_event +from duty.objects import dp, MySignalEvent +from microvk import VkApiResponseException + +# code from: +# vk: http://vk.ru/id194861150 +# github: https://github.com/Alex1249 + +@dp.longpoll_event_register('добавить') +@dp.my_signal_event_register('добавить') +def add_user_in_chat(event: MySignalEvent): + uid=find_mention_by_event(event) + if uid: + if event.msg['peer_id']< 2000000000: + event.msg_op(2, '❗ Работает только в чатах.') + else: + chat_id=event.msg['peer_id'] - 2000000000 + try: + event.api('messages.addChatUser', chat_id=chat_id, user_id=uid) + event.msg_op(3) + except VkApiResponseException as e: + if e.error_code == 15: + if 'already' in e.error_msg: + event.msg_op(2, '🤔 Пользователь уже в беседе') + else: + event.msg_op(2, f'❗ Невозможно добавить указанного пользователя. Может он не в друзьях?') + else: + event.msg_op(2, f'❗ Ошибка VK: {e.error_msg}') + else: + event.msg_op(2, '❗ Необходимо упоминание или ответ на сообщение') + return 'ok' + +@dp.longpoll_event_register('кик') +@dp.my_signal_event_register('кик') +def kick_user_from_chat(event: MySignalEvent): + if get_index(event.args, 0)=='меня': + uid=event.db.owner_id + else: + uid=find_mention_by_event(event) + if uid: + if event.msg['peer_id']< 2000000000: + event.msg_op(2, '❗ Работает только в чатах.') + else: + chat_id = event.msg['peer_id'] - 2000000000 + try: + event.api('messages.removeChatUser', chat_id=chat_id, user_id=uid) + if uid != event.db.owner_id: + event.msg_op(3) + except VkApiResponseException as e: + if e.error_code == 15: + event.msg_op(2, f'❗ Невозможно удалить указанного пользователя. Может не хватает прав в беседе?') + elif e.error_code == 935: + event.msg_op(2, f'❗ В этой беседе нет указанного пользователя') + else: + event.msg_op(2, f'❗ Ошибка VK: {e.error_msg}') + else: + event.msg_op(2, '❗ Необходимо упоминание или ответ на сообщение') + +@dp.longpoll_event_register('+аватарка') +@dp.my_signal_event_register('+аватарка') +def set_cover(event: MySignalEvent): + if event.msg['peer_id']< 2000000000: + event.msg_op(2, '❗ Работает только в чатах.') + else: + attachment=event.msg['attachments'] + if len(attachment)==0: + event.msg_op(2, '🤔 И какая же аватарка?') + elif len(attachment)>1: + event.msg_op(2, '❗ Прикрепи только одно вложение.') + else: + if attachment[0]['type']=='photo': + try: + orig_cover=f"photo{attachment[0]['photo']['owner_id']}_{attachment[0]['photo']['id']}" + chat_id=event.msg['peer_id'] - 2000000000 + link=attachment[0]['photo']['sizes'][-1]['url'] # поговаривают что, если не программист попытается прочесть эту строчку, то мозг расплавится. Можете проверить! p.s словарная многоножка :D + image = io.BytesIO(requests.get(url = link).content) + image.name = 'cover.jpg' + upload_url=event.api('photos.getChatUploadServer', chat_id=chat_id)['upload_url'] + file=requests.post(upload_url, files= {'file': image}).json()['response'] + event.api('messages.setChatPhoto', file=file) + event.msg_op(2, 'Аватарка беседы изменена на:', attachment=orig_cover) + except VkApiResponseException as e: + event.msg_op(2, f'❗ Невозможно установить аватарку. Может не хватает прав в беседе?') + else: + event.msg_op(2, '🤨 Это не фотография!') + +@dp.longpoll_event_register('-аватарка') +@dp.my_signal_event_register('-аватарка') +def delete_cover(event: MySignalEvent): + if event.msg['peer_id']< 2000000000: + event.msg_op(2, '❗ Работает только в чатах.') + else: + chat_id=event.msg['peer_id'] - 2000000000 + try: + event.api('messages.deleteChatPhoto', chat_id=chat_id) + event.msg_op(2, '✅ Аватарка беседы удалена!') + except VkApiResponseException as e: + event.msg_op(2, f'❗ Невозможно удалить аватарку. Может не хватает прав в беседе?') diff --git a/duty/my_signals/chat_users.py b/duty/my_signals/chat_users.py new file mode 100644 index 0000000..9627d73 --- /dev/null +++ b/duty/my_signals/chat_users.py @@ -0,0 +1,99 @@ +from typing import Tuple, List +from math import ceil +from duty.utils import get_index, format_push +from duty.objects import dp, MySignalEvent + + +def users_getter(event: MySignalEvent) -> Tuple[MySignalEvent, List[dict], List[dict]]: # noqa + all_users = event.api('messages.getConversationMembers', + peer_id=event.chat.peer_id) + + def find_member_info(uid: int, group: bool) -> dict: + for user in all_users['groups'] if group else all_users['profiles']: + if user['id'] == uid: + return user + + users = [] + groups = [] + for member in all_users['items']: + if member['member_id'] > 0: + info = find_member_info(member['member_id'], False) + info.update(member) + users.append(info) + else: + info = find_member_info(abs(member['member_id']), True) + info.update(member) + groups.append(info) + return event, users, groups + + +@dp.longpoll_event_register('люди') +@dp.my_signal_event_register('люди') +@dp.wrap_handler(users_getter) +def list_users(event: MySignalEvent, users: List[dict], _): + try: + page = int(get_index(event.args, 0, 1)) - 1 + if page < 0: + raise ValueError + except ValueError: + page = 0 + count = len(users) + pages = ceil(count/20) + msg = '' + for i, user in enumerate(users[page*20:page*20+20], 1 + page*20): + msg += f"\n{i}. [id{user['id']}|{user['first_name']} {user['last_name']}]" # noqa + if msg == '': + msg = f'Страница {page + 1} пуста' + else: + msg = f'Участники беседы (страница {page + 1} из {pages}):' + msg + event.msg_op(1, msg, disable_mentions=1, reply_to=event.msg['id']) + return "ok" + + +@dp.longpoll_event_register('боты') +@dp.my_signal_event_register('боты') +@dp.wrap_handler(users_getter) +def list_groups(event: MySignalEvent, _, groups: List[dict]): + try: + page = int(get_index(event.args, 0, 1)) - 1 + if page < 0: + raise ValueError + except ValueError: + page = 0 + count = len(groups) + pages = ceil(count/20) + msg = '' + for i, group in enumerate(groups[page*20:page*20+20], 1 + page*20): + msg += f"\n{i}. [public{group['id']}|{group['name']}]" + if msg == '': + msg = f'Страница {page + 1} пуста' + else: + msg = f'Группы беседы (страница {page + 1} из {pages}):' + msg + event.msg_op(2, msg) + return "ok" + + +@dp.longpoll_event_register('беседа', 'чат') +@dp.my_signal_event_register('беседа', 'чат') +@dp.wrap_handler(users_getter) +def chat_info(event: MySignalEvent, users: List[dict], groups: List[dict]): + admins = [] + owner = None + for member in users + groups: + if member.get('is_owner') is True: + owner = member + elif member.get('is_admin') is True: + admins.append('\n-- ' + format_push(member)) + msg = f""" + Беседа: {event.chat.name} + Создатель: {format_push(owner)} + Iris ID: {event.chat.iris_id} + Я дежурный в чате: {'✅' if event.chat.installed else '❌'} + Население чата: {len(users) + len(groups)} + Участников: {len(users)} + Ботов: {len(groups)} + + Администраторы:{''.join(admins) if admins else ' НЕМА'} + """.replace(' ', '') + event.msg_op(1, msg, disable_mentions=1, reply_to=event.msg['id']) + return "ok" diff --git a/duty/my_signals/cum.py b/duty/my_signals/cum.py new file mode 100644 index 0000000..b25373c --- /dev/null +++ b/duty/my_signals/cum.py @@ -0,0 +1,52 @@ +import requests + +from io import BytesIO +from PIL import Image + +from duty.utils import path_from_root +from duty.objects import dp, MySignalEvent + + +@dp.longpoll_event_register('сперм', 'sperm') +@dp.my_signal_event_register('сперм', 'sperm') +def cum(event: MySignalEvent) -> str: + if not (event.attachments or event.reply_message): + event.msg_op(2, "❗ Нет данных") + return "ok" + + if event.reply_message: + event.attachments = event.reply_message['attachments'] + if event.attachments: + if event.attachments[0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не из картинки сделаю картинОчку?') + return "ok" + url = event.attachments[0]['photo']['sizes'][-1]['url'] + else: + if event.msg['attachments'][0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не из картинки сделаю картинОчку?') + return "ok" + url = event.msg['attachments'][0]['photo']['sizes'][-1]['url'] + + width = 200 + height = 265 + out_path = path_from_root('content', 'cum_out.png') + + bg = Image.open(path_from_root('content', 'background.png'), 'r') + image = Image.open( + BytesIO(requests.get(url).content) + ).resize((width, height), Image.ANTIALIAS) + + img = Image.new('RGBA', (660, 401), (0, 0, 0, 0)) + img.paste(image, (213, 109)) + img.paste(bg, (0, 0), mask=bg) + img.save(out_path, format="png") + + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + with open(out_path, 'rb') as out_image: + uploaded = requests.post(upload_url, files={'photo': out_image}).json() + + att = event.api('photos.saveMessagesPhoto', **uploaded)[0] + event.edit( + attachment=f'photo{att["owner_id"]}_{att["id"]}', keep_forward_messages=1 + ) + return "ok" \ No newline at end of file diff --git a/duty/my_signals/deleting.py b/duty/my_signals/deleting.py new file mode 100644 index 0000000..81b9fdb --- /dev/null +++ b/duty/my_signals/deleting.py @@ -0,0 +1,37 @@ +from duty.objects import dp, MySignalEvent +import re + + +@dp.longpoll_event_register('-смс', 'дд') +@dp.my_signal_event_register('-смс', 'дд', skip_receiving=True) +def delete_self_message(event: MySignalEvent) -> str: + count = re.search(r'\d+', event.msg['text']) + event.api.raise_excepts = False + if not count: + count = 2 + else: + count = int(count[0]) + 1 + if 'все' in event.msg['text']: + count = 200 + + if not event.db.settings['silent_deleting']: + event.msg_op(2, event.responses['del_self']) + + event.api.exe(""" + var i = 0; + var msg_ids = {}; + var tn = %s; + var count = %s; + var items = API.messages.getHistory({"peer_id":"%s","count":"200", "offset":"0"}).items; + while (count > 0 && i < items.length) { + if (items[i].out == 1){ + msg_ids.push(items[i].id); + count = count - 1; + }; + if ((tn - items[i].date) > 86400) {count = 0;}; + i = i + 1; + }; + API.messages.delete({"message_ids": msg_ids,"delete_for_all":"1"}); + return count; + """ % (event.msg['date'], count, event.chat.peer_id)) + return "ok" diff --git a/duty/my_signals/demotivators.py b/duty/my_signals/demotivators.py new file mode 100644 index 0000000..9149dbf --- /dev/null +++ b/duty/my_signals/demotivators.py @@ -0,0 +1,48 @@ +from duty.objects import MySignalEvent, dp +import requests, os +from simpledemotivators import Demotivator + + +@dp.my_signal_event_register('дем') +def dem(event: MySignalEvent) -> str: + if not (event.attachments or event.reply_message): + event.msg_op(2, "❗ Нет данных") + return "ok" + + if event.reply_message: + event.attachments = event.reply_message['attachments'] + print(event.attachments) + if event.attachments: + if event.attachments[0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не из картинки сделаю демотиватор?') + return "ok" + url = event.attachments[0]['photo']['sizes'][-1]['url'] + else: + if event.msg['attachments'][0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не из картинки сделаю демотиватор?') + return "ok" + url = event.msg['attachments'][0]['photo']['sizes'][-1]['url'] + r = requests.get(url) + out = open('input.png', "wb") + out.write(r.content) + out.close() + args = event.msg['text'].split('\n') + args.append('') + try: + dem = Demotivator(args[1], args[2]) + dem.create('input.png') + except: + dem = Demotivator('А чё писать то?', '') + dem.create('input.png') + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + uploaded = requests.post(upload_url, files={'photo': open("output.png", 'rb')}).json() + a = event.api('photos.saveMessagesPhoto', server=uploaded["server"], photo=uploaded["photo"], hash=uploaded["hash"])[0] + event.msg_op(2, '', attachment=f'photo{a["owner_id"]}_{a["id"]}') + os.remove('input.png') + os.remove("output.png") + return "ok" + + + + + diff --git a/duty/my_signals/farm.py b/duty/my_signals/farm.py new file mode 100644 index 0000000..5cb5977 --- /dev/null +++ b/duty/my_signals/farm.py @@ -0,0 +1,25 @@ +from duty.objects import dp, MySignalEvent +from time import sleep + + +farm_data = { + "owner_id": -174105461, + "post_id": 6713149 +} + + +@dp.longpoll_event_register('ферма') +@dp.my_signal_event_register('ферма') +def farming(event: MySignalEvent) -> str: + comment_id = event.api('wall.createComment', + message='ферма', **farm_data)['comment_id'] + event.edit('⏱ Комментарий оставлен...') + sleep(2) + replies = event.api('wall.getComments', + **farm_data, comment_id=comment_id)['items'] + if replies: + text = replies[0]['text'].rpartition('\n') + event.edit(text[0] or text[2]) + else: + event.edit('😐 Ирис не ответил.') + return "ok" diff --git a/duty/my_signals/friends.py b/duty/my_signals/friends.py new file mode 100644 index 0000000..8f5d0e7 --- /dev/null +++ b/duty/my_signals/friends.py @@ -0,0 +1,68 @@ +from duty.objects import dp, MySignalEvent +from duty.utils import find_mention_by_event +from microvk import VkApiResponseException + + +@dp.longpoll_event_register('+др', '+друг', '-др', '-друг') +@dp.my_signal_event_register('+др', '+друг', '-др', '-друг') +def change_friend_status(event: MySignalEvent) -> str: + user_id = find_mention_by_event(event) + if user_id: + if event.command.startswith('-др'): + try: + status = event.api('friends.delete', user_id=user_id) + if status.get('friend_deleted'): msg = "💔 Пользователь удален из друзей" + elif status.get('out_request_deleted'): msg = "✅ Отменена исходящая заявка" + elif status.get('in_request_deleted'): msg = "✅ Отклонена входящая заявка" + elif status.get('suggestion_deleted'): msg = "✅ Отклонена рекомендация друга" + else: msg = "❗ Произошла ошибка" + except VkApiResponseException as e: + msg = f"❗ Произошла ошибка VK №{e.error_code} {e.error_msg}" + else: + try: + status = event.api('friends.add', user_id = user_id) + if status == 1: msg = "✅ Заявка отправлена" + elif status == 2: msg = "✅ Пользователь добавлен" + else: msg = "✅ Заявка отправлена повторно" + except VkApiResponseException as e: + if e.error_code == 174: + msg = "🤔 Ты себя добавить хочешь?" + elif e.error_code == 175: + msg = "❗ Ты в ЧС данного пользователя" + elif e.error_code == 176: + msg = "❗ Пользователь в ЧС" + else: + msg = f"❗ Ошибка: {e.error_msg}" + else: + msg = "❗ Необходимо пересланное сообщение или упоминание" + event.msg_op(2, msg) + return "ok" + + +@dp.longpoll_event_register('+чс', '-чс') +@dp.my_signal_event_register('+чс', '-чс') +def ban_user(event: MySignalEvent) -> str: + user_id = find_mention_by_event(event) + if user_id: + if event.command == '+чс': + try: + if event.api('account.ban', owner_id=user_id) == 1: + msg = '😡 Забанено' + except VkApiResponseException as e: + if e.error_msg.endswith('already blacklisted'): + msg = '❗ Пользователь уже забанен' + else: + msg = f'❗ Ошиб_очка: {e.error_msg}' + else: + try: + if event.api('account.unban', owner_id = user_id) == 1: + msg = '💚 Разбанено' + except VkApiResponseException as e: + if e.error_msg.endswith('not blacklisted'): + msg = '👌🏻 Пользователь не забанен' + else: + msg = f'❗ Ошиб_очка: {e.error_msg}' + else: + msg = "❗ Необходимо пересланное сообщение или упоминание" + event.msg_op(2, msg) + return "ok" \ No newline at end of file diff --git a/duty/my_signals/give_anime.py b/duty/my_signals/give_anime.py new file mode 100644 index 0000000..9697335 --- /dev/null +++ b/duty/my_signals/give_anime.py @@ -0,0 +1,49 @@ +from io import BytesIO +import requests +from duty.objects import dp, MySignalEvent + + +# Прошу прощения за говнокод. Лень было функцию для загрузки делать :) +@dp.longpoll_event_register('неко') +@dp.my_signal_event_register('неко') +def neko(event: MySignalEvent) -> str: + event.msg_op(2, "⏱️Секунду...") + img_url = requests.get("https://api.loli-art.ru/arts?count=1").json()["arts"][0] + image = BytesIO(requests.get(url=img_url).content) + image.name = 'neko.jpg' + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + data = requests.post(upload_url, files={'photo': image}).json() + del (image) + saved = event.api('photos.saveMessagesPhoto', photo=data['photo'], + hash=data['hash'], server=data['server'])[0] + event.msg_op(2, "Держи свою Неко :)", attachment=f"photo{saved['owner_id']}_{saved['id']}_{saved['access_key']}") + + +@dp.longpoll_event_register('лоли') +@dp.my_signal_event_register('лоли') +def loli(event: MySignalEvent) -> str: + event.msg_op(2, "⏱️Секунду...") + img_url = requests.get("https://api.loli-art.ru/arts?count=1").json()["arts"][0] + image = BytesIO(requests.get(url=img_url).content) + image.name = 'neko.jpg' + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + data = requests.post(upload_url, files={'photo': image}).json() + del (image) + saved = event.api('photos.saveMessagesPhoto', photo=data['photo'], + hash=data['hash'], server=data['server'])[0] + event.msg_op(2, "Держи свою Лоли :)", attachment=f"photo{saved['owner_id']}_{saved['id']}_{saved['access_key']}") + + +@dp.longpoll_event_register('хентай') +@dp.my_signal_event_register('хентай') +def neko_hentai(event: MySignalEvent) -> str: + event.msg_op(2, "⏱️Секунду...") + img_urls = requests.get("https://api.waifu.pics/nsfw/neko").json()['url'] + image = BytesIO(requests.get(url=img_urls).content) + image.name = 'neko.jpg' + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + data = requests.post(upload_url, files={'photo': image}).json() + del (image) + saved = event.api('photos.saveMessagesPhoto', photo=data['photo'], + hash=data['hash'], server=data['server'])[0] + event.msg_op(2, "Держи свой хентай :)", attachment=f"photo{saved['owner_id']}_{saved['id']}_{saved['access_key']}") diff --git a/duty/my_signals/info.py b/duty/my_signals/info.py new file mode 100644 index 0000000..6524967 --- /dev/null +++ b/duty/my_signals/info.py @@ -0,0 +1,24 @@ +from duty.objects import dp, MySignalEvent, __version__ +from duty.utils import ment_user, format_response +from .updating import get_last_version + + +@dp.longpoll_event_register('инфо', 'инфа', '-i', 'info') +@dp.my_signal_event_register('инфо', 'инфа', '-i', 'info') +def info(event: MySignalEvent) -> str: + update_info = '' + last_v, changes = get_last_version() + if last_v != __version__: + update_info = 'Доступно обновление! Новая версия: ' + last_v + '\n' + if changes != '': + update_info += 'Что нового:\n' + changes + '\n\n' + owner = event.api('users.get', user_ids=event.db.owner_id)[0] + message = format_response(event.responses['info_myself'], + чаты=len(event.db.chats.keys()), + владелец=ment_user(owner), + ид=event.chat.iris_id, + имя=event.chat.name, + версия=__version__ + ) + event.msg_op(2, update_info + message) + return "ok" diff --git a/duty/my_signals/instagramfilters.py b/duty/my_signals/instagramfilters.py new file mode 100644 index 0000000..e3d9b05 --- /dev/null +++ b/duty/my_signals/instagramfilters.py @@ -0,0 +1,79 @@ +from duty.objects import MySignalEvent, dp +import requests, os + + +@dp.longpoll_event_register('инст') +@dp.my_signal_event_register('инст') +def initial(event: MySignalEvent) -> str: + try: + from instafilter import Instafilter + except ImportError: + event.msg_op(2, 'Скачиваю зависимость...') + os.system('python3.8 -m pip install git+https://github.com/Obnovlator3000/instafilter.git') + __import__('uwsgi').reload() + event.msg_op(2, 'Перезагружаюсь... На всякий случай, после этого пропиши ".с инст"') + try: + import cv2 + event.msg_op(2, 'Все готово!') + except ImportError: + event.msg_op(2, 'Скачиваю зависимость...') + os.system('python3.8 -m pip install opencv-python') + __import__('uwsgi').reload() + event.msg_op(2, 'Перезагружаюсь...') + return "ok" + + +@dp.longpoll_event_register('фильтры') +@dp.my_signal_event_register('фильтры') +def filternames(event: MySignalEvent) -> str: + event.msg_op(2, "Список фильтров и их отличия: https://vk.ru/@ircaduty-insta-filtry") + + +@dp.longpoll_event_register('фильтр') +@dp.my_signal_event_register('фильтр') +def insta(event: MySignalEvent) -> str: + try: + from instafilter import Instafilter + import cv2 + except ImportError: + event.msg_op(1, 'Сначала нужно доустановить одну зависимость, щас сделаю...') + event.msg_op(1, f'{event.msg["text"].split()[0]} инст') + return "ok" + if not (event.attachments or event.reply_message): + event.msg_op(2, "❗ Нет данных") + return "ok" + + if event.reply_message: + event.attachments = event.reply_message['attachments'] + print(event.attachments) + if event.attachments: + if event.attachments[0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не на картинку наложу фильтр?') + return "ok" + url = event.attachments[0]['photo']['sizes'][-1]['url'] + else: + if event.msg['attachments'][0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не на картинку наложу фильтр?') + return "ok" + url = event.msg['attachments'][0]['photo']['sizes'][-1]['url'] + r = requests.get(url) + out = open(os.path.join(os.getcwd(), 'input.png'), "wb") + out.write(r.content) + out.close() + + filtername = event.msg['text'].split()[-1] + filters = ['1977', 'Aden', 'Amaro', 'Ashby', 'Brannan', 'Brooklyn', 'Charmes', 'Clarendon', 'Crema', 'Dogpatch', 'Earlybird', 'Gingham', 'Ginza', 'Hefe', 'Helena', 'Hudson', 'Inkwell', 'Juno', 'Kelvin', 'Lark', 'Lo-Fi', 'Ludwig', 'Mayfair', 'Melvin', 'Moon', 'Nashville', 'Perpetua', 'Reyes', 'Rise', 'Sierra', 'Skyline', 'Slumber', 'Stinson', 'Sutro', 'Toaster', 'Valencia', 'Vesper', 'Walden', 'Willow', 'X-ProII'] + if filtername == 'фильтр' or filtername not in filters: + event.msg_op(2, f'Доступные фильтры: {", ".join(filters)}') + return "ok" + model = Instafilter(filtername) + new_image = model(os.path.join(os.getcwd(), 'input.png')) + cv2.imwrite("output.png", new_image) + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + uploaded = requests.post(upload_url, files={'photo': open("output.png", 'rb')}).json() + a = event.api('photos.saveMessagesPhoto', server=uploaded["server"], photo=uploaded["photo"], hash=uploaded["hash"])[0] + event.msg_op(2, '', attachment=f'photo{a["owner_id"]}_{a["id"]}') + + os.remove('input.png') + os.remove("output.png") + return "ok" diff --git a/duty/my_signals/links.py b/duty/my_signals/links.py new file mode 100644 index 0000000..d529ac7 --- /dev/null +++ b/duty/my_signals/links.py @@ -0,0 +1,30 @@ +import requests +import traceback +from duty.objects import dp, MySignalEvent + + + +@dp.longpoll_event_register('сс', 'сс') +@dp.my_signal_event_register('сс', 'сс') +def ssilka(event: MySignalEvent) -> str: + ss = " ".join(event.args) + try: + url = requests.get(f'https://api.vk.ru/method/utils.getShortLink?&v=5.131&url={ss}&access_token={event.db.me_token}') + response__json = url.json()['response']['key'] + requests.get(f"https://api.vk.ru/method/utils.deleteFromLastShortened?&v=5.131&key={response__json}&access_token={event.db.me_token}") + event.msg_op(2, f'⚙ Ваша ссылка: vk.cc/{response__json}') + except Exception: + print(traceback.format_exc()) + return "ok" + +@dp.longpoll_event_register('-сс', '-сс') +@dp.my_signal_event_register('-сс', '-сс') +def checkLink(event: MySignalEvent) -> str: + ss = ss = " ".join(event.args) + try: + url = requests.get(f'https://api.vk.ru/method/utils.checkLink?&v=5.131&url={ss}&access_token={event.db.me_token}') + response__json = url.json()['response']['link'] + event.msg_op(2, f'⚙ Ваша ссылка: {response__json}') + except Exception: + print(traceback.format_exc()) + return "ok" \ No newline at end of file diff --git a/duty/my_signals/misc.py b/duty/my_signals/misc.py new file mode 100644 index 0000000..9c807f3 --- /dev/null +++ b/duty/my_signals/misc.py @@ -0,0 +1,349 @@ +# TODO: навести марафет +import io +import re +import json +import time +import requests +from datetime import datetime, timezone, timedelta + +from duty.utils import find_mention_by_event +from duty.api_utils import get_last_th_msgs +from duty.objects import dp, MySignalEvent + + +# Автор: https://vk.ru/id570532674, доработал: https://vk.ru/id194861150 +@dp.longpoll_event_register('хелп', 'help') +@dp.my_signal_event_register('хелп', 'help') +def a(event: MySignalEvent) -> str: + event.edit(f''' + 📗Команды IrCA Duty: vk.ru/@ircaduty-comands + ⚙ Установка: https://vk.cc/c3coi7 + 💻 Исходный код: https://vk.cc/bZPeP4 + 🔧 Установка LP: https://vk.cc/c3cpNq + 📈 Команды LP: https://vk.cc/c3cpUH + 📓 Ваша админ панель: {event.db.host} + '''.replace(' ', '')) + return "ok" + + +@dp.my_signal_event_register('кража') +def little_theft(event: MySignalEvent) -> str: + if not event.args[0].startswith('ав'): return "ok" + event.delete() + uid = event.reply_message['from_id'] + if not uid: + return "ok" + image_url = event.api('users.get', fields='photo_max_orig', + user_ids=uid)[0]['photo_max_orig'] + image = io.BytesIO(requests.get(url=image_url).content) + image.name = 'ava.jpg' + upload_url = event.api('photos.getOwnerPhotoUploadServer')['upload_url'] + data = requests.post(upload_url, files={'photo': image}).json() + del (image) + post_id = event.api('photos.saveOwnerPhoto', photo=data['photo'], + hash=data['hash'], server=data['server'])['post_id'] + event.send('😑😑😑', attachment=f'wall{event.db.owner_id}_{post_id}') + return "ok" + + +@dp.my_signal_event_register('пуши', 'уведы') +def mention_search(event: MySignalEvent): + mention = f'[id{event.db.owner_id}|' + msg_ids = [] + + for msg in get_last_th_msgs(event.chat.peer_id, event.api): + if event.time - msg['date'] >= 86400: break + if mention in msg['text']: + msg_ids.append(str(msg['id'])) + + if not msg_ids: + msg = 'Ничего не нашел 😟' + else: + msg = 'Собсна, вот что нашел за последние 24 часа:' + + event.msg_op(1, msg, forward_messages=','.join(msg_ids)) + return "ok" + + +@dp.my_signal_event_register('ксмс') +def tosms(event: MySignalEvent): + cm_id = re.search(r'\d+', event.msg['text'])[0] + msg = event.api('messages.getByConversationMessageId', + conversation_message_ids=cm_id, + peer_id=event.chat.peer_id)['items'] + if msg: + if msg[0].get('action'): + event.msg_op(2, 'Это сообщение - действие, не могу переслать') + else: + event.msg_op(1, 'Вот ента:', forward_messages=msg[0]['id']) + else: + event.msg_op(2, '❗ ВК вернул пустой ответ') + return "ok" + + +@dp.my_signal_event_register('вкошибка') +def allo(event: MySignalEvent) -> str: + event.api('execute', code='ага, попався, питонист!') + return "ok" + + +@dp.my_signal_event_register('алло') +def allo(event: MySignalEvent) -> str: + event.msg_op(1, 'Че с деньгами?', attachment='audio332619272_456239384') + return "ok" + + +@dp.longpoll_event_register('рестарт') +@dp.my_signal_event_register('рестарт') +def restart(event: MySignalEvent) -> str: + __import__('uwsgi').reload() + event.msg_op(2, '...в процессе...') + return "ok" + + +@dp.my_signal_event_register('тест') +def test(event: MySignalEvent) -> dict: + return {"response": "error", "error_code": "0", "error_message": "Опа, кастомки подвезли"} + + +@dp.longpoll_event_register('время') +@dp.my_signal_event_register('время') +def timecheck(event: MySignalEvent) -> str: + current_time = datetime.now(timezone(timedelta(hours=+3))).strftime(f"✨ Россия, Москва\n⏰ Время: %H:%M:%S\n📆 Дата: %d/%m/%Y\n\n⚙️ С нового года прошло: %j дней") + event.msg_op(2, current_time) + return "ok" + + +@dp.my_signal_event_register('взлом') +def ass_crackin(event: MySignalEvent) -> str: + if event.args[0] != 'жопы': return "ok" + fail = True + event.msg_op(2, '☝🏻 Начинаю взлом жопы...') + time.sleep(1) + event.msg_op(1, 'передать 1 [id332619272|челику]\nна пивас', disable_mentions=1) + time.sleep(4) + for msg in event.api('messages.getHistory', count=10, peer_id=event.chat.peer_id)['items']: + if '🍬 [id332619272|' in msg['text']: + fail = False + event.msg_op(1, '💚 Взлом жопы прошел успешно') + break + if fail: + event.msg_op(1, '👀 Взлом жопы прошел неудачно, ослабьте анальную защиту') + return "ok" + + +@dp.my_signal_event_register('опрос') +def pollcreate(event: MySignalEvent) -> str: + answers = event.payload.split('\n') + if not answers: + event.msg_op(2, 'Необходимо указать варианты ответов (с новой строки)') + return + if len(answers) > 10: + answers = answers[:10] + warning = '⚠️ Максимальное количество ответов - 10' + else: + warning = '' + poll = event.api('polls.create', question=" ".join(event.args), + add_answers=json.dumps(answers, ensure_ascii=False)) + event.msg_op(2, warning, attachment=f"poll{poll['owner_id']}_{poll['id']}") + return "ok" + + +@dp.my_signal_event_register('спам') +def spam(event: MySignalEvent) -> str: + count = 1 + delay = 0.5 + if event.args != None: + if event.args[0] == 'капча': + count = 100 + else: + count = int(event.args[0]) + if len(event.args) > 1: + delay = int(event.args[1]) + if event.payload: + for i in range(count): + event.msg_op(1, event.payload) + time.sleep(delay) + else: + for i in range(count): + event.msg_op(1, f'spamming {i + 1}/{count}') + time.sleep(delay) + return "ok" + + +@dp.longpoll_event_register('прочитать') +@dp.my_signal_event_register('прочитать') +def readmes(event: MySignalEvent) -> str: + restricted = {'user'} + if event.args: + if event.args[0].lower() in {'все', 'всё'}: + restricted = set() + elif event.args[0].lower() == 'беседы': + restricted = {'group', 'user'} + elif event.args[0].lower() == 'группы': + restricted = {'chat', 'user'} + event.msg_op(2, "🕵‍♂ Читаю сообщения...") + convers = event.api('messages.getConversations', count=200)['items'] + chats = private = groups = 0 + to_read = [] + code = 'API.messages.markAsRead({"peer_id": %s});' + to_execute = '' + for conv in convers: + conv = conv['conversation'] + if conv['in_read'] != conv['last_message_id']: + if conv['peer']['type'] in restricted: + continue + to_read.append(conv['peer']['id']) + if conv['peer']['type'] == 'chat': + chats += 1 + elif conv['peer']['type'] == 'user': + private += 1 + elif conv['peer']['type'] == 'group': + groups += 1 + + while len(to_read) > 0: + for _ in range(25 if len(to_read) > 25 else len(to_read)): + to_execute += code % to_read.pop() + event.api.exe(to_execute, event.db.me_token) + time.sleep(0.1) # TODO: это вообще нужно на PA? + to_execute = '' + + message = '✅ Диалоги прочитаны:' + if chats: message += f'\nБеседы: {chats}' + if private: message += f'\nЛичные: {private}' + if groups: message += f'\nГруппы: {groups}' + if message == '✅ Диалоги прочитаны:': + message = '🤔 Непрочитанных сообщений нет' + + event.msg_op(2, message) + return "ok" + + +@dp.my_signal_event_register('мессага') +def message(event: MySignalEvent) -> str: + msg = '' + if event.args != None: + rng = int(event.args[0]) + else: + rng = 1 + for _ in range(0, rng): + msg += 'ᅠ\n' + event.msg_op(1, msg) + return "ok" + + +@dp.my_signal_event_register('свалить') +def gtfo(event: MySignalEvent) -> str: + event.msg_op(1, 'Процесс сваливания начат ✅') + for _ in 1, 2, 3, 4, 5: + time.sleep(3) + event.msg_op(1, 'ирис рулетка') + event.msg_op(1, 'Так, щас капчу словлю, поэтому хватит\nНе расстраивайся, повезет в следующий раз') + try: + event.msg_op(1, sticker_id=17762) + except: + pass + finally: + return "ok" + + +@dp.my_signal_event_register('повтори') +def repeat(event: MySignalEvent) -> str: + delay = 0.1 + if event.payload: + delay = int(event.payload) + site = " ".join(event.args) # лол, а почему оно так называется? + time.sleep(delay) + event.msg_op(1, site) + return "ok" + + +@dp.longpoll_event_register('статус') +@dp.my_signal_event_register('статус') +def status(event: MySignalEvent) -> str: + status = " ".join(event.args) + ' ' + event.payload + msg = event.msg_op(1, 'Устанавливаю статус...') + try: + event.api("status.set", text=status) + event.msg_op(2, 'Статус успешно установлен') + except: + event.msg_op(2, 'Ошибка установки статуса') + return "ok" + + +@dp.my_signal_event_register('бот') +def imhere(event: MySignalEvent) -> str: + event.msg_op(1, sticker_id=11247) + return "ok" + + +@dp.my_signal_event_register('кто') +def whois(event: MySignalEvent) -> str: + if event.args == None: + event.msg_op(1, 'Кто?', reply_to=event.msg['id']) + return "ok" + var = event.api('utils.resolveScreenName', screen_name=event.args[0]) + type = 'Пользователь' if var['type'] == 'user' else "Группа" if var['type'] == 'group' else "Приложение" + event.msg_op(1, f"{type}\nID: {var['object_id']}") + return "ok" + + +@dp.my_signal_event_register('ж') +def zh(event: MySignalEvent) -> str: + mes = event.payload + rng = len(event.payload) + if rng > 15: + event.msg_op(1, '❗ Слишком длинное сообщение, будет прокручено не полностью') + rng = 15 + msg = event.msg_op(1, mes) + for _ in range(rng): + mes = mes[-1:] + mes[:-1] + event.api.msg_op(2, event.chat.peer_id, mes, event.msg['id']) + time.sleep(1) + return "ok" + + +#Вклад vk.ru/id266287518 и vk.ru/id197786896 +@dp.longpoll_event_register('стики') +@dp.my_signal_event_register('стики') +def stick(event: MySignalEvent): + uid = find_mention_by_event(event) + if not uid: + return "ok" + + if uid < 0: + event.msg_op(2, 'У групп нет стикеров!') + return "ok" + + url = 'https://api.vk.ru/method/gifts.getCatalog?v=5.131&user_id={}&access_token={}'.format(uid, event.db.me_token) + stickers = requests.get(url, headers={ + "user-agent": "VKAndroidApp/1.123-123 (Android 123; SDK 123; IrCA; 1; ru; 123x123)"}).json() + stickers = stickers['response'] + + url_f = 'https://api.vk.ru/method/gifts.getCatalog?v=5.131&user_id=627689528&access_token={}'.format(event.db.me_token) + stickers_filter = requests.get(url_f, headers={ + "user-agent": "VKAndroidApp/1.123-123 (Android 123; SDK 123; IrCA; 1; ru; 123x123)"}).json() + stickers_filter = stickers_filter['response'][1]['items'][2:] + + sticker_list = [ + f"{i['sticker_pack']['title']}" + for i in stickers[1]['items'] + if 'disabled' in i + ] + + sum_price_golosa = sum( + d['price'] for d in stickers_filter if d['sticker_pack']['title'] in sticker_list) # цена в голосах + + sum_stick_price_golosa = str(sum_price_golosa) # цена в голосах + sum_stick_price_rub = str(sum_price_golosa * 7) # цена в рублях + count = str(len(sticker_list)) # количество стикер паков + + if count == 0: + out_message = ".\n🥺 Платных стикерпаков у пользователя нет." + event.msg_op(2, out_message, disable_mentions=1, reply_to=event.msg['id']) + return "ok" + else: + user = event.api('users.get', user_ids=uid)[0] + out_message = f'''[id{user['id']}|{user['first_name']} {user['last_name']}]:\n🤑|Стикеров: {count}\n💰|Стоимость: {sum_stick_price_rub}₽ | {sum_stick_price_golosa} голосов\n\n📄|Списочек: {', '.join(sticker_list)}.''' + event.msg_op(2, out_message, disable_mentions=1, reply_to=event.msg['id'], keep_forward_messages=1) + return "ok" diff --git a/duty/my_signals/offline.py b/duty/my_signals/offline.py new file mode 100644 index 0000000..939823c --- /dev/null +++ b/duty/my_signals/offline.py @@ -0,0 +1,24 @@ +from duty.objects import dp, MySignalEvent +from duty.api_utils import set_online_privacy + + +@dp.longpoll_event_register('+оффлайн') +@dp.my_signal_event_register('+оффлайн') +def hide_online(event: MySignalEvent): + if set_online_privacy(event.db): + msg = '🍭 Онлайн скрыт' + else: + msg = '🐶 Произошла ошибка' + event.msg_op(2, msg) + return "ok" + + +@dp.longpoll_event_register('-оффлайн') +@dp.my_signal_event_register('-оффлайн') +def reveal_online(event: MySignalEvent): + if set_online_privacy(event.db, 'all'): + msg = '🍒 Онлайн открыт для всех' + else: + msg = '🐶 Произошла ошибка' + event.msg_op(2, msg) + return "ok" diff --git a/duty/my_signals/ping.py b/duty/my_signals/ping.py new file mode 100644 index 0000000..2854600 --- /dev/null +++ b/duty/my_signals/ping.py @@ -0,0 +1,41 @@ +from duty.objects import dp, MySignalEvent, LongpollEvent +from duty.utils import format_response +from datetime import datetime + +pings = { + "пинг": "ПОНГ", + "кинг": "КОНГ", + "пиу": "ПАУ", + "тик": "ТОК", + "ping": "PONG", + "king": "The Lion King*", + "tick": "tick-tock-tack" +} + + +@dp.my_signal_event_register(*pings.keys()) +def ping(event: MySignalEvent) -> str: + c_time = datetime.now().timestamp() + delta = round(c_time - event.msg['date'], 2) + + event.msg_op(2, format_response(event.responses['ping_myself'], + время=delta, + ответ=pings.get(event.command), + обработано=round(datetime.now().timestamp() - event.time - event.vk_response_time, 2), # noqa + пингвк=round(event.vk_response_time, 2) + )) + return "ok" + + +@dp.my_signal_event_register('пингб', skip_receiving=True) +def ping_bf(event: MySignalEvent) -> str: + event.msg_op(1, 'PONG') + return "ok" + + +@dp.longpoll_event_register(*pings.keys()) +def ping_lp(event: LongpollEvent) -> str: + c_time = datetime.now().timestamp() + delta = round(c_time - event.msg['date'], 2) + event.msg_op(2, f'{pings.get(event.command)} LP\nОтвет через {delta}сек.') + return "ok" diff --git a/duty/my_signals/private_message_send.py b/duty/my_signals/private_message_send.py new file mode 100644 index 0000000..38cb769 --- /dev/null +++ b/duty/my_signals/private_message_send.py @@ -0,0 +1,38 @@ +from datetime import datetime +from time import sleep +from duty.utils import find_mention_by_event +from microvk import VkApiResponseException +from duty.objects import MySignalEvent, dp + + +@dp.longpoll_event_register('в', 'влс') +@dp.my_signal_event_register('в', 'влс') +def send_private(event: MySignalEvent) -> str: + def abort(text): + event.msg_op(2, text) + return "ok" + if event.command == 'в': + if event.args[0] != 'лс': + return "ok" + uid = find_mention_by_event(event) + if uid: + if not (event.payload or event.attachments): + if event.args and event.reply_message: + if event.args[0] == 'лс' and len(event.args == 1): + abort('❗ Нет данных') + else: + event.payload = ' '.join(event.args) + else: + abort('❗ Нет данных') + try: + event.api.msg_op(1, uid, event.payload, attachment = ','.join(event.attachments)) + msg = '✅ Сообщение отправлено' + except VkApiResponseException as e: + if e.error_code == 902: + msg = '❗ Пользователь ограничил круг лиц, которые могут отправлять ему сообщения' + else: + msg = f'❗ Ошибка VK №{e.error_code}: {e.error_msg}' + event.msg_op(2, msg) + else: + event.msg_op(2, '❗ Необходимо упоминание или ответ на сообщение') + return "ok" diff --git a/duty/my_signals/reg_info.py b/duty/my_signals/reg_info.py new file mode 100644 index 0000000..9480e5d --- /dev/null +++ b/duty/my_signals/reg_info.py @@ -0,0 +1,51 @@ +import requests +import datetime +from duty.objects import dp, MySignalEvent +from duty.utils import find_mention_by_event, format_push + + +@dp.longpoll_event_register('рег') +@dp.my_signal_event_register('рег') +def reg_info(event: MySignalEvent) -> str: + uid = find_mention_by_event(event) + if not uid: + uid = event.db.owner_id + user = event.api( + 'users.get', + user_ids=uid, + fields="last_name_abl,first_name_abl")[0] + event.msg_op(2, f"👤 Пользователь {format_push(user)}\n{regday(uid)}") + + +def regday(uid): + url = 'https://vk.ru/foaf.php?id=' + str(uid) + response = requests.get(url).text + num = response.find(' Union[str, dict]: + uid = find_mention_by_event(event) + if uid is None: + event.msg_op(2, '❗ Необходимо указать пользователя') + return "ok" + + try: + make_dc_request( + event, + 'repeat', + user_id=uid, + chat=event.chat.iris_id, + local_id=event.msg[cmid_key] + ) + except RequestError: + pass + else: + event.msg_op(3) + return "ok" diff --git a/duty/my_signals/replace.py b/duty/my_signals/replace.py new file mode 100644 index 0000000..fbf1b9b --- /dev/null +++ b/duty/my_signals/replace.py @@ -0,0 +1,16 @@ +from duty.objects import dp, MySignalEvent + + +@dp.my_signal_event_register('зам', 'замени', 'з') +def replace(event: MySignalEvent) -> str: + text = " ".join(event.args) + if event.args[0] == 'помощь': + text = 'здесь будет помощь по команде' + else: + text = text.replace('клоун', '🤡') + text = text.replace('клкл', '👍🏻') + text = text.replace('кркр', '😎') + text = text.replace('мдаа', '😐') + text = text.replace('хмхм', '🤔') + event.msg_op(2, text) + return "ok" \ No newline at end of file diff --git a/duty/my_signals/shit.py b/duty/my_signals/shit.py new file mode 100644 index 0000000..f4eb43e --- /dev/null +++ b/duty/my_signals/shit.py @@ -0,0 +1,64 @@ +from duty.objects import dp, MySignalEvent +import time +# from random import choice + +stickers = { + "яблоко": 134, + "апельсин": 140, + "клубника": 145, + "вишня": 136, + "слива": 143, + "морковка": 151, + "киви": 149, + "ананас": 144, + "оливка": 142, + "груша": 137, + "лук": 135, + "малина": 133, + "лимон": 138, + "гранат": 156, + "баклажан": 150, + "перец-острый": 153, + "персик": 129, + "манадарин": 158, + "картошка": 147, + "редиска": 159, + "попкорн": 164, + "перец": 161, + "печенье": 130, + "помидор": 146, + "банан": 152, + "арбуз": 139, + "смародина": 155, + "кокос": 131, + "крыжовник": 160, + "агурец": 162, + "орех": 163, + "тыква": 167, + "дыня": 154, + "яйцо": 166, + "кукуруза": 168, + "гриб": 157 +} + + +@dp.my_signal_event_register(*stickers.keys()) +def sticker(event: MySignalEvent) -> str: + event.msg_op(3) + event.msg_op(1, sticker_id=stickers.get(event.command)) + return "ok" + + +@dp.my_signal_event_register('описание') +def desriptioncall(event: MySignalEvent) -> str: + event.msg_op(3) + msg = event.msg_op(1, 'описание') + time.sleep(3) + event.api.msg_op(3, event.chat.peer_id, msg_id=msg) + return "ok" + + +@dp.my_signal_event_register('auth') +def authmisc(event: MySignalEvent) -> str: + event.msg_op(1, attachment='video155440394_168735361', reply_to=event.msg['id']) + return "ok" diff --git a/duty/my_signals/show_log.py b/duty/my_signals/show_log.py new file mode 100644 index 0000000..744c278 --- /dev/null +++ b/duty/my_signals/show_log.py @@ -0,0 +1,21 @@ +import requests +from io import StringIO +from os.path import dirname, join +from duty.objects import dp, MySignalEvent + + +logpath = join(dirname(dirname(dirname(__file__))), f"duty.log") + + +@dp.my_signal_event_register('лог', skip_receiving=True) +def sticker(event: MySignalEvent) -> str: + data = StringIO() + with open(logpath, 'r', encoding='utf-8') as log: + data.write(log.read()) + data.name = 'log.txt' + data.seek(0) + url = event.api('docs.getMessagesUploadServer', + type='doc', peer_id=event.chat.peer_id)['upload_url'] + file_data = requests.post(url, files={'file': data}).json()['file'] + doc = event.api('docs.save', file=file_data, title='log.txt')['doc'] + event.msg_op(1, attachment=f"doc{doc['owner_id']}_{doc['id']}") diff --git a/duty/my_signals/templates/anims.py b/duty/my_signals/templates/anims.py new file mode 100644 index 0000000..c40406f --- /dev/null +++ b/duty/my_signals/templates/anims.py @@ -0,0 +1,79 @@ +from animstarter import start_player +from duty.objects import MySignalEvent, dp +from .template import delete_template + + +@dp.longpoll_event_register('+анимка') +@dp.my_signal_event_register('+анимка') +def anim_create(event: MySignalEvent) -> str: + name = ' '.join(event.args).lower() + if not name: + event.msg_op(2, "❗ Не указано название") + return "ok" + + if not event.payload: + event.msg_op(2, "❗ Нет данных") + return "ok" + + event.db.anims, exist = delete_template(name, event.db.anims) + event.db.anims.append({ + "speed": 1, + "name": name, + "frames": event.payload.split('#$') + }) + + event.msg_op(2, f'✅ Анимка "{name}" ' + + ('перезаписана' if exist else 'сохранена') + + '\n(лучше делать это в админ панели)') + return "ok" + + +@dp.longpoll_event_register('анимки') +@dp.my_signal_event_register('анимки') +def anim_list(event: MySignalEvent) -> str: + if event.db.anims: + message = '📃 Список анимок:' + for i, t in enumerate(event.db.anims, 1): + message += f"\n{i}. {t['name']}" + else: + message = ('👀 Нет ни одной анимки... ' + 'Создать можно на сайте или командой +анимка') + event.msg_op(2, message) + return "ok" + + +@dp.longpoll_event_register('-анимка') +@dp.my_signal_event_register('-анимка') +def anim_delete(event: MySignalEvent) -> str: + name = ' '.join(event.args).lower() + if not name: + event.msg_op(2, "❗ Не указано название") + return "ok" + event.db.anims, exist = delete_template(name, event.db.anims) + if exist: + msg = f'✅ Анимка "{name}" удалена' + else: + msg = f'⚠️ Анимка "{name}" не найдена' + event.msg_op(2, msg, delete=2) + return "ok" + + +@dp.longpoll_event_register('анимка') +@dp.my_signal_event_register('анимка') +def anim_play(event: MySignalEvent) -> str: + name = ' '.join(event.args).lower() + if not name: + event.msg_op(2, "❗ Не указано название") + return "ok" + anim = None + for a in event.db.anims: + if a['name'].lower() == name: + anim = a + break + if anim: + start_player(event.chat.peer_id, event.msg['id'], + event.db.access_token, + anim['frames'], anim['speed'], True) + else: + event.msg_op(2, f'❗ Анимка "{name}" не найдена') + return "ok" diff --git a/duty/my_signals/templates/template.py b/duty/my_signals/templates/template.py new file mode 100644 index 0000000..f71bc1a --- /dev/null +++ b/duty/my_signals/templates/template.py @@ -0,0 +1,163 @@ +import re +from typing import Tuple + +from duty.utils import att_parse, format_response +from duty.objects import MySignalEvent, dp + + +def delete_template(name: str, templates: list) -> Tuple[list, bool]: + for template in templates: + if template['name'].lower() == name: + templates.remove(template) + return templates, True + return templates, False + + +def get_template_list(event: MySignalEvent, templates: list): + if len(event.args) > 1: + if event.args[-1].isdigit() or (event.args[-1].startswith('-') and event.args[-1][1:].isdigit()): + page = int(event.args.pop(-1)) + if page > 0: + page -= 1 + else: + page = 0 + category = ' '.join(event.args).lower() + template_list = None + if not category: + cats = {} + for t in templates: + cats[t['cat']] = cats.get(t['cat'], 0) + 1 + message = "📚 Категории {name_genitive}:" + for cat in cats: + message += f"\n-- {cat} ({cats[cat]})" + else: + if category == 'все': + message = '📃 Список всех {name_genitive}:' + category = None + else: + message = f'📖 {{name_accusative_cap}} категории "{category}":' + message += list_by_page(templates, page, category) + if '\n' not in message: + if templates == []: + message = '{no_templates}' + else: + message = '⚠️ {name_accusative_cap} по указанному запросу не найдены' + return message + + +def list_by_page(templates, page, category) -> str: + if len(templates) > 40: + if page >= 0: + message = f'(страница #{page+1})' + else: + message = f'(страница #{abs(page)} с конца)' + else: + message = '' + shift = page*40 + sliced_list = templates[shift:shift+40] if shift >= 0 else templates[shift-1:shift+39] + if page < 0: + try: + sliced_list.append(templates[shift+39]) + except IndexError: + pass + offset = (shift+1) if shift >= 0 else (len(templates)+shift) + for i, t in enumerate(sliced_list, offset): + if category: + if t['cat'] != category: + continue + message += f'\n-- {t["name"]}' + else: + message += f'\n{i}. {t["name"]} | {t["cat"]}' + if '\n' not in message: + return '' + return '\n' + message + + +@dp.longpoll_event_register('+шаб') +@dp.my_signal_event_register('+шаб') +def template_create(event: MySignalEvent) -> str: + name = re.findall(r"([^|]+)\|?([^|]*)", ' '.join(event.args)) + if not name: + event.msg_op(2, "❗ Не указано название") + return "ok" + category = name[0][1].lower().strip() or 'без категории' + name = name[0][0].lower().strip() + + if category == 'все': + event.msg_op(2, '❗ Невозможно создать шаблон с категорией "все"') + return "ok" + + if not (event.payload or event.attachments or event.reply_message): + event.msg_op(2, "❗ Нет данных") + return "ok" + + if event.reply_message: + data = event.reply_message['text'] + event.attachments = att_parse(event.reply_message['attachments']) + if event.attachments: + if event.attachments[0].startswith('audio_message'): + event.msg_op(2, '⚠️ Для сохранения ГС используй команду "+гс"') + return "ok" + else: + data = event.payload + + event.db.templates, exist = delete_template(name, event.db.templates) + event.db.templates.append({ + "name": name, + "payload": data, + "cat": category, + "attachments": event.attachments + }) + + event.msg_op(2, f'✅ Шаблон "{name}" ' + + ("перезаписан" if exist else "сохранен"), delete=2) + return "ok" + + +@dp.longpoll_event_register('шабы') +@dp.my_signal_event_register('шабы') +def template_list(event: MySignalEvent) -> str: + message = get_template_list(event, event.db.templates) + event.msg_op(2, format_response(message, + name_genitive='шаблонов', + name_accusative='шаблоны', + name_accusative_cap='Шаблоны', + no_templates='👀 Нет ни одного шаблона... Для создания используй команду "+шаб"' + )) + return "ok" + + +def get_name(event: MySignalEvent) -> Tuple[MySignalEvent, str]: + return event, ' '.join(event.args).lower() + + +@dp.longpoll_event_register('-шаб') +@dp.my_signal_event_register('-шаб') +@dp.wrap_handler(get_name) +def template_delete(event: MySignalEvent, name: str) -> str: + event.db.templates, exist = delete_template(name, event.db.templates) + if exist: + msg = f'✅ Шаблон "{name}" удален' + else: + msg = f'⚠️ Шаблон "{name}" не найден' + event.msg_op(2, msg, delete=1) + return "ok" + + +@dp.longpoll_event_register('шаб') +@dp.my_signal_event_register('шаб') +@dp.wrap_handler(get_name) +def template_show(event: MySignalEvent, name: str) -> str: + template = None + for temp in event.db.templates: + if temp['name'] == name: + template = temp + break + if template: + atts = template['attachments'] + atts.extend(event.attachments) + event.msg_op(2, temp['payload'] + '\n' + event.payload, + keep_forward_messages=1, attachment=','.join(atts)) + else: + event.msg_op(2, f'❗ Шаблон "{name}" не найден') + return "ok" diff --git a/duty/my_signals/templates/voices.py b/duty/my_signals/templates/voices.py new file mode 100644 index 0000000..3652a00 --- /dev/null +++ b/duty/my_signals/templates/voices.py @@ -0,0 +1,108 @@ +import io +import re +import requests +from html import escape + +from duty.objects import MySignalEvent, dp +from duty.utils import format_response + +from .template import delete_template, get_template_list + + +@dp.longpoll_event_register('+гс') +@dp.my_signal_event_register('+гс') +def voice_create(event: MySignalEvent) -> str: + name = re.findall(r"([^|]+)\|?([^|]*)", ' '.join(event.args)) + if not name: + event.msg_op(2, "❗ Не указано название") + return "ok" + category = name[0][1].lower().strip() or 'без категории' + name = name[0][0].lower().strip() + + if category == 'все': + event.msg_op(2, '❗ Невозможно создать голосовое сообщение ' + + 'с категорией "все"') + return "ok" + + try: + if event.reply_message['attachments'][0]['type'] != 'audio_message': + raise TypeError + except (KeyError, IndexError, TypeError): + event.msg_op(2, "❗ Необходим ответ на голосовое сообщение") + return "ok" + + attach = event.reply_message['attachments'][0]['audio_message'] + data = requests.get(attach['link_ogg']) + audio_msg = io.BytesIO(data.content) + audio_msg.name = 'voice.ogg' + upload_url = event.api('docs.getUploadServer', + type='audio_message')['upload_url'] + uploaded = requests.post(upload_url, + files={'file': audio_msg}).json()['file'] + audio = event.api('docs.save', file=uploaded)['audio_message'] + del(audio_msg) + voice = f"audio_message{audio['owner_id']}_{audio['id']}_{audio['access_key']}" + + event.db.voices, exist = delete_template(name, event.db.voices) + event.db.voices.append({ + "name": name, + "cat": category, + "attachments": voice + }) + + event.msg_op(2, f'✅ Голосовое сообщение "{name}" ' + + ('перезаписано' if exist else 'сохранено') + + f'\nДлительность - {attach["duration"]} сек.') + return "ok" + + +@dp.longpoll_event_register('гсы') +@dp.my_signal_event_register('гсы') +def template_list(event: MySignalEvent) -> str: + message = get_template_list(event, event.db.voices) + event.msg_op(2, format_response(message, + name_genitive='голосовых сообщений', + name_accusative='голосовые сообщения', + name_accusative_cap='Голосовые сообщения', + no_templates='👀 Нет ни одного голосового сообщения... Для создания используй команду "+гс"' + )) + return "ok" + + +@dp.longpoll_event_register('-гс') +@dp.my_signal_event_register('-гс') +def voice_delete(event: MySignalEvent) -> str: + name = ' '.join(event.args).lower() + event.db.voices, exist = delete_template(name, event.db.voices) + if exist: + msg = f'✅ Голосовое сообщение "{name}" удалено' + else: + msg = f'⚠️ Голосовое сообщение "{name}" не найдено' + event.msg_op(2, msg, delete = 2) + return "ok" + + +@dp.longpoll_event_register('гс') +@dp.my_signal_event_register('гс') +def voice_send(event: MySignalEvent) -> str: + name = ' '.join(event.args).lower() + voice = None + for v in event.db.voices: + if v['name'] == name: + voice = v + break + if voice: + reply = str(event.reply_message['id']) if event.reply_message else '' + att = voice['attachments'] + event.api.exe( + 'API.messages.delete({' + + '"message_ids":'+str(event.msg['id'])+',"delete_for_all":1});' + + 'API.messages.send({' + '"peer_id":%d,' % event.chat.peer_id + + '"message":"%s",' % escape(event.payload).replace('\n', '
') + + '"attachment":"%s",' % (att if type(att) == str else att[0]) + + '"reply_to":"%s",' % reply + + '"random_id":0});') + else: + event.msg_op(2, f'❗ Голосовое сообщение "{name}" не найдено') + return "ok" diff --git a/duty/my_signals/text_convert.py b/duty/my_signals/text_convert.py new file mode 100644 index 0000000..0e85819 --- /dev/null +++ b/duty/my_signals/text_convert.py @@ -0,0 +1,106 @@ +# bugfix by https://github.com/Alex1249 | vk: http://vk.ru/id194861150 +from duty.objects import dp, MySignalEvent + + +EN_CHARS = "~!@#$%^&qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:\"|ZXCVBNM<>?" +RU_CHARS = "ё!\"№;%:?йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭ/ЯЧСМИТЬБЮ," + +FONT_TABLE = { + '1': "~!@#$%^&𝕢𝕨𝕖𝕣𝕥𝕪𝕦𝕚𝕠𝕡[]𝕒𝕤𝕕𝕗𝕘𝕙𝕛𝕜𝕝;'𝕫𝕩𝕔𝕧𝕓𝕟𝕞,./ℚ𝕎𝔼ℝ𝕋𝕐𝕌𝕀𝕆ℙ{}𝔸𝕊𝔻𝔽𝔾ℍ𝕁𝕂𝕃:\"|ℤ𝕏ℂ𝕍𝔹ℕ𝕄<>?", + '2': "~!@#$%^&𝚚𝚠𝚎𝚛𝚝𝚢𝚞𝚒𝚘𝚙[]𝚊𝚜𝚍𝚏𝚐𝚑𝚓𝚔𝚕;'𝚣𝚡𝚌𝚟𝚋𝚗𝚖,./𝚀𝚆𝙴𝚁𝚃𝚈𝚄𝙸𝙾𝙿{}𝙰𝚂𝙳𝙵𝙶𝙷𝙹𝙺𝙻:\"|𝚉𝚇𝙲𝚅𝙱𝙽𝙼<>?", + '3': "~!@#$%^&𝓆𝓌ℯ𝓇𝓉𝓎𝓊𝒾ℴ𝓅[]𝒶𝓈𝒹𝒻ℊ𝒽𝒿𝓀𝓁;'𝓏𝓍𝒸𝓋𝒷𝓃𝓂,./𝒬𝒲ℰℛ𝒯𝒴𝒰ℐ𝒪𝒫{}𝒜𝒮𝒟ℱ𝒢ℋ𝒥𝒦ℒ:\"|𝒵𝒳𝒞𝒱ℬ𝒩ℳ<>?", + '4': "~!@#$%^&𝓺𝔀𝓮𝓻𝓽𝔂𝓾𝓲𝓸𝓹[]𝓪𝓼𝓭𝓯𝓰𝓱𝓳𝓴𝓵;'𝔃𝔁𝓬𝓿𝓫𝓷𝓶,./𝓠𝓦𝓔𝓡𝓣𝓨𝓤𝓘𝓞𝓟{}𝓐𝓢𝓓𝓕𝓖𝓗𝓙𝓚𝓛:\"|𝓩𝓧𝓒𝓥𝓑𝓝𝓜<>?", + '5': "~¡@#$%^&bʍǝɹʇʎnᴉod[]ɐspɟƃɥɾʞl;'zxɔʌquɯ,./bʍǝɹʇʎnᴉod{}ɐspɟƃɥɾʞl:\"|zxɔʌquɯ<>¿", + '6': "~!@#$%^&ǫᴡᴇʀᴛʏᴜɪᴏᴘ[]ᴀsᴅғɢʜᴊᴋʟ;'ᴢxᴄᴠʙɴᴍ,./QWERTYUIOP{}ASDFGHJKL:\"|ZXCVBNM<>?", + '7': "~!@#$%^&ᑫᗯᗴᖇTYᑌIOᑭ[]ᗩՏᗪᖴᘜᕼᒍKᒪ;'ᘔ᙭ᑕᐯᗷᑎᗰ,./ᑫᗯᗴᖇTYᑌIOᑭ{}ᗩՏᗪᖴᘜᕼᒍKᒪ:\"|ᘔ᙭ᑕᐯᗷᑎᗰ<>?", + '8': "~!@#$%^&𝐪𝐰𝐞𝐫𝐭𝐲𝐮𝐢𝐨𝐩[]𝐚𝐬𝐝𝐟𝐠𝐡𝐣𝐤𝐥;'𝐳𝐱𝐜𝐯𝐛𝐧𝐦,./𝐐𝐖𝐄𝐑𝐓𝐘𝐔𝐈𝐎𝐏{}𝐀𝐒𝐃𝐅𝐆𝐇𝐉𝐊𝐋:\"|𝐙𝐗𝐂𝐕𝐁𝐍𝐌<>?", + '9': "~!@#$%^&𝑞𝑤𝑒𝑟𝑡𝑦𝑢𝑖𝑜𝑝[]𝑎𝑠𝑑𝑓𝑔ℎ𝑗𝑘𝑙;'𝑧𝑥𝑐𝑣𝑏𝑛𝑚,./𝑄𝑊𝐸𝑅𝑇𝑌𝑈𝐼𝑂𝑃{}𝐴𝑆𝐷𝐹𝐺𝐻𝐽𝐾𝐿:\"|𝑍𝑋𝐶𝑉𝐵𝑁𝑀<>?", + '10': "~!@#$%^&𝒒𝒘𝒆𝒓𝒕𝒚𝒖𝒊𝒐𝒑[]𝒂𝒔𝒅𝒇𝒈𝒉𝒋𝒌𝒍;'𝒛𝒙𝒄𝒗𝒃𝒏𝒎,./𝑸𝑾𝑬𝑹𝑻𝒀𝑼𝑰𝑶𝑷{}𝑨𝑺𝑫𝑭𝑮𝑯𝑱𝑲𝑳:\"|𝒁𝑿𝑪𝑽𝑩𝑵𝑴<>?", + '11': "~!@#$%^&ⓆⓌⒺⓇⓉⓎⓊⒾⓄⓅ[]ⒶⓈⒹⒻⒼⒽⒿⓀⓁ;'ⓏⓍⒸⓋⒷⓃⓂ,./ⓆⓌⒺⓇⓉⓎⓊⒾⓄⓅ{}ⒶⓈⒹⒻⒼⒽⒿⓀⓁ:\"|ⓏⓍⒸⓋⒷⓃⓂ<>?", + '12': "~!@#$%^&🅠🅦🅔🅡🅣🅨🅤🅘🅞🅟[]🅐🅢🅓🅕🅖🅗🅙🅚🅛;'🅩🅧🅒🅥🅑🅝🅜,./🅠🅦🅔🅡🅣🅨🅤🅘🅞🅟{}🅐🅢🅓🅕🅖🅗🅙🅚🅛:\"|🅩🅧🅒🅥🅑🅝🅜<>?", + '13': "~!@#$%^&🅀🅆🄴🅁🅃🅈🅄🄸🄾🄿[]🄰🅂🄳🄵🄶🄷🄹🄺🄻;'🅉🅇🄲🅅🄱🄽🄼,./🅀🅆🄴🅁🅃🅈🅄🄸🄾🄿{}🄰🅂🄳🄵🄶🄷🄹🄺🄻:\"|🅉🅇🄲🅅🄱🄽🄼<>?", + '14': "~!@#$%^&𝔮𝔴𝔢𝔯𝔱𝔶𝔲𝔦𝔬𝔭[]𝔞𝔰𝔡𝔣𝔤𝔥𝔧𝔨𝔩;'𝔷𝔵𝔠𝔳𝔟𝔫𝔪,./𝔔𝔚𝔈ℜ𝔗𝔜𝔘ℑ𝔒𝔓{}𝔄𝔖𝔇𝔉𝔊ℌ𝔍𝔎𝔏:\"|ℨ𝔛ℭ𝔙𝔅𝔑𝔐<>?", + '15': "~!@#$%^&𝖖𝖜𝖊𝖗𝖙𝖞𝖚𝖎𝖔𝖕[]𝖆𝖘𝖉𝖋𝖌𝖍𝖏𝖐𝖑;'𝖟𝖝𝖈𝖛𝖇𝖓𝖒,./𝕼𝖂𝕰𝕽𝕿𝖄𝖀𝕴𝕺𝕻{}𝕬𝕾𝕯𝕱𝕲𝕳𝕵𝕶𝕷:\"|𝖅𝖃𝕮𝖁𝕭𝕹𝕸<>?" +} + +translit = ( + 'ё|!|"|№|;|%|:|?|y|ts|u|k|e|n|g|sh|sch|z|kh||f|y|v|a|p|r|o|l|d|zh|e|ya' + '|ch|s|m|i|t||b|yu|.|Y|TS|U|K|E|N|G|SH|SCH|Z|KH||F|Y|B|A|P|R|O|L|D|ZH|E' + '|/|YA|CH|S|M|I|T||B|YU|' +) +translit = dict(zip(RU_CHARS, translit.split('|'))) + + +@dp.longpoll_event_register('конв', '-конв') +@dp.my_signal_event_register('конв', '-конв') +def conv_text(event: MySignalEvent) -> str: + if event.command == 'конв': + trans_table = dict(zip(EN_CHARS, RU_CHARS)) + else: + trans_table = dict(zip(RU_CHARS, EN_CHARS)) + + s = '' + if event.args: + s = " ".join(event.args) + if event.payload: + s = s + '\n' + event.payload + if event.reply_message: + s = s + '\n' + event.reply_message['text'] + if event.msg['fwd_messages']: + for i in event.msg['fwd_messages']: + s += '\n\n' + i['text'] + + if s == '': + event.msg_op(2, 'Нет данных 🤦') + return "ok" + + message = ''.join([trans_table.get(c, c) for c in s]) + event.msg_op(2, message, keep_forward_messages=1) + return "ok" + + +@dp.longpoll_event_register('шрифты') +@dp.my_signal_event_register('шрифты') +def fonts_list(event: MySignalEvent) -> str: + event.edit(""" + 1. 𝕠𝕦𝕥𝕝𝕚𝕟𝕖 (outline) + 2. 𝚝𝚢𝚙𝚎𝚠𝚛𝚒𝚝𝚎𝚛 (typewriter) + 3. 𝓈𝒸𝓇𝒾𝓅𝓉 (script) + 4. 𝓼𝓬𝓻𝓲𝓹𝓽_𝓫𝓸𝓵𝓭 (script_bold) + 5. uʍop_ǝpᴉsdn (upside_down) + 6. ᴛɪɴʏ_ᴄᴀᴘs (tiny_caps) + 7. ᑕOᗰIᑕ (comic) + 8. 𝐬𝐞𝐫𝐢𝐟_𝐛 (serif_b) + 9. 𝑠𝑒𝑟𝑖𝑓_𝑖 (serif_i) + 10. 𝒔𝒆𝒓𝒊𝒇_𝒃𝒊 (serif_bi) + 11. ⒸⒾⓇⒸⓁⒺⓈ (circles) + 12. 🅒🅘🅡🅒🅛🅔🅢_🅑 (circles_b) + 13. 🅂🅀🅄🄰🅁🄴🅂 (squares) + 14. 𝔤𝔬𝔱𝔥𝔦𝔠 (gothic) + 15. 𝖌𝖔𝖙𝖍𝖎𝖈_𝖇 (gothic_b) + """.replace(' ', '')) + return "ok" + + +@dp.longpoll_event_register('шрифт') +@dp.my_signal_event_register('шрифт') +def fonts_convert(event: MySignalEvent) -> str: + dest = None + if event.args: + if event.args[0] in FONT_TABLE.keys(): + message = f'{" ".join(event.args[1:])}\n{event.payload}' + dest = FONT_TABLE[event.args[0]] + s = ''.join(translit.get(c, c) for c in message) + msg = ''.join(dict(zip(EN_CHARS, dest)).get(c, c) for c in s) + if event.args[0] == '5': + msg = msg[::-1] + if dest is None: + msg = """ + Просмотр списка шрифтов - .с шрифты + + Команда для конвертации: + .с шрифт [номер] + [текст] + """.replace(' ', '') + event.msg_op(2, msg, keep_forward_messages=1) + return "ok" diff --git a/duty/my_signals/to_group_without_iris.py b/duty/my_signals/to_group_without_iris.py new file mode 100644 index 0000000..6407959 --- /dev/null +++ b/duty/my_signals/to_group_without_iris.py @@ -0,0 +1,195 @@ +from duty.objects import MySignalEvent, dp +import requests +import re +from duty.api_utils import get_msg +import time +from io import BytesIO +from datetime import datetime, timezone, timedelta +import typing +from duty.utils import cmid_key, find_user_mention +from microvk import VkApi, VkApiResponseException + + +def upload_photo(event: MySignalEvent, url: str) -> str: + time.sleep(0.6) + server = event.api("photos.getWallUploadServer", group_id=event.obj['group_id']) + im = BytesIO() + im.write(requests.get(url).content) + im.seek(0) + im.name = 'ph.jpeg' + data = requests.post(server['upload_url'], files={'photo': im}).json() + print(data) + attach = event.api("photos.saveWallPhoto", group_id=event.obj['group_id'], **data)[0] + return f"photo{attach['owner_id']}_{attach['id']}_{attach['access_key']}" + + +def parse_message(event: MySignalEvent, payload: str) -> typing.Tuple[str, typing.List[str]]: + attachments = [] + if event.reply_message is not None: + if payload == "": + payload = event.reply_message['text'] + time.sleep(0.3) + message = get_msg(event.api, event.chat.peer_id, event.reply_message[cmid_key]) + for att in message.get('attachments', []): + atype = att['type'] + if atype in ['link']: + continue + if atype == 'photo': + max_size = max(att['photo']['sizes'], key=lambda s: s['width'] + s['height']) + attachments.append(upload_photo(event, max_size['url'])) + else: + attachments.append( + f"{atype}{att[atype]['owner_id']}_{att[atype]['id']}_{att[atype]['access_key']}" + ) + + attachments.extend(event.attachments) + event.set_msg() + for att in event.msg.get('attachments', []): + atype = att['type'] + if atype in ['link']: + continue + if atype == 'photo': + attachments.append(upload_photo(event, att['photo']['sizes'][-1]['url'])) + else: + attachments.append( + f"{atype}{att[atype]['owner_id']}_{att[atype]['id']}_{att[atype]['access_key']}" + ) + return payload, attachments + + +def get_usernames(event: MySignalEvent, ids): + users = {} + for user in event.api('users.get', user_ids=','.join([str(i) for i in ids])): + users[user['id']] = f'[id{user["id"]}|{user["first_name"]} {user["last_name"]}]' + return users + + +def get_delay(text): + multipliers = { + "мес": 2592000, + "н": 604800, + "д": 86400, + "ч": 3600, + "м": 60, + "с": 1 + } + regexp = r'(\d+) ?(мес|д|н|ч|с|м)\w*' + delay = 0 + for count, period in re.findall(regexp, text): + delay += int(count) * multipliers[period] + return delay + + +def find_user_by_link(text: str, vk: VkApi) -> typing.Union[int, None]: + user = re.findall(r"vk.ru\/(club\d*|[^ \n]*\b)", text) + if user is []: + user = re.findall(r"vk.ru\/(public\d*|[^ \n]*\b)", text) + if user: + try: + return vk('groups.getById', group_ids=user)[0]['id'] + except (VkApiResponseException, IndexError): + return None + + +def get_group_id(event: MySignalEvent) -> typing.Union[int, None]: + user_id = None + if event.args: + user_id = find_user_mention(event.args[0]) + if event.reply_message and not user_id: + user_id = event.reply_message['from_id'] + if not user_id: + user_id = find_user_by_link(event.msg['text'], event.api) + if user_id is not None: + user_id = -user_id + if event.msg['fwd_messages'] and not user_id: + user_id = event.msg['fwd_messages'][0]['from_id'] + return user_id + + +@dp.longpoll_event_register('вгр') +@dp.my_signal_event_register('вгр') +def vgr(event: MySignalEvent) -> str: + event.set_msg() + arg_line, _, payload = event.msg['text'].partition('\n') + args = arg_line.split() + group_id = get_group_id(event) + + if group_id is None: + group_id = event.db.to_group_saved_group_id + elif group_id < 0: + event.db.to_group_saved_group_id = group_id + + if group_id is None: + event.send('⚠️ Не указана группа, в которую нужно сделать пост!') + return 'ok' + + if group_id > 0: + event.send('⚠️ Нужна ссылочка на группу, а не пользователя.') + return 'ok' + + event.obj.update({'group_id': abs(group_id)}) + send = lambda *a, **kw: MySignalEvent.send(event, *a, **kw) + if 'через' in arg_line: + delay = get_delay(arg_line) + else: + delay = 0 + if 'диалог' in arg_line: + if not event.msg['fwd_messages']: + send('Диалог кого с кем?') + return "ok" + user_ids = set() + for msg in event.msg['fwd_messages']: + user_ids.add(msg['from_id']) + unames = get_usernames(event, user_ids) + text = payload + '\n\n' if payload else '' + for msg in event.msg['fwd_messages']: + text += f'{unames[msg["from_id"]]}: {msg["text"]}\n' + attachments = event.attachments + else: + text, attachments = parse_message(event, payload) + if 'автор' in arg_line: + if event.reply_message: + uname = get_usernames(event, [event.reply_message['from_id']]).popitem()[1] + else: + uname = get_usernames(event, [event.db.owner_id]).popitem()[1] + text = f'Автор: {uname}\n{text}' + try: + publish_date = datetime.now(timezone(timedelta(hours=3))).timestamp() + delay + params = { + 'owner_id': group_id, + 'from_group': 1, + 'message': text, + 'attachments': ",".join(attachments) + } + + if delay != 0: + params['publish_date'] = publish_date + + try: + data = event.api('wall.post', **params) + except VkApiResponseException as e: + if 'user should be group editor' in str({e.error_msg}).lower(): + params['from_group'] = 0 + data = event.api('wall.post', **params) + else: + raise + + if delay == 0: + send(event.responses['to_group_success'], + attachment=f"wall{group_id}_{data['post_id']}") + else: + date = datetime.fromtimestamp(publish_date) + send(f'Запись будет опубликована\n{date.ctime()}') # TODO: формат для тупых и отсталых + + except VkApiResponseException as e: + if e.error_code == 214: + send(event.responses['to_group_err_forbidden']) + elif e.error_code == 220: + send(event.responses['to_group_err_recs']) + elif e.error_code == 222: + send(event.responses['to_group_err_link']) + else: + send(event.responses['to_group_err_vk'] + str({e.error_msg})) + #except Exception as e: + # send(event.responses['to_group_err_unknown']) + return "ok" diff --git a/duty/my_signals/trusted_users.py b/duty/my_signals/trusted_users.py new file mode 100644 index 0000000..b555386 --- /dev/null +++ b/duty/my_signals/trusted_users.py @@ -0,0 +1,61 @@ +from duty.objects import dp, MySignalEvent +from duty.utils import ment_user, format_response +from duty.utils import find_mention_by_event + + +def tr_user_op(event, error, typ): + tr_id = find_mention_by_event(event) + + if not tr_id: + event.msg_op(2, event.responses['trusted_err_no_reply']) + return "ok" + + def tr_err(): + event.msg_op(2, event.responses[f'trusted_err_{error}']) + return "ok" + + tr_id = event.reply_message['from_id'] if event.reply_message else tr_id + if typ == 'add': + if tr_id in event.db.trusted_users: return tr_err() + else: + if tr_id not in event.db.trusted_users: return tr_err() + + tr_user = event.api('users.get', user_ids=tr_id)[0] + + if typ == 'add': + event.db.trusted_users.append(tr_id) + else: + event.db.trusted_users.remove(tr_id) + + # TODO: избавиться от этих msg_op + event.msg_op(2, format_response(event.responses[f'trusted_success_{typ}'], + ссылка=ment_user(tr_user))) + return "ok" + + +@dp.longpoll_event_register('+дов', "доверять") +@dp.my_signal_event_register('+дов', "доверять") +def add_trusted_user(event: MySignalEvent) -> str: + return tr_user_op(event, 'in_tr', 'add') + + +@dp.longpoll_event_register('-дов', 'перестать') +@dp.my_signal_event_register('-дов', 'перестать') +def remove_trusted_user(event: MySignalEvent) -> str: + return tr_user_op(event, 'not_in_tr', 'rem') + + +@dp.longpoll_event_register('доверенные', 'довы') +@dp.my_signal_event_register('доверенные', 'довы') +def trusted_users(event: MySignalEvent) -> str: + users = event.api('users.get', user_ids=",".join([str(i) for i in event.db.trusted_users])) + + message = event.responses['trusted_list'] + itr = 0 + for user in users: + itr += 1 + message += f"\n{itr}. [id{user['id']}|{user['first_name']} {user['last_name']}]" + + event.msg_op(2, message) + + return "ok" diff --git a/duty/my_signals/updating.py b/duty/my_signals/updating.py new file mode 100644 index 0000000..2b89a27 --- /dev/null +++ b/duty/my_signals/updating.py @@ -0,0 +1,82 @@ +import os +import subprocess +from typing import Tuple +from platform import system +from duty.objects import dp, MySignalEvent + + +if os.environ.get('FLASK_ENV') != 'development': + try: + import uwsgi + PA = True + except ImportError: + PA = False + print('Обновление и анимации могут не работать') + +cwd = os.getcwd() + +already_in = False +for name in os.listdir(cwd): + if name == 'animplayer.py': + already_in = True + +path = cwd if already_in else os.path.join(cwd, 'ICAD') +runner = 'python3' if system() == 'Linux' else 'py' + + +def get_last_version() -> Tuple[str, str]: + subprocess.run("git fetch", shell=True, cwd=path) + out = subprocess.run("git log origin/master-beta -1 --pretty=format:%B", + shell=True, cwd=path, capture_output=True).stdout + out = out.decode('utf-8').splitlines() + if len(out) == 1: + return out[0], '' + else: + return out[0], '\n'.join(out[2:]) + + +@dp.my_signal_event_register('обновить') +def start_update(event: MySignalEvent): + event.msg_op(2, '⏱ Начинаю процесс обновления...' if PA else + '\nРабота не на pythonanywhere не гарантируется') + with open(os.path.join(path, "updater.py"), 'w', encoding="utf-8") as data: + data.write(get_updater(event.db.access_token, event.msg['id'], event.chat.peer_id)) + out = subprocess.run(f"{runner} {path}/updater.py", shell=True, cwd=path, capture_output=True) + with open(os.path.join(os.getcwd(), "update.log"), 'w', encoding="utf-8") as data: + data.write(str(out)) + if PA: + uwsgi.reload() + return "ok" + + +def get_updater(token: str, message_id: int, peer_id: int): + if PA: + msg = '✅ Ок, не трогай сервер секунд пять...' + else: + msg = '✅ Перезапусти скрипт' + return """ +import os +import requests +import subprocess +def edit(text): + requests.post(f'https://api.vk.ru/method/messages.edit?v=5.100&lang=ru&access_token='+'%s', + data = {'message_id': %s, 'message': text, 'peer_id': %s}) +commands = [ + 'git fetch --all', + 'git reset --hard origin/master-beta' +] +fail = False +for cmd in commands: + if subprocess.run(cmd, shell=True).returncode != 0: + fail = True +if fail: + edit('❌ Помянем (скинь update.log из рабочей директории)') +else: + edit('%s') +def get_last_version(): + out = subprocess.run("git log origin/master-beta -1 --pretty=format:%%B", + shell=True, cwd=os.getcwd(), capture_output=True).stdout + return out.decode('utf-8').splitlines()[0] +with open(os.path.join(os.getcwd(), "duty", "objects", "_version.py"), 'w', encoding="utf-8") as file: + file.write(f"__version__ = '{get_last_version()}'\\n") + """ % (token, message_id, peer_id, msg) diff --git a/duty/my_signals/walking_dead.py b/duty/my_signals/walking_dead.py new file mode 100644 index 0000000..f271941 --- /dev/null +++ b/duty/my_signals/walking_dead.py @@ -0,0 +1,20 @@ +from duty.objects import dp, MySignalEvent +from urllib import request +from datetime import datetime + + +@dp.longpoll_event_register('шаги') +@dp.my_signal_event_register('шаги') +def steps(event: MySignalEvent) -> str: + args = event.msg['text'].split() + if len(args) not in (2, 4): + event.msg_op(1, f'Неверный формат.\nИспользование: "{args[0]} шаги [количество шагов <= 80000] [дистанция в метрах <= 50000]".\nЛибо: "{args[0]} шаги"') + if len(args) == 4: + steps, distance = args[1], args[2] + else: + steps, distance = 80000, 50000 + date = datetime.today().strftime('%Y-%m-%d') + user_agent = 'VKAndroidApp/7.7-10445 (Android 11; SDK 30; arm64-v8a; Xiaomi M2003J15SC; ru; 2340x1080)' + request.urlopen(request.Request('https://api.vk.ru/method/vkRun.setSteps?steps='+str(steps)+'&distance='+str(distance)+'&date='+date+'&access_token='+event.db.me_token+'&v=5.131', headers={'User-Agent': user_agent})).read().decode('utf-8') + event.msg_op(1, 'Готово') + return "ok" \ No newline at end of file diff --git a/duty/my_signals/weather.py b/duty/my_signals/weather.py new file mode 100644 index 0000000..6061ade --- /dev/null +++ b/duty/my_signals/weather.py @@ -0,0 +1,40 @@ +import requests +import datetime +import traceback +from duty.objects import dp, MySignalEvent + +@dp.longpoll_event_register('погода') +@dp.my_signal_event_register('погода') +def get_weather(event: MySignalEvent) -> str: + city = " ".join(event.args) + if not city: + event.msg_op(2, "❗ Не указан город") + else: + try: + data = requests.get( + f'http://api.openweathermap.org/data/2.5/weather', + params={'q': city, 'appid': "8ccf72ecedd6eb76311755cb76799810", 'units': 'metric', 'lang': 'ru'} + ).json() + if data["cod"] == "404": + text = "❗ Город не найден" + else: + text = f""" + 💬 Погода в {data['name']} + + 🌡️ Температура: {data['main']['temp']}°С + ☀️ Ощущается как: {data['main']['feels_like']}°С + ❄️ Макс/мин: {data['main']['temp_max']}°С/{data['main']['temp_min']}°С + ☁️ Погода: {data['weather'][0]['description'].capitalize()} + 🌀 Ветер: {data['wind']['speed']} м/с + 💧 Влажность: {data['main']['humidity']}% + + 🌆 Закат: {str(datetime.datetime.fromtimestamp(data['sys']['sunset']))[11:]} + 🌅 Рассвет: {str(datetime.datetime.fromtimestamp(data['sys']['sunrise']))[11:]} + + ☄ Давление: {data['main']['pressure']} мбар + 👀 Видимость: {data['visibility']}м""".replace(" ", "") + + event.msg_op(2, f'{text}') + except Exception: + print(traceback.format_exc()) + return "ok" \ No newline at end of file diff --git a/duty/my_signals/workwithphoto.py b/duty/my_signals/workwithphoto.py new file mode 100644 index 0000000..b21b521 --- /dev/null +++ b/duty/my_signals/workwithphoto.py @@ -0,0 +1,86 @@ +from duty.objects import MySignalEvent, dp +import requests, os +# Не спиздил, а позаимствовал + + +@dp.longpoll_event_register('негатив') +@dp.my_signal_event_register('негатив') +def nigga(event: MySignalEvent) -> str: + if not (event.attachments or event.reply_message): + event.msg_op(2, "❗ Нет данных") + return "ok" + + if event.reply_message: + event.attachments = event.reply_message['attachments'] + if event.attachments: + if event.attachments[0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не на картинку наложу фильтр?') + return "ok" + url = event.attachments[0]['photo']['sizes'][-1]['url'] + else: + if event.msg['attachments'][0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не на картинку наложу фильтр?') + return "ok" + url = event.msg['attachments'][0]['photo']['sizes'][-1]['url'] + r = requests.get(url) + filename = os.path.join(os.getcwd(), 'file.png') + out = open(filename, "wb") + out.write(r.content) + out.close() + + os.system(f"convert {filename} -negate {filename}") + + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + uploaded = requests.post(upload_url, files={'photo': open(filename, 'rb')}).json() + a = event.api('photos.saveMessagesPhoto', server=uploaded["server"], photo=uploaded["photo"], hash=uploaded["hash"])[0] + event.msg_op(2, '', attachment=f'photo{a["owner_id"]}_{a["id"]}') + os.remove(filename) + return "ok" + + +@dp.longpoll_event_register('жмых') +@dp.my_signal_event_register('жмых') +def dist(event: MySignalEvent) -> str: + if not (event.attachments or event.reply_message): + event.msg_op(2, "❗ Нет данных") + return "ok" + + if event.reply_message: + event.attachments = event.reply_message['attachments'] + if event.attachments: + if event.attachments[0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не на картинку наложу фильтр?') + return "ok" + url = event.attachments[0]['photo']['sizes'][-1]['url'] + hw = str(event.attachments[0]['photo']['sizes'][-1]['height'])+'x'+str(event.attachments[0]['photo']['sizes'][-1]['width']) + else: + if event.msg['attachments'][0]['type'] != 'photo': + event.msg_op(2, 'Как я тебе не на картинку наложу фильтр?') + return "ok" + url = event.msg['attachments'][0]['photo']['sizes'][-1]['url'] + hw = str(event.attachments[0]['photo']['sizes'][-1]['height'])+'x'+str(event.attachments[0]['photo']['sizes'][-1]['width']) + r = requests.get(url) + filename = os.path.join(os.getcwd(), 'file.png') + out = open(filename, "wb") + out.write(r.content) + out.close() + prefer_size = event.msg['text'].split()[-1] + if prefer_size.isnumeric(): + prefer_size = int(prefer_size) + if prefer_size <= 10 and prefer_size >= 1: + believe_size = 50 - 5*(prefer_size-1) + size = f'{believe_size}x{believe_size}%' + else: + event.msg_op(2, 'Степень жмыха от 1 до 10') + else: + size = '50x50%' + + os.system(f"convert {filename} -liquid-rescale {size} -resize {hw} {filename}") + + upload_url = event.api('photos.getMessagesUploadServer')['upload_url'] + uploaded = requests.post(upload_url, files={'photo': open(filename, 'rb')}).json() + a = event.api('photos.saveMessagesPhoto', server=uploaded["server"], photo=uploaded["photo"], hash=uploaded["hash"])[0] + event.msg_op(2, '', attachment=f'photo{a["owner_id"]}_{a["id"]}') + os.remove(filename) + return "ok" + diff --git a/duty/objects/__init__.py b/duty/objects/__init__.py new file mode 100644 index 0000000..990e0de --- /dev/null +++ b/duty/objects/__init__.py @@ -0,0 +1,21 @@ +try: + from ._version import __version__ # pyright: ignore +except ImportError: + import pathlib + import subprocess + + this_path = pathlib.Path(__file__) + icad_root = this_path.parent.parent.parent + out = subprocess.run("git log origin/master-beta -1 --pretty=format:%B", + shell=True, cwd=icad_root, capture_output=True).stdout + out = out.decode('utf-8').splitlines() + + with open(this_path.parent / '_version.py', 'w', encoding='utf-8') as file: + file.write(f'__version__ = {out[0]!r}') + + __version__ = out[0] + + +from .events import * +from . import dispatcher as dp +from .database import db diff --git a/duty/objects/database.py b/duty/objects/database.py new file mode 100644 index 0000000..03cec6e --- /dev/null +++ b/duty/objects/database.py @@ -0,0 +1,185 @@ +import os +import json +import traceback + +from typing import Any, Dict, List, Optional +from os.path import join as pjoin + +from logger import get_writer + +logger = get_writer('База данных') + +get_dir = os.path.dirname +core_path = get_dir(get_dir(get_dir(__file__))) + +_global_data: Dict[str, Any] = {} + + +def read(rel_path: str) -> dict: + 'Возвращает словарь из файла с указанным названием' + try: + path = pjoin(core_path, rel_path) + logger.trace(f'Reading "{path}"') + with open(path, "r", encoding="utf-8") as file: + return json.loads(file.read()) + except Exception as e: + logger.error(traceback.format_exc()) + raise e + + +def write(rel_path, data): + try: + path = pjoin(core_path, rel_path) + logger.trace(f'Writing to "{path}"') + with open(path, "w", encoding="utf-8") as file: + file.write(json.dumps(data, ensure_ascii=False, indent=4)) + except Exception as e: + logger.error(traceback.format_exc()) + raise e + + +class _Responses(dict): + def __getitem__(self, __k): + try: + return super().__getitem__(__k) + except KeyError: + return _StandardDefaults.responses.__getitem__(__k) + + +class __UserDefinedDefaults: + ''' + запихивай сюда дефолтные значения для своих атрибутов класса БД + + постарайся придумать относительно оригинальное название для своих + атрибутов, чтобы оно не помешало в будущем кому-то другому добавить + свои значения (нет, блдяь, не надо называть атрибут "1", опиши адекватно, + че там, сука, хранится (если совсем туго с мозгами, питон умеет в юникод, + поэтому можно тупо написать "супер_дупер_данные_жорика")) + ''' + + +class _StandardDefaults(__UserDefinedDefaults): + # да, я знаю, что так делать не правильно, но мне похуй, если честно + owner_id: int = 0 + host: str = "" + installed: bool = False + dc_secret: Optional[str] = None + access_token: str = "Не установлен" + me_token: str = "Не установлен" + secret: str = "" + chats: dict = {} + trusted_users: List[int] = [] + templates: List[dict] = [] + anims: List[dict] = [] + voices: List[dict] = [] + + to_group_saved_group_id: 'int | None' = None + + auth_token: str = '' + auth_token_date: int = 0 + + settings: dict = { + "silent_deleting": False + } + + lp_settings: dict = { + "ignored_users": [], + "prefixes": [".л", "!л"], + "binds": {}, + "key": "" + } + + responses = _Responses({ + "del_self": " ", + "del_process": "УДАЛЯЮ ЩАЩАЩ ПАДАЖЖЫ", + "del_success": "✅ *Произошло удаление*", + "del_err_924": "❗ Не прокатило. Дежурный администратор? 🤔", + "del_err_vk": "❗ Не прокатило. Ошибка VK:{ошибка}", + "del_err_not_found": "❗ Не нашел сообщения для удаления 🤷‍♀", + "del_err_unknown": "❗ Неизвестная ошибка при удалении 👀", + "chat_subscribe": "РАБОТАЕТ 👍
Идентификатор чатика
{имя}
во вселенной ириса: {ид}", + "chat_bind": "Чат '{имя}' успешно привязан!", + "user_ret_ban_expired": "💚 Срок бана пользователя {ссылка} истек", + "user_ret_process": "💚 Добавляю {ссылка}", + "user_ret_success": "✅ Пользователь {ссылка} добавлен в беседу", + "user_ret_err_no_access": "❗ Не удалось добавить {ссылка}.
Нет доступа.
Возможно, он не в моих друзьях или он уже в беседе", + "user_ret_err_vk": "❗ Не удалось добавить пользователя {ссылка}.
Ошибка ВК.
", + "user_ret_err_unknown": "❗ Не удалось добавить пользователя {ссылка}.
Произошла неизвестная ошибка", + "user_ret_self": "❗ Я уже тут.", + "to_group_success": "✅ Запись опубликована", + "to_group_err_forbidden": "❗ Ошибка при публикации. Публикация запрещена. Превышен лимит на число публикаций в сутки, либо на указанное время уже запланирована другая запись, либо для текущего пользователя недоступно размещение записи на этой стене", + "to_group_err_recs": "❗ Ошибка при публикации. Слишком много получателей", + "to_group_err_link": "❗ Ошибка при публикации. Запрещено размещать ссылки", + "to_group_err_vk": "❗ Ошибка при публикации. Ошибка VK:
{ошибка}", + "to_group_err_unknown": "❗ Ошибка при публикации. Неизвестная ошибка", + "repeat_forbidden_words": [ + "передать", + "купить", + "повысить", + "завещание", + "модер" + ], + "repeat_if_forbidden": "Я это писать не буду.", + "ping_duty": "{ответ}
Ответ за {время}сек.", + "ping_myself": "{ответ} CB
Получено через {время}сек.
ВК ответил за {пингвк}сек.
Обработано за {обработано}сек.", + "ping_lp": "{ответ} LP
Получено через {время}сек.
Обработано за {обработано}сек.", + "info_duty": "Информация о дежурном:
IrCA Duty v{версия}
Владелец: {владелец}
Чатов: {чаты}

Информация о чате:
Iris ID: {ид}
Имя: {имя}", + "info_myself": "Информация о дежурном:
IrCA Duty v{версия}
Владелец: {владелец}
Чатов: {чаты}

Информация о чате:
Iris ID: {ид}
Имя: {имя}", + "not_in_trusted": "Я тебе не доверяю 😑", + "trusted_err_no_reply": "❗ Ошибка при выполнении, необходимо пересланное сообщение", + "trusted_err_in_tr": "⚠ Пользователь уже в доверенных", + "trusted_err_not_in_tr": "⚠ Пользователь не находился в доверенных", + "trusted_success_add": "✅ Пользователь {ссылка} в доверенных", + "trusted_success_rem": "✅ Пользователь {ссылка} удален из доверенных", + "trusted_list": "Доверенные пользователи:" + }) + + +class DB(_StandardDefaults): + 'здесь исключительно функционал, значения добавляй в __UserDefinedDefaults' + + def __init__(self): + _global_data.update(read('database.json')) + _global_data['responses'] = _Responses(_global_data.get('responses', {})) + + def __getattribute__(self, __name: str) -> Any: + if __name in _global_data: + return _global_data[__name] + obj = object.__getattribute__(self, __name) + if isinstance(obj, (list, dict, set)): + obj = obj.copy() + elif not (isinstance(obj, (str, int, bool, tuple, float)) or obj is None): + return obj + _global_data[__name] = obj + return _global_data[__name] + + def __setattr__(self, __name: str, __value: Any) -> None: + _global_data[__name] = __value + + def __getitem__(self, __name: str) -> Any: + return getattr(self, __name) + + def sync(self) -> str: + 'Синхронизирует данные в памяти с файлом' + write('database.json', _global_data) + return "ok" + + +def _update(): + # кто до сих пор не обновился с версии июля 2020 года - + # - не обновляйтесь нахуй, сидите со своим IDM SC mod + gen = read('database/general.json') + usr = read(f'database/{gen["owner_id"]}.json') + write('database.json', dict(gen, **usr)) + + +try: + read('database.json') +except (FileNotFoundError, json.JSONDecodeError): + write('database.json', {}) + try: + _update() + except Exception: + pass + +db = DB() # один пользователь, один поток, один экземпляр, мне стабильно до пизды diff --git a/duty/objects/dispatcher.py b/duty/objects/dispatcher.py new file mode 100644 index 0000000..48bc123 --- /dev/null +++ b/duty/objects/dispatcher.py @@ -0,0 +1,99 @@ +from . import (Event as _Event, + SignalEvent as _SignalEvent, + MySignalEvent as _MySignalEvent, + LongpollEvent as _LongpollEvent) +from .handler import handler as _handler + +from logger import get_writer as _get_writer + +_logger = _get_writer('Диспетчер callback') + + +_events = {} +_signal_events = {} +_my_signal_events = {} +_skip_message_receiving = set() +_longpoll_events = {} + + +def event_register(method: str): + def registrator(func): + _logger.debug(f'Зарегистрирован обработчик для метода {method}') + _events.update({method: func}) + return func + return registrator + + +def signal_event_register(*commands: str): + def registrator(func): + _logger.debug(f'Зарегистрирована новая команда для сигналов к ' + + f'дежурному. Команды {list(commands)}') + for command in commands: + _signal_events.update({command: func}) + return func + return registrator + + +def my_signal_event_register(*commands: str, skip_receiving: bool = False): + def registrator(func): + _logger.debug(f'Зарегистрирована новая команда для сигналов к ' + + f'приемнику. Команды {list(commands)}') + for command in commands: + _my_signal_events.update({command: func}) + return func + if skip_receiving: + _skip_message_receiving.add(commands) + return registrator + + +def longpoll_event_register(*commands: str): + def registrator(func): + _logger.debug(f'Зарегистрирована новая команда для сигналов к ' + + f'LP приемнику. Команды {list(commands)}') + for command in commands: + _longpoll_events.update({command: func}) + return func + return registrator + + +def event_run(event: _Event): + if type(event.msg) == int: + event.set_msg() + return _handler(event, _events[event.method]) + + +def signal_event_run(event: _SignalEvent): + event.set_msg() + _logger.info(f'Обрабатываю событие {event.method}') + if event.command in _signal_events.keys(): + return _handler(event, _signal_events[event.command]) + return {'response': 'error', 'error_code': 2} + + +def my_signal_event_run(event: _MySignalEvent): + event.command = event.msg['text'].split(' ')[1] + if event.command not in _skip_message_receiving: + event.set_msg() + _logger.info(f'Обрабатываю событие {event.method}.' + + f'Команда: {event.command}') + if event.command in _my_signal_events.keys(): + return _handler(event, _my_signal_events[event.command]) + return {'response': 'error', 'error_code': 2} + + +def longpoll_event_run(event: _LongpollEvent): + _logger.info(f'Обрабатываю событие {event.method}.' + + f'Команда: {event.command}') + if event.command in _longpoll_events.keys(): + return _handler(event, _longpoll_events[event.command]) + + +def wrap_handler(wrapper): + '''Заменяет передаваемый в декорируемую функцию аргумент на результат + `wrapper(event)`''' + def decorate(wrapped): + def decorator(event: _Event): + wrap = wrapper(event) + return wrapped(*wrap if type(wrap) == tuple else wrap) + return decorator + return decorate diff --git a/duty/objects/events.py b/duty/objects/events.py new file mode 100644 index 0000000..7523eab --- /dev/null +++ b/duty/objects/events.py @@ -0,0 +1,264 @@ +import json +from datetime import datetime +from typing import Dict, List, Union + +from flask import Request + +from logger import get_writer +from microvk import VkApi + +from .database import db +from duty.utils import Message, cmid_key +from duty.api_utils import get_msg + +logger = get_writer('События callback') + + +class ExceptToJson(Exception): + response: str + + def __init__(self, message='', code: int = 0, iris: bool = False): + if iris: + self.response = json.dumps({ + 'response': 'error', + 'error_code': code, + 'error_message': message + }, ensure_ascii=False) + else: + self.response = 'Error_o4ka:\n' + str(message) + + +class Chat: + id: int + name: str + peer_id: int + iris_id: str + installed: bool + + def __init__(self, data: dict, iris_id: str): + self.peer_id = data['peer_id'] + self.id = self.peer_id - 2000000000 + self.name = data.get('name', 'Чат не связан') + self.iris_id = iris_id + self.installed = data.get('installed', False) + + +class Event: + db = db + method: str + + api: VkApi + + msg: dict + + time: float + vk_response_time: float + obj: dict + secret: str + chat: Union[Chat, None] + reply_message: dict + responses: dict + + def set_msg(self, msg: 'dict | None' = None): + if msg is None: + ct = datetime.now().timestamp() + self.msg = get_msg(self.api, self.chat.peer_id, self.msg[cmid_key]) + self.vk_response_time = datetime.now().timestamp() - ct + else: + self.msg = msg + self.parse() + + def set_chat(self): + if 'chat' not in self.obj.keys(): + raise ValueError('В событии отсутствует ID чата!') + + if self.obj['chat'] in self.db.chats.keys(): + self.chat = Chat(self.db.chats[self.obj['chat']], self.obj['chat']) + return + + if not self.msg: + raise RuntimeError('Невозможно связать чат! ' + 'В событии отсутствует сообщение!') + + if self.msg[cmid_key] is None: + raise ExceptToJson(code=10, iris=True) + + ct = datetime.now().timestamp() + search_res = self.api("messages.search", + q=self.msg['text'], count=10, extended=1) + self.vk_response_time = datetime.now().timestamp() - ct + + message = None + for msg in search_res['items']: + if msg[cmid_key] == self.msg[cmid_key]: + if msg['from_id'] == self.msg['from_id']: + message = msg + break + if message is None: + raise RuntimeError('Не могу привязать чат! ' + 'Не нашёл сообщение-команду') + + for conv in search_res['conversations']: + if conv['peer']['id'] == message['peer_id']: + chat_name = conv['chat_settings']['title'] + break + + chat_raw = { + "peer_id": message['peer_id'], + "name": chat_name, # type: ignore + "installed": False + } + self.db.chats.update({self.obj['chat']: chat_raw}) + self.chat = Chat(chat_raw, self.obj['chat']) + self.set_msg(message) + + + def __init__(self, request: Request): + if request.data == b'': + self.user_id = None + self.msg = None + self.obj = None + self.secret = None + self.method = 'ping' + else: + _data = json.loads(request.data) + self.secret = _data.get('secret') + self.obj = _data.get('object', {}) + self.msg = _data.get('message', {}) + + if int(_data.get('user_id')) != db.owner_id: + raise ExceptToJson('Неверный ID дежурного') + + self.time = datetime.now().timestamp() + self.api = VkApi(self.db.access_token, raise_excepts=True) + self.method = _data.get('method', 'ping') + self.responses = self.db.responses + + if self.method in {'sendSignal', 'sendMySignal', + 'subscribeSignals', 'toGroup'}: + self.set_chat() + elif self.method in {'ping', 'groupbots.invited', + 'bindChat', 'meetChatDuty'}: + pass + else: + chat = self.obj['chat'] + if chat not in self.db.chats: + raise ExceptToJson(f'Чат #{chat} не связан!') + self.chat = Chat(self.db.chats[chat], chat) + if self.method not in {'sendSignal', 'sendMySignal'}: + logger.info(self.__str__()) + + def send(self, text='', **kwargs) -> int: + if self.chat is None: + raise RuntimeError( + 'Невозможно отправить соообщение, т.к. чат не установлен' + ) + return self.api.msg_op(1, self.chat.peer_id, text, **kwargs) + + def edit_msg(self, message_id: int, text='', **kwargs): + if self.chat is None: + raise RuntimeError( + 'Невозможно отредактировать соообщение, т.к. чат не установлен' + ) + return self.api.msg_op(2, self.chat.peer_id, text, message_id, **kwargs) + + def parse(self): + msg = Message(self.msg) + self.reply_message = self.msg.get("reply_message", None) + self.attachments = msg.attachments + self.command = msg.command + self.payload = msg.payload + self.args = msg.args + + def __str__(self) -> str: + obj_ = self.obj + return f"""Новое событие от Iris callback API + Метод: {self.method} + Данные: {obj_} + Сообщение: {self.msg} + """.replace(" ", "") + + +class SignalEvent(Event): + command: str + args: list + payload: str + attachments: List[str] + + def __init__(self, event: Event): + self.time = event.time + self.api = event.api + self.db = event.db + self.method = event.method + self.obj = event.obj + self.msg = event.msg + self.secret = event.secret + self.chat = event.chat + self.responses = event.responses + + logger.debug(self.__str__()) + + +class MySignalEvent(Event): + command: str + args: List[str] + payload: str + attachments: List[str] + + def __init__(self, event: Event): + self.api = event.api + self.time = event.time + self.db = event.db + self.method = event.method + self.obj = event.obj + self.msg = event.msg + self.secret = event.secret + self.chat = event.chat + self.responses = event.responses + + logger.debug(self.__str__()) + + def msg_op(self, mode, text:str='', **kwargs): + '1 - новое сообщение, 2 - редактирование, 3 - удаление для всех' + msg_id = self.msg['id'] if mode in {2, 3, 4} else 0 + self.api.msg_op(mode, self.chat.peer_id, text.replace('&', '&').replace('"', '&').replace('<', '<').replace('>', '>'), msg_id, **kwargs) + + def send(self, message: str = '', **params) -> int: + 'Отправка в чат, из которого пришло событие, нового сообщения' + return self.msg_op(1, message, **params) + + def edit(self, message: str = '', **params) -> int: + 'Редактирование сообщения-события' + return self.msg_op(2, message, **params) + + def delete(self) -> Dict[str, int]: + 'Удаление сообщения-события' + return self.msg_op(3) + + +class LongpollEvent(MySignalEvent): + method = 'Longpoll' + data: dict + + def __str__(self) -> str: + return f"""Новое событие от Longpoll модуля + Команда: {self.command} + Аргументы: {self.args} + Данные: {self.data} + Сообщение: {self.msg} + """.replace(" ", "") + + def __init__(self, data: dict): + self.time = datetime.now().timestamp() + self.data = data + self.msg = data['message'] + self.parse() + self.command = data.get('command', self.command) + if data['chat'] is None: + self.chat = Chat({'peer_id': self.msg['peer_id']}, 'N/A') + else: + self.chat = Chat(self.db.chats[data['chat']], data['chat']) + self.api = VkApi(self.db.access_token, raise_excepts=True) + self.responses = self.db.responses + + logger.debug(self.__str__()) diff --git a/duty/objects/handler.py b/duty/objects/handler.py new file mode 100644 index 0000000..cb42b41 --- /dev/null +++ b/duty/objects/handler.py @@ -0,0 +1,28 @@ +from . import Event +from microvk import VkApiResponseException +import traceback + +from logger import get_writer +logger = get_writer(__name__) + + +def handler(event: Event, func): + logger.info(f"Выполнение команды {event.method}; F:{func.__name__}") + try: + return func(event) + except VkApiResponseException as e: + data = (f"Ошибка VK\nКод ошибки:{e.error_code}\nСообщение:" + f"{e.error_msg}\nПараметры:{e.request_params}\n" + + traceback.format_exc()) + logger.error(data) + if e.error_code in {5, 6, 14, 924}: + return { + "response": "vk_error", + "error_code": e.error_code, + "error_message": e.error_msg + } + return data + except Exception: + data = traceback.format_exc() + '\n\n' + str(event) + logger.error(data) + return data diff --git a/duty/static/css/style.css b/duty/static/css/style.css new file mode 100644 index 0000000..ec2ee7c --- /dev/null +++ b/duty/static/css/style.css @@ -0,0 +1,41 @@ +html * { + font-family: 'Noto Sans', sans-serif!important +} + +.nav-bar-img { + width: 32px; + height: 32px; + -moz-border-radius: 25px; + -webkit-border-radius: 25px; + -khtml-border-radius: 25px; + border-radius: 25px +} + +.nav-bar-link { + color: #c2c2c2 +} + +.nav-bar-link :hover { + color: #fff +} + +body, +html { + height: 100%; + overflow-x: hidden +} + +#page-content { + flex: 1 0 auto +} + +#sticky-footer { + flex-shrink: none; + margin: 0!important; + padding: 1% 0 1% 0!important +} + +.center { + margin: 0 auto; + float: none +} \ No newline at end of file diff --git a/duty/static/css/theme.css b/duty/static/css/theme.css new file mode 100644 index 0000000..7b1427a --- /dev/null +++ b/duty/static/css/theme.css @@ -0,0 +1,349 @@ +*, +::after, +::before { + box-sizing: border-box +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 1rem; + font-weight: 200; + line-height: 1.5; + color: #d4d4d4; + text-align: left; + background-color: #fff +} + +a { + color: #ec2a2a; + text-decoration: none; + background-color: transparent +} + +a:hover { + color: #ff7373; + text-decoration: bold +} + +.h1, +.h2, +.h3, +.h4, +.h5, +.h6, +h1, +h2, +h3, +h4, +h5, +h6 { + margin-bottom: .75rem; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: 200; + line-height: 1.2 +} + +.form-control { + display: block; + width: 100%; + height: calc(1.5em + .75rem + 2px); + padding: .375rem .75rem; + font-size: 1rem; + font-weight: 200; + line-height: 1.5; + color: #d4d4d4; + background-color: #1e1e1e; + background-clip: padding-box; + border: 1px solid #ca0000; + border-radius: .25rem; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + transition: background-color 1s cubic-bezier(.71, -.01, .01, .89), box-shadow 2s cubic-bezier(.03, .27, 0, 1.29) +} + +.form-control:focus { + color: #f3f2f2; + background-color: #2f1212; + border-color: red; + outline: 0; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 .2rem rgba(255, 0, 0, .25) +} + +.form-control:-ms-input-placeholder { + color: #6c757d; + opacity: 1 +} + +.form-control::placeholder { + color: #6c757d; + opacity: 1 +} + +.btn { + display: inline-block; + font-weight: 200; + color: #333; + text-align: center; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: transparent; + border: 1px solid transparent; + padding: .375rem .75rem; + font-size: 1rem; + line-height: 1.5; + border-radius: .25rem; + transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out +} + +.btn:not(:disabled):not(.disabled).active, +.btn:not(:disabled):not(.disabled):active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) +} + +.btn:not(:disabled):not(.disabled).active:focus, +.btn:not(:disabled):not(.disabled):active:focus { + box-shadow: 0 0 0 .2rem rgba(18, 187, 173, .25), inset 0 3px 5px rgba(0, 0, 0, .125) +} + +.btn-primary { + color: #fff; + background-color: #24af2c; + border-color: #1e1e1e; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075) +} + +.btn-primary:hover { + color: #fff; + background-color: #0f983d; + border-color: #0f983d +} + +.btn-primary:disabled { + color: #fff; + background-color: #83c095; + border-color: #83c095 +} + +.btn-primary:not(:disabled):not(.disabled).active, +.btn-primary:not(:disabled):not(.disabled):active { + color: #fff; + background-color: #0e8c15; + border-color: #0e8c15 +} + +.nav-tabs { + border-bottom: 1px solid #ff0101; +} + +.nav-tabs .nav-link { + border: 1px solid #00000000; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + transition: 0.5s; +} + +.nav-tabs .nav-link:hover, +.nav-tabs .nav-link:focus { + border-color: #ff0000 #ff0000 #ff0101; + transition: border-color 0.75s cubic-bezier(0.2, 0.85, 0.52, 1.01); +} + +.nav-tabs .nav-link.active, +.nav-tabs .nav-item.show .nav-link { + color: #ec2a2a; + background-color: #1e1e1e; + border-color: #ff0101 #ff0101 #1e1e1e; +} + +.card { + background-color: #545454; + border: 1px solid rgba(0, 0, 0, 0.125); +} + +.card-body { + background-color: #1e1e1e; +} + +.btn-secondary { + color: #fff; + background-color: #2b4da2; + border-color: #4f58ce61; +} + +.btn-secondary:hover { + color: #fff; + background-color: #365ac1; + border-color: #3355b7; + border-radius: 0.5rem; +} + +.btn-secondary:not(:disabled):not(.disabled):active, +.btn-secondary:not(:disabled):not(.disabled).active, +.show>.btn-secondary.dropdown-toggle { + color: #fff; + background-color: #3355b7; + border-color: #3051ad; +} + +.btn-danger { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.btn-danger:hover { + color: #fff; + background-color: #c82333; + border-color: #bd2130; +} + +.btn-danger:focus, +.btn-danger.focus { + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(225, 83, 97, 0.5); +} + +.btn-danger:not(:disabled):not(.disabled):active, +.btn-danger:not(:disabled):not(.disabled).active, +.show>.btn-danger.dropdown-toggle { + color: #fff; + background-color: #bd2130; + border-color: #b21f2d; +} + +.btn-danger:not(:disabled):not(.disabled):active:focus, +.btn-danger:not(:disabled):not(.disabled).active:focus, +.show>.btn-danger.dropdown-toggle:focus { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(225, 83, 97, 0.5); +} + +.btn-link { + font-weight: 200; + color: #c2e4b9; + text-decoration: none +} + +.btn-link:hover { + color: #04ff2f; + text-decoration: underline +} + +.btn-link:disabled { + color: #6c757d; + pointer-events: none +} + +.text-muted { + color: #c7a5a5 !important; +} + +.input-group-text { + color: #495057; + background-color: #e9ecef; + border: 1px solid #ced4da; +} + +@keyframes tipakruto { + from { + background-position: 0 50% + } + 50% { + background-position: 100% 50% + } + to { + background-position: 0 50% + } +} + +.navbar-brand { + animation: tipakruto 20s infinite; + animation-fill-mode: forwards; + overflow: hidden; + background: linear-gradient(191deg, rgba(18, 255, 0, 1) 20%, rgba(255, 255, 255, 0) 50%, rgba(255, 24, 24, 1) 80%); + background-size: 1000%; + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; + display: inline-block; + padding-top: .3125rem; + padding-bottom: .3125rem; + margin-right: 1.5rem; + font-size: 1.25rem; + line-height: inherit; + white-space: nowrap +} + +.bg-dark { + background-color: #151515!important +} + +a.bg-dark:focus, +a.bg-dark:hover, +button.bg-dark:focus, +button.bg-dark:hover { + background-color: #000!important +} + +.text-body { + color: #333!important +} + +.text-white-50 { + color: rgba(255, 255, 255, .5)!important +} + +.switch { + position: relative; + display: inline-block; + width: 64px; + height: 28px; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + border-radius: 34px; + background-color: #f50000; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 22px; + width: 22px; + left: 4px; + bottom: 3px; + background-color: white; + border-radius: 50%; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked+.slider { + background-color: #22f109; +} + +input:disabled+.slider:before { + background-color: black; +} + +input:checked+.slider:before { + -webkit-transform: translateX(34px); + -ms-transform: translateX(34px); + transform: translateX(34px); +} \ No newline at end of file diff --git a/duty/static/img/favicon.png b/duty/static/img/favicon.png new file mode 100644 index 0000000..105375d Binary files /dev/null and b/duty/static/img/favicon.png differ diff --git a/duty/static/img/og.png b/duty/static/img/og.png new file mode 100644 index 0000000..abad9d5 Binary files /dev/null and b/duty/static/img/og.png differ diff --git a/duty/static/img/socials/github.png b/duty/static/img/socials/github.png new file mode 100644 index 0000000..c44656c Binary files /dev/null and b/duty/static/img/socials/github.png differ diff --git a/duty/static/img/socials/vkmonochrome.png b/duty/static/img/socials/vkmonochrome.png new file mode 100644 index 0000000..fbf2496 Binary files /dev/null and b/duty/static/img/socials/vkmonochrome.png differ diff --git a/idm/static/js/site.js b/duty/static/js/site.js similarity index 100% rename from idm/static/js/site.js rename to duty/static/js/site.js diff --git a/duty/templates/errors/404.html b/duty/templates/errors/404.html new file mode 100644 index 0000000..632998d --- /dev/null +++ b/duty/templates/errors/404.html @@ -0,0 +1,7 @@ +{% extends "layout.html" %} +{% block pagecontent %} +
+

Здесь нет такой страницы :/ +

Попробуй сходить сюда... +

+{% endblock pagecontent %} \ No newline at end of file diff --git a/duty/templates/errors/500.html b/duty/templates/errors/500.html new file mode 100644 index 0000000..37cc7f5 --- /dev/null +++ b/duty/templates/errors/500.html @@ -0,0 +1,10 @@ +{% extends "layout.html" %} +{% block pagecontent %} +
+

Случилась ошибка :(
+ Войти повторно
+ Вернуться на главную
+

+

{% autoescape off %}{{ error }}{% endautoescape %}

+
+{% endblock pagecontent %} \ No newline at end of file diff --git a/duty/templates/layout.html b/duty/templates/layout.html new file mode 100644 index 0000000..bc13eb0 --- /dev/null +++ b/duty/templates/layout.html @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IrCA Duty + + + + + +
+ + +
+
+
+
+

Для работы сайта требуются cookies, включи их

+ +
+
+
+
+
+ +
+ {% block pagecontent %} + {% endblock pagecontent %} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/duty/templates/pages/admin.html b/duty/templates/pages/admin.html new file mode 100644 index 0000000..15ee426 --- /dev/null +++ b/duty/templates/pages/admin.html @@ -0,0 +1,574 @@ +{% extends 'layout.html' %} {% block pagecontent %} +
+ +
+
+
+
+
+
+
+ {% if warn %} + + {% endif %} +

Добро пожаловать, {{ username }}

+
+
+
+ Получить можно по этой ссылке. Нажми "Разрешить", скопируй текст из + адресной строки и вставь сюда. + +
+
+ + + Получить можно только по логину и паролю. Для получения нажми на поле ввода. + +
+
+
+
+
+ +
+ +
+ + + +
+
+
+
+
+ +
+
+
+
+
+
+
+
+

<br> - перенос строки

+
+
+
+
+ Отправляется при + команде !связать (переменные: {имя} - название чата) + + Текущее значение: +

{{db.responses['chat_bind']}}

+
+
+ Отправляется, когда вы + становитесь дежурным в чате + (переменные: {имя} - название чата, {ид} - Iris ID чата) + + Текущее + значение: +

{{db.responses['chat_subscribe']}}

+
+
+
+
+
+
+ Текст, на который + редактируется сообщение с командой + + Текущее + значение: +

{{db.responses['del_self']}}

+
+
+ Отправляется, + когда приходит сигнал об удалении сообщений (-смс или запрещенные + ссылки) + + Текущее + значение: +

{{db.responses['del_process']}}

+
+
+ Отправляется, + когда все необходимые сообщения удалены + + Текущее + значение: +

{{db.responses['del_success']}}

+
+
+ Отправляется, + когда дежурный не может удалить сообщения (например если он не + администратор в чате) + + Текущее + значение: +

{{db.responses['del_err_924']}}

+
+
+ Отправляется, + когда ВК присылает сообщение об ошибке ({ошибка} - ответ, присланный + ВК) + + Текущее + значение: +

{{db.responses['del_err_vk']}}

+
+
+ Отправляется, если сообщения не + найдены + + Текущее + значение: +

{{db.responses['del_err_not_found']}}

+
+
+ Отправляется в случае остальных + ошибок + + Текущее + значение: +

{{db.responses['del_err_unknown']}}

+
+
+
+
+
+
+ Отправляется, когда истекает срок бана + пользователя и дежурный пытается добавить его в чат + ({ссылка} - имя и фамилия пользователя, {имя} - название + чата) + + Текущее + значение: +

{{db.responses['user_ret_ban_expired']}}

+
+
+ Отправляется в процессе возврата + пользователя в чат + ({ссылка} - имя и фамилия пользователя, {имя} - название + чата) + + Текущее + значение: +

{{db.responses['user_ret_process']}}

+
+
+ Отправляется, если пользователь успешно + добавлен в чат + ({ссылка} - имя и фамилия пользователя, {имя} - название чата) + + + Текущее + значение: +

{{db.responses['user_ret_success']}}

+
+
+ Отправляется, если пытаться добавить + дежурного + ({ссылка} - имя и фамилия пользователя, {имя} - название чата) + + + Текущее + значение: +

{{db.responses['user_ret_self']}}

+
+
+ Отправляется, если дежурный не может + добавить пользователя + (пользователь уже в беседе или не в друзьх дежурного) ({ссылка} - + имя и фамилия пользователя, {имя} - название чата) + + + Текущее + значение: +

{{db.responses['user_ret_err_no_access']}}

+
+
+ Отправляется, если ВК присылает ошибку + на попытку добавить пользователя + ({ссылка} - имя и фамилия пользователя, {ошибка} - ответ ВК, {имя} - + название чата) + + + Текущее + значение: +

{{db.responses['user_ret_err_vk']}}

+
+
+ Отправляется при возникновении других + ошибок + ({ссылка} - имя и фамилия пользователя, {ошибка} - ответ ВК, {имя} - + название чата) + + + Текущее + значение: +

{{db.responses['user_ret_err_unknown']}}

+
+
+
+
+
+
+ Отправляется, если запись успешно + опубликована + + Текущее + значение: +

{{db.responses['to_group_success']}}

+
+
+ Отправляется, если превышен лимит + публикаций или у пользователя + недостаточно прав + + Текущее + значение: +

{{db.responses['to_group_err_forbidden']}}

+
+
+ Не знаю, + когда эта ошибка возникает, но раз ВК ее указали, она тут + есть) + + Текущее + значение: +

{{db.responses['to_group_err_recs']}}

+
+
+ Че тут + добавить? + + Текущее + значение: +

{{db.responses['to_group_err_link']}}

+
+
+ ({ошибка} + - ответ ВК) + + Текущее + значение: +

{{db.responses['to_group_err_vk']}}

+
+
+ Отправляется в случае других + ошибок + + Текущее + значение: +

{{db.responses['to_group_err_unknown']}}

+
+
+
+
+
+ +
+ Отправляется, если пользователь, + вызвавший команду, не находится в + списке доверенных + + Текущее + значение: +

{{db.responses['not_in_trusted']}}

+
+
+ Отправляется, если в тексте + присутствуют слова + "передать", "купить", "повысить", "завещание", "модер" или текст + начинается с восклицательного знака (!) + + Текущее + значение: +

{{db.responses['repeat_if_forbidden']}}

+
+
+
+
+
+
+ Отправляется, + когда кто-то в чате отправляет вышеуказанную команду + ({ответ} - "ПОНГ", "КОНГ" и т.п. {время} - время в секундах (только + цифры)) + + + Текущее + значение: +

{{db.responses['ping_duty']}}

+
+
+ Ну ты понял + ({ответ} - "ПОНГ", "КОНГ" и т.п. + {время} - время в секундах (только цифры) {обработано} - время между + получением сигнала от ириса и отправкой сообщения + {пингвк} - время ответа ВКонтакте) + + Текущее + значение: +

{{db.responses['ping_myself']}}

+
+
+
+
+
+
+ Отправляется, + когда кто-то вызывает команду ".д инфо" ({версия} - версия + установленного приемника, + {владелец} - твои имя и фамилия, {чаты} - количество связанных чатов + (цифра), {ид} - идентификатор чата во вселенной ириса + {имя} - название чата) + + Текущее + значение: +

{{db.responses['info_duty']}}

+
+
+ Отправляется, + при вызове команды ".с инфо" ({версия} - версия установленного + приемника, + {владелец} - твои имя и фамилия, {чаты} - количество связанных чатов + (цифра), {ид} - идентификатор чата во вселенной ириса + {имя} - название чата) + + Текущее + значение: +

{{db.responses['info_myself']}}

+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ (( Чтобы увеличить количество кадров - увеличь количество кадров + (спасибо, кэп) и сохрани анимку )) {% if db.anims %} +
+ {% for i in range(db.anims|length) %} +
+
+
+ +
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+ +
+

Кадры:

+
    + {% for l in range(db.anims[i]['frames']|length) %}
  • + +
  • {% endfor %} +
+
+
+ +
+
+ +
+
+
+
+
+
+ {% endfor %} +
+ {% else %} +

У тебя пока нет ни одной анимки
Но это легко решается нажатием на + кнопку ниже ;)

+ {% endif %} +
+ +
+
+
+
+
+
+
+ +
+{% endblock pagecontent %} \ No newline at end of file diff --git a/duty/templates/pages/install.html b/duty/templates/pages/install.html new file mode 100644 index 0000000..0afd73d --- /dev/null +++ b/duty/templates/pages/install.html @@ -0,0 +1,35 @@ +{% extends 'layout.html' %} +{% block pagecontent %} +
+ + + +
+
+
+
+
+
+
+
+ Получить можно по этой ссылке. Нажми "Разрешить", скопируй текст из адресной строки и вставь сюда. + +
+
+
+
+
+
+
+
+
+
+
+
+
+{% endblock pagecontent %} \ No newline at end of file diff --git a/duty/templates/pages/login.html b/duty/templates/pages/login.html new file mode 100644 index 0000000..0e358aa --- /dev/null +++ b/duty/templates/pages/login.html @@ -0,0 +1,27 @@ +{% extends 'layout.html' %} +{% block pagecontent %} +
+
+
+
+
Для входа в панель управления необходимо ввести токен от аккаунта дежурного
+
+
+
+
+
+
+ + + Получить можно по этой ссылке. Нажми "Разрешить", скопируй текст из адресной строки и вставь сюда. + +
+ +
+
+
+
+
+{% endblock pagecontent %} \ No newline at end of file diff --git a/duty/templates/pages/me_confirm.html b/duty/templates/pages/me_confirm.html new file mode 100644 index 0000000..8a51ce2 --- /dev/null +++ b/duty/templates/pages/me_confirm.html @@ -0,0 +1,19 @@ +{% extends 'layout.html' %} +{% block pagecontent %} +
+ + +
+
+
+
Проблема с JavaScript. Попробуй использовать другой браузер
+
+
+ +{% endblock pagecontent %} \ No newline at end of file diff --git a/duty/utils.py b/duty/utils.py new file mode 100644 index 0000000..9380008 --- /dev/null +++ b/duty/utils.py @@ -0,0 +1,156 @@ +import os +import re +import sys +import random +from typing import Any, Iterable, Union, List, TypeVar +from microvk import VkApi, VkApiResponseException + + +MySignalEvent = TypeVar("MySignalEvent") +cmid_key = 'conversation_message_id' + +dirname = os.path.dirname +joinpath = os.path.join + +ROOT_DIR = dirname(dirname(os.path.abspath(__file__))) + + +def path_from_root(*paths) -> str: + return joinpath(ROOT_DIR, *paths) + + +def att_parse(attachments): + atts = [] + if attachments: + for i in attachments: + att_t = i['type'] + if att_t in {'link', 'article'}: continue + atts.append(att_t + str(i[att_t]['owner_id']) + + '_' + str(i[att_t]['id'])) + if i[att_t].get('access_key'): + atts[-1] += '_' + i[att_t]['access_key'] + return atts + + +def format_response(text: str, **values): + for key in values.keys(): + if not key.islower(): + values[key.lower()] = values.pop(key) + for var_name in re.findall(r'{([^} ]+)}', text): + if (lowcase := var_name.lower()) not in values: + values[lowcase] = ( + f'{{Ошибка! Не существует переменной "{var_name}", ' + 'ВНИМАТЕЛЬНО проверь название}' + ) + text = text.replace('{'+var_name+'}', str(values[lowcase])) + return text + + +class Message: + text: str + args: List[str] + payload: str + command: str + attachments: List[str] + reply: dict + fwd: List[dict] + + def __init__(self, msg: dict): + matches = re.findall(r'(\S+)|\n(.*)', msg['text']) + del matches[0] + if matches != []: + self.command = matches.pop(0)[0].lower() + else: + self.command = '' + self.reply = msg.get('reply_message', {}) + self.fwd = msg.get('fwd_messages', []) + self.text = msg['text'] + self.payload = '' + self.args = [] + for i, match in enumerate(matches, 1): + if match[0]: + self.args.append(match[0]) + else: + self.payload += match[1] + ('\n' if i < len(matches) else '') + self.attachments = att_parse(msg['attachments']) + + +def gen_secret(chars='abcdefghijklmnopqrstuvwxyz0123456789', + length: int = None): + secret = '' + length = length or random.randint(64, 80) + while len(secret) < length: + secret += chars[random.randint(0, len(chars)-1)] + return secret + + +def find_user_mention(text: str) -> Union[int, None]: + uid = re.findall(r'\[(id|public|club)(\d*)\|', text) + if uid: + if uid[0][0] != 'id': + uid = 0 - int(uid[0][1]) + else: + uid = int(uid[0][1]) + return uid + + +def find_user_by_link(text: str, vk: VkApi) -> Union[int, None]: + user = re.findall(r"vk.ru\/(id\d*|[^ \n]*\b)", text) + if user: + try: + return vk('users.get', user_ids=user)[0]['id'] + except (VkApiResponseException, IndexError): + return None + + +def get_index(item: Iterable, index: int, default: Any = None): + try: + return item[index] + except IndexError: + return default + + +def find_mention_by_event(event: MySignalEvent) -> Union[int, None]: + 'Возвращает ID пользователя, если он есть в сообщении, иначе None' + user_id = None + if event.args: + user_id = find_user_mention(event.args[0]) + if event.reply_message and not user_id: + user_id = event.reply_message['from_id'] + if not user_id: + user_id = find_user_by_link(event.msg['text'], event.api) + if event.msg['fwd_messages'] and not user_id: + user_id = event.msg['fwd_messages'][0]['from_id'] + return user_id + + +def format_push(u: dict) -> str: + uid = u['id'] + if u.get('first_name') is None: + return f"[club{abs(uid)}|{u['name']}]" + else: + return f"[id{uid}|{u['first_name']} {u['last_name']}]" + + +def ment_user(user: dict) -> str: + return format_push(user) + + +def get_plural(number: Union[int, float], one: str, few: str, + many: str, other: str = '') -> str: + """`one` = 1, 21, 31, 41, 51, 61...\n + `few` = 2-4, 22-24, 32-34...\n + `many` = 0, 5-20, 25-30, 35-40...\n + `other` = 1.31, 2.31, 5.31...""" + if type(number) == float: + if not number.is_integer(): + return other + else: + number = int(number) + if number % 10 in {2, 3, 4}: + if not 10 < number < 20: + return few + number = str(number) + if number[-1] == '1': + return one + return many diff --git a/get_info_ip.py b/get_info_ip.py new file mode 100644 index 0000000..3f655f1 --- /dev/null +++ b/get_info_ip.py @@ -0,0 +1,33 @@ +import requests +import traceback +from duty.objects import dp, MySignalEvent + + + +@dp.longpoll_event_register('ип', 'айпи') +@dp.my_signal_event_register('ип', 'айпи') +def get_info_by_ip(event: MySignalEvent) -> str: + ip = " ".join(event.args) + if not ip: + event.msg_op(2, "❗ Нет указан ip/домен") + else: + try: + response = requests.get(url=f'http://ip-api.com/json/{ip}?lang=ru').json() + + if response.get("status") == "fail": + data = "❌Информация не найдены. Проверьте данные" + else: + data = f''' + ⚙Айпи чекер⚙ + + 🔎IP: {response.get('query')} + 🤖Провайдер: {response.get('isp')} + 🌇Страна: {response.get('country')} + 🏙Регион: {response.get('regionName')} + 🏙Город: {response.get('city')} + 🔑Индекс: {response.get('zip') if response.get('zip') != "" else "Не найдено"} + ✏Координаты: {response.get('lat')}:{response.get('lon')}'''.replace(" ", "") + event.msg_op(2, f'{data}') + except Exception: + print(traceback.format_exc()) + return "ok" diff --git a/idm/__init__.py b/idm/__init__.py deleted file mode 100644 index c960e07..0000000 --- a/idm/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -__version__ = "1.3.2 public" - - -import logging -import os - -path = os.path.join(os.path.dirname(os.path.dirname(__file__)), f"idm.log") -logging.basicConfig(handlers=[ - logging.FileHandler(path, 'a', 'utf-8'), - logging.StreamHandler() - ], level=logging.ERROR, - format="%(asctime)s:%(levelname)s:[%(module)s]:[th:%(threadName)s|fn:%(funcName)s]:%(message)s") - - - - -logger = logging.getLogger("IDMStart") - -logger.info(f"Запускаю IDM v{__version__}") - -from . import objects, utils, commands -logger.info(f"Объекты импортированны") - -db = objects.DB() -if db.installed: - logger.info(f"БД настоена Владелец: {db.owner_id} Дежурный: {db.duty_id} Хост: {db.host}") -else: - logger.info("""БД не настоена""") - - - -from .routes import app diff --git a/idm/commands/__init__.py b/idm/commands/__init__.py deleted file mode 100644 index 0a3591e..0000000 --- a/idm/commands/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ - -from .add_user import add_user -from .ban_expired import ban_expired -from .ban_get_reason import ban_get_reason -from .bind_chat import bind_chat -from .delete_messages_from_user import delete_messages_from_user -from .delete_messages import delete_messages -from .forbidden_links import forbidden_links -from .ignore_messages import ignore_messages -from .ping import ping as ping__ -from .print_bookmark import print_bookmark -from .send_my_signal import send_my_signal -from .send_signal import send_signal -from .subscribe_signals import subscribe_signals -from .to_group import to_group - -from .signals import * -from .my_signals import * \ No newline at end of file diff --git a/idm/commands/add_user.py b/idm/commands/add_user.py deleted file mode 100644 index 59c0c72..0000000 --- a/idm/commands/add_user.py +++ /dev/null @@ -1,23 +0,0 @@ -from ..objects import dp, Event -from .. import utils -from vkapi import VkApiResponseException - -@dp.event_handle(dp.Methods.ADD_USER) -def add_user(event: Event) -> str: - user = event.api('users.get', user_ids=event.obj['user_id'])[0] - message = f"💚 Добавляю пользователя [id{user['id']}|{user['first_name']} {user['last_name']}]" - - message_id = utils.new_message(event.api, event.chat.peer_id, message=message) - - try: - event.api('messages.addChatUser', chat_id=event.chat.id, user_id=user['id']) - message = f"✅ Пользователь [id{user['id']}|{user['first_name']} {user['last_name']}] добавлен в беседу." - except VkApiResponseException as e: - if e.error_code == 15: - message = f"❗ Не удалось добавить пользователя [id{user['id']}|{user['first_name']} {user['last_name']}].\nНет доступа.\n Возможно, он не в моих друзьях или он уже в беседе." - else: - message = f"❗ Не удалось добавить пользователя [id{user['id']}|{user['first_name']} {user['last_name']}].\nОшибка ВК.\n{e.error_msg}" - except: - message = f"❗ Не удалось добавить пользователя [id{user['id']}|{user['first_name']} {user['last_name']}].\nПроизошла неизвестная ошибка." - utils.edit_message(event.api, event.chat.peer_id, message_id, message=message) - return "ok" diff --git a/idm/commands/ban_expired.py b/idm/commands/ban_expired.py deleted file mode 100644 index 68db022..0000000 --- a/idm/commands/ban_expired.py +++ /dev/null @@ -1,23 +0,0 @@ -from ..objects import dp, Event -from .. import utils -from vkapi import VkApiResponseException - -@dp.event_handle(dp.Methods.BAN_EXPIRED) -def ban_expired(event: Event) -> str: - user = event.api('users.get', user_ids=event.obj['user_id'])[0] - message = f"💚 Срок бана пользователя [id{user['id']}|{user['first_name']} {user['last_name']}] истек." - - message_id = utils.new_message(event.api, event.chat.peer_id, message=message) - - try: - event.api('messages.addChatUser', chat_id=event.chat.id, user_id=user['id']) - message = f"✅ Пользователь [id{user['id']}|{user['first_name']} {user['last_name']}] добавлен в беседу." - except VkApiResponseException as e: - if e.error_code == 15: - message = f"❗ Не удалось добавить пользователя [id{user['id']}|{user['first_name']} {user['last_name']}].\nНет доступа.\n Возможно, он не в моих друзьях или он уже в беседе." - else: - message = f"❗ Не удалось добавить пользователя [id{user['id']}|{user['first_name']} {user['last_name']}].\nОшибка ВК.\n{e.error_msg}" - except: - message = f"❗ Не удалось добавить пользователя [id{user['id']}|{user['first_name']} {user['last_name']}].\nПроизошла неизвестная ошибка." - utils.edit_message(event.api, event.chat.peer_id, message_id, message=message) - return "ok" \ No newline at end of file diff --git a/idm/commands/ban_get_reason.py b/idm/commands/ban_get_reason.py deleted file mode 100644 index d930a7f..0000000 --- a/idm/commands/ban_get_reason.py +++ /dev/null @@ -1,9 +0,0 @@ -from ..objects import dp, Event -from .. import utils - -@dp.event_handle(dp.Methods.BAN_GET_REASON) -def ban_get_reason(event: Event) -> str: - utils.new_message(event.api, event.chat.peer_id, message=event.obj['message'], - reply_to=utils.get_msg_id(event.api, event.chat.peer_id, event.obj['local_id'])) - - return "ok" \ No newline at end of file diff --git a/idm/commands/bind_chat.py b/idm/commands/bind_chat.py deleted file mode 100644 index 1c49eea..0000000 --- a/idm/commands/bind_chat.py +++ /dev/null @@ -1,8 +0,0 @@ -from ..objects import dp, Event -from ..utils import new_message - -@dp.event_handle(dp.Methods.BIND_CHAT) -def bind_chat(event: Event) -> str: - new_message(event.api, event.chat.peer_id, - message=f"✅ Беседа распознана.") - return "ok" \ No newline at end of file diff --git a/idm/commands/delete_messages.py b/idm/commands/delete_messages.py deleted file mode 100644 index de02a5b..0000000 --- a/idm/commands/delete_messages.py +++ /dev/null @@ -1,27 +0,0 @@ -from ..objects import dp, Event -from .. import utils -from vkapi import VkApiResponseException - -@dp.event_handle(dp.Methods.DELETE_MESSAGES) -def delete_messages(event: Event) -> str: - message_id = utils.new_message(event.api, event.chat.peer_id, message="... удаляю сообщения ...") - - msg_ids = utils.get_msg_ids(event.api, event.chat.peer_id, event.obj['local_ids']) - - if msg_ids == None or msg_ids == []: - utils.edit_message(event.api, event.chat.peer_id, message_id, message="❗ Ошибка дежурного, я не смог найти смс") - return "ok" - - msg_ids = [str(msg_id) for msg_id in msg_ids] - - try: - event.api("messages.delete", message_ids=",".join(msg_ids), delete_for_all=1, spam=1 if event.obj.get("is_spam", False) else 0) - utils.edit_message(event.api, event.chat.peer_id, message_id, message="✅ Сообщения удалены") - except VkApiResponseException as e: - if e.error_code == 924: - utils.edit_message(event.api, event.chat.peer_id, message_id, message="❗ Не удалось удалить сообщения. Невозможно удалить сообщение, возможно пользователь администратор.") - else: - utils.edit_message(event.api, event.chat.peer_id, message_id, message=f"❗ Не удалось удалить сообщения. Ошибка VK {e.error_msg}") - except: - utils.edit_message(event.api, event.chat.peer_id, message_id, message=f"❗ Произошла неизвестная ошибка.") - return "ok" \ No newline at end of file diff --git a/idm/commands/delete_messages_from_user.py b/idm/commands/delete_messages_from_user.py deleted file mode 100644 index 2b973fd..0000000 --- a/idm/commands/delete_messages_from_user.py +++ /dev/null @@ -1,34 +0,0 @@ -from ..objects import dp, Event -from .. import utils -from vkapi import VkApiResponseException -from datetime import datetime - -@dp.event_handle(dp.Methods.DELETE_MESSAGES_FROM_USER) -def delete_messages_from_user(event: Event) -> str: - message_id = utils.new_message(event.api, event.chat.peer_id, message="... удаляю сообщения ...") - - user_id = event.obj['user_id'] - amount = event.obj.get("amount", None) - - msg_ids = [] - for mmsg in utils.get_all_history_gen(event.api, event.chat.peer_id): - if datetime.now().timestamp() - mmsg['date'] >= 86400: - break - if mmsg['from_id'] == user_id and mmsg.get('action', None) == None: - msg_ids.append(str(mmsg['id'])) - - if amount != None: - if amount <= len(msg_ids): - msg_ids = msg_ids[:len(msg_ids) - (len(msg_ids) - amount)] - - try: - event.api("messages.delete", message_ids=",".join(msg_ids), delete_for_all=1, spam=1 if event.obj.get("is_spam", False) else 0) - utils.edit_message(event.api, event.chat.peer_id, message_id, message="✅ Сообщения удалены") - except VkApiResponseException as e: - if e.error_code == 924: - utils.edit_message(event.api, event.chat.peer_id, message_id, message="❗ Не удалось удалить сообщения. Невозможно удалить сообщение, возможно пользователь администратор.") - else: - utils.edit_message(event.api, event.chat.peer_id, message_id, message=f"❗ Не удалось удалить сообщения. Ошибка VK {e.error_msg}") - except: - utils.edit_message(event.api, event.chat.peer_id, message_id, message=f"❗ Произошла неизвестная ошибка.") - return "ok" \ No newline at end of file diff --git a/idm/commands/forbidden_links.py b/idm/commands/forbidden_links.py deleted file mode 100644 index 497f349..0000000 --- a/idm/commands/forbidden_links.py +++ /dev/null @@ -1,27 +0,0 @@ - -from ..objects import dp, Event -from .. import utils -from vkapi import VkApiResponseException - -@dp.event_handle(dp.Methods.FORBIDDEN_LINKS) -def forbidden_links(event: Event) -> str: - message_id = utils.new_message(event.api, event.chat.peer_id, message="... удаляю сообщения ...") - - msg_ids = utils.get_msg_ids(event.api, event.chat.peer_id, event.obj['local_ids']) - msg_ids = [str(msg_id) for msg_id in msg_ids] - - if msg_ids == None or msg_ids == []: - utils.edit_message(event.api, event.chat.peer_id, message_id, message="❗ Ошибка дежурного, я не смог найти смс") - return "ok" - - try: - event.api("messages.delete", message_ids=",".join(msg_ids), delete_for_all=1, spam=1 if event.obj.get("is_spam", False) else 0) - utils.edit_message(event.api, event.chat.peer_id, message_id, message="✅ Сообщения удалены") - except VkApiResponseException as e: - if e.error_code == 924: - utils.edit_message(event.api, event.chat.peer_id, message_id, message="❗ Не удалось удалить сообщения. Невозможно удалить сообщение, возможно пользователь администратор.") - else: - utils.edit_message(event.api, event.chat.peer_id, message_id, message=f"❗ Не удалось удалить сообщения. Ошибка VK {e.error_msg}") - except: - utils.edit_message(event.api, event.chat.peer_id, message_id, message=f"❗ Произошла неизвестная ошибка.") - return "ok" \ No newline at end of file diff --git a/idm/commands/ignore_messages.py b/idm/commands/ignore_messages.py deleted file mode 100644 index 6c0d255..0000000 --- a/idm/commands/ignore_messages.py +++ /dev/null @@ -1,5 +0,0 @@ -from ..objects import dp, Event - -@dp.event_handle(dp.Methods.IGNORE_MESSAGES) -def ignore_messages(event: Event) -> str: - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/__init__.py b/idm/commands/my_signals/__init__.py deleted file mode 100644 index ee69143..0000000 --- a/idm/commands/my_signals/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from .auto_friends_add import check_afa, off_afa, on_afa -from .delete_self_message import delete_self_message -from .friends import add_to_fr, remove_from_fr -from .info import info -from .online import check_online, off_online, on_online -from .ping import ping -from .templates import create_template, remove_template, run_template, templates -from .trusted_users import add_trusted_user, remove_trusted_user, trusted_users -from .check import check -# from .dynamic_templates import dtemplate -# from .test import test_user, test_group diff --git a/idm/commands/my_signals/auto_friends_add.py b/idm/commands/my_signals/auto_friends_add.py deleted file mode 100644 index a42cb25..0000000 --- a/idm/commands/my_signals/auto_friends_add.py +++ /dev/null @@ -1,93 +0,0 @@ -from ...objects import dp, MySignalEvent, DB -from ... import utils -from threading import Thread, Timer -import time -from vkapi import VkApi, VkApiResponseException -import typing - -import logging - -logger = logging.getLogger(__name__) - -afa_thread: Thread = None -stop_thread = False - -def set_afa(v): - global stop_thread - global afa_thread - - db = DB() - stop_thread = v - if v == False: - api = VkApi(db.access_token) - afa_thread = Thread(target=afa_th, args=(api, lambda:stop_thread)) - afa_thread.setDaemon(True) - afa_thread.setName('AFA Thread') - afa_thread.start() - - - -def afa_th(api: VkApi, stop: typing.Callable): - is_stop = False - while True: - try: - if is_stop:break - logger.info("Установлен онлайн") - - data = api('friends.getRequests', offset=0, count=1000, extended=0, need_mutual=0, out=0, need_viewed=1)['items'] - users = api('users.get', user_ids=",".join([str(i) for i in data])) - - for user in users: - if user.get('deactivated', None) != None: - continue - try: - api("friends.add", user_id=user['id']) - except VkApiResponseException as e: - logger.error(f'Ошибка добавления пользвателя в друзья. {e.error_code} {e.error_msg} {e.request_params}') - time.sleep(5) - is_stop = stop() - if is_stop:break - except Exception as e: - logger.info(f"Ошибка в AFA: {e}") - time.sleep(300) - - -@dp.my_signal_event_handle('-адвд', '-друзья') -def off_afa(event: MySignalEvent): - global afa_thread - global stop_thread - - logger.info("Выключено автодобавление в друзья") - - if afa_thread == None or not afa_thread.is_alive(): - utils.new_message(event.api, event.chat.peer_id, message="❗ Автодобавление в друзья не запущено") - return "ok" - set_afa(False) - utils.new_message(event.api, event.chat.peer_id, message="✅ Автодобавление в друзья остановлено.") - return "ok" - - -@dp.my_signal_event_handle('+адвд', '+друзья') -def on_afa(event: MySignalEvent): - global afa_thread - global stop_thread - - logger.info("Установлен онлайн") - - stop_thread = False - if afa_thread != None and afa_thread.is_alive(): - utils.new_message(event.api, event.chat.peer_id, message="✅ Автодобавление в друзья и так запущено.") - return "ok" - set_afa(True) - utils.new_message(event.api, event.chat.peer_id, message="✅ Автодобавление в друзья запущено.") - return "ok" - -@dp.my_signal_event_handle('адвд', 'друзья') -def check_afa(event: MySignalEvent): - global afa_thread - if afa_thread != None and afa_thread.is_alive(): - utils.new_message(event.api, event.chat.peer_id, message="✅ Автодобавление в друзья работает.") - return "ok" - else: - utils.new_message(event.api, event.chat.peer_id, message="✅ Автодобавление в друзья не работает.") - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/check.py b/idm/commands/my_signals/check.py deleted file mode 100644 index b8cf4e2..0000000 --- a/idm/commands/my_signals/check.py +++ /dev/null @@ -1,39 +0,0 @@ -from ...objects import dp, MySignalEvent -from ... import utils -from vkapi import VkApi - -@dp.my_signal_event_handle('проверить') -def check(event: MySignalEvent) -> str: - def check_token(t: str) -> str: - - if t == "" or t == None: - return "Токен не задан" - - api = VkApi(t) - - user = api('users.get') - - if type(user) != list: - return "ошибка | токен поврежден" - user = user[0] - - return f"ОК, [id{user['id']}|{user['first_name']} {user['last_name']}]" - - - message = f""" - Основной токен: {check_token(event.db.access_token)} - Токен для вечного онлайна: {check_token(event.db.online_token)} - Токен для скрытия онлайна: {check_token(event.db.me_token)} - Токен для добавления групп: {check_token(event.db.bp_token)} - - """.replace(' ', '') - - utils.new_message(event.api, event.chat.peer_id, message=message) - - - - - - - return "ok" - diff --git a/idm/commands/my_signals/delete_self_message.py b/idm/commands/my_signals/delete_self_message.py deleted file mode 100644 index 7849dfb..0000000 --- a/idm/commands/my_signals/delete_self_message.py +++ /dev/null @@ -1,39 +0,0 @@ -from ...objects import dp, MySignalEvent -from ... import utils -from datetime import datetime -from vkapi import VkApi, VkApiResponseException - -from threading import Timer - -def delete_msg(api: VkApi, msg_id: int): - api("messages.delete", message_ids=msg_id, delete_for_all=1) - - -@dp.my_signal_event_handle('-смс', 'dsm') -def delete_self_message(event: MySignalEvent) -> str: - message_id = event.msg['id'] - utils.edit_message(event.api, event.chat.peer_id, message_id, message="... удаляю сообщения ...") - - user_id = event.msg['from_id'] - - msg_ids = [] - for mmsg in utils.get_all_history_gen(event.api, event.chat.peer_id): - if datetime.now().timestamp() - mmsg['date'] > 86400: - break - if mmsg['from_id'] == user_id and mmsg.get('action', None) == None: - msg_ids.append(str(mmsg['id'])) - message_id = 0 - try: - event.api("messages.delete", message_ids=",".join(msg_ids), delete_for_all=1) - message_id = utils.new_message(event.api, event.chat.peer_id, message="✅ Сообщения удалены") - except VkApiResponseException as e: - if e.error_code == 924: - message_id = utils.new_message(event.api, event.chat.peer_id, message="❗ Не удалось удалить сообщения.") - else: - message_id = utils.new_message(event.api, event.chat.peer_id, message=f"❗ Не удалось удалить сообщения. Ошибка VK {e.error_msg}") - except: - message_id = utils.new_message(event.api, event.chat.peer_id, message=f"❗ Произошла неизвестная ошибка.") - - t = Timer(2, delete_msg, (event.api, message_id)) - t.start() - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/dynamic_templates.py b/idm/commands/my_signals/dynamic_templates.py deleted file mode 100644 index f84c5e8..0000000 --- a/idm/commands/my_signals/dynamic_templates.py +++ /dev/null @@ -1,115 +0,0 @@ -from ...objects import dp, MySignalEvent, DB -from vkapi import VkApi -import time -import typing - -from ...utils import new_message - -from enum import Enum - -class Frame: - time: float - data: str - - def __init__(self, **kwargs): - self.time = kwargs.get('time', 3) - self.data = kwargs.get('data', 'Потерянный фрейм') - - def render(self, api: VkApi, peer_id: int, message_id: int) -> int: - try: - s = api("messages.edit", peer_id=peer_id, message_id=message_id, message=self.data) - time.sleep(self.time) - return s - except: - time.sleep(self.time) - return 0 - - - - -""" -🌕🌕🌗🌑🌑🌑🌑🌑🌓 -🌕🌕🌗🌑🌑🌑🌑🌑🌕 -🌕🌕🌗🌑🌓🌕🌕🌕🌕 -🌕🌕🌗🌑🌓🌕🌕🌕🌕 -🌕🌕🌗🌑🌑🌑🌑🌓🌕 -🌕🌕🌗🌑🌑🌑🌑🌕🌕 -🌕🌕🌗🌑🌓🌕🌕🌕🌕 -🌕🌕🌗🌑🌓🌕🌕🌕🌕 -🌕🌕🌗🌑🌓🌕🌕🌕🌕 -""" - -class DynamicTemplateType(Enum): - LTOR = "ltor" - RTOL = "rtol" - BY_PERSONNEL = "by_personnel" - - - -class DynamicTemplate: - - """ - Если тип by_personnel кадры { time, data } - Если тип LTOR или RTOL шаблон { type, time, data, name } - """ - - frames: typing.List[Frame] - type: str - raw: dict - name: str - - time: float - data: str - - def __init__(self, db: DB, name: str): - self.frames = [] - - for data in db.dynamic_templates: - if data['name'] == name: - self.raw = data - - self.type = DynamicTemplateType(self.raw.get('type', "by_personnel")) - - if self.type == DynamicTemplateType.BY_PERSONNEL: - for fr in self.raw['frames']: - self.frames.append(Frame(**fr)) - elif self.type == DynamicTemplateType.LTOR: - self.time = self.raw.get('time', 3) - _data_split = self.raw['data'].split('\n') - for _ in range(0, len(_data_split[0]) + 1 ): - self.frames.append(Frame(time=self.time, data="\n".join(_data_split))) - __data_split = [ - d[-1] + d[:-1] - for d in _data_split - ] - _data_split = __data_split - elif self.type == DynamicTemplateType.RTOL: - self.time = self.raw.get('time', 3) - _data_split = self.raw['data'].split('\n') - for _ in range(0, len(_data_split[0]) + 1 ): - self.frames.append(Frame(time=self.time, data="\n".join(_data_split))) - __data_split = [ - d[1:] + d[0] - for d in _data_split - ] - _data_split = __data_split - - - - def run(self, api: VkApi, peer_id: int, message_id: int): - fr = [] - for frame in self.frames: - d = frame.render(api, peer_id, message_id) - fr.append(d) - return fr - -@dp.my_signal_event_handle('дшаб') -def dtemplate(event: MySignalEvent) -> str: - - name = event.args[0] - - dt = DynamicTemplate(event.db, name) - d = dt.run(event.api, event.chat.peer_id, event.msg['id']) - - new_message(event.api, event.chat.peer_id, message=f"Рендер шаблона окончен\n Фреймов: {len(dt.frames)}\nОтчет: {d}") - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/friends.py b/idm/commands/my_signals/friends.py deleted file mode 100644 index eafacb9..0000000 --- a/idm/commands/my_signals/friends.py +++ /dev/null @@ -1,54 +0,0 @@ -from ...objects import dp, MySignalEvent -from ...utils import new_message, edit_message -from vkapi import VkApiResponseException - -@dp.my_signal_event_handle('+др', '+друг') -def add_to_fr(event: MySignalEvent) -> str: - if event.reply_message == None: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Ошибка при выполнении, необходимо пересланное сообщение") - return "ok" - - friend_id = event.reply_message['from_id'] - try: - event.api('friends.add', user_id=friend_id) - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message="✅ Все отлично, запрос отправлен") - return "ok" - except VkApiResponseException as e: - if e.error_code == 174: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message="❗ Невозможно добавить в друзья самого себя") - elif e.error_code == 175: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message="❗ Невозможно добавить в друзья пользователя, который занес Вас в свой черный список") - elif e.error_code == 176: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message="❗ Невозможно добавить в друзья пользователя, который занесен в Ваш черный список") - else: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message=f"❗ Невозможно добавить в друзья пользователя: {e.error_msg}") - return "ok" - -@dp.my_signal_event_handle('-др', '-друг') -def remove_from_fr(event: MySignalEvent) -> str: - if event.reply_message == None: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message="❗ Ошибка при выполнении, нужно пересланное сообщение") - return "ok" - - friend_id = event.reply_message['from_id'] - - try: - data = event.api('friends.delete', user_id=friend_id) - if data.get('friend_deleted', False):edit_message(event.api, event.chat.peer_id, event.msg['id'], message="✅ Друг удален") - elif data.get('out_request_deleted', False):edit_message(event.api, event.chat.peer_id, event.msg['id'], message="✅ Отменена исходящая заявка") - elif data.get('in_request_deleted', False):edit_message(event.api, event.chat.peer_id, event.msg['id'], message="✅ Отклонена входящая заявка") - elif data.get('suggestion_deleted', False):edit_message(event.api, event.chat.peer_id, event.msg['id'], message="✅ Отклонена рекомендация друга") - elif data.get('success', False):edit_message(event.api, event.chat.peer_id, event.msg['id'], message="✅ Друг удален") - else:edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Произошла ошибка") - except VkApiResponseException as e: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=f"❗ Произошла ошибка VK №{e.error_code} {e.error_msg}") - - - - return "ok" diff --git a/idm/commands/my_signals/info.py b/idm/commands/my_signals/info.py deleted file mode 100644 index e4e55bb..0000000 --- a/idm/commands/my_signals/info.py +++ /dev/null @@ -1,33 +0,0 @@ -from ...objects import dp, MySignalEvent, SignalEvent -from ...utils import edit_message, new_message -from datetime import datetime -from idm import __version__ -import typing -import threading - -@dp.my_signal_event_handle('инфо', 'инфа', '-i', 'info') -def info(event: typing.Union[MySignalEvent, SignalEvent]) -> str: - - owner = event.api('users.get', user_ids=event.db.owner_id)[0] - - - message = f"""Информация о дежурном: - IDM v{__version__} - Владелец: [id{owner['id']}|{owner['first_name']} {owner['last_name']}] - Чатов: {len(event.db.chats.keys())} - - Автодобавление в друзья: {'да' if 'AFA Thread' in [th.getName() for th in threading.enumerate()] else 'нет'} - Вечный онлайн: {'да' if 'Online Thread' in [th.getName() for th in threading.enumerate()] else 'нет'} - - Панель управления: https://{event.db.host}/ - - Информация о чате: - Я дежурный в чате: {'да' if event.chat.installed else 'нет'} - Iris ID: {event.chat.iris_id} - Peer ID: {event.chat.peer_id} - Имя: {event.chat.name} - - """.replace(' ', '') - - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=message) - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/online.py b/idm/commands/my_signals/online.py deleted file mode 100644 index 4c562ee..0000000 --- a/idm/commands/my_signals/online.py +++ /dev/null @@ -1,90 +0,0 @@ -from ...objects import dp, MySignalEvent, DB -from ... import utils -from threading import Thread, Timer -import time -from vkapi import VkApi -import typing - -import logging - -logger = logging.getLogger(__name__) - -online_thread: Thread = None -stop_thread = False - -def set_online(v): - global stop_thread - db = DB() - stop_thread = v - if v == False: - api = VkApi(db.online_token) - afa_thread = Thread(target=online_th, args=(api, lambda:stop_thread)) - afa_thread.setDaemon(True) - afa_thread.setName('Online Thread') - afa_thread.start() - - -def online_th(api: VkApi, stop: typing.Callable): - is_stop = False - while True: - try: - if is_stop:break - logger.info("Установлен онлайн") - api('account.setOnline', voip=0) - for _ in range(60): - is_stop = stop() - if is_stop:break - time.sleep(5) - except Exception as e: - logger.info(f"Ошибка в online: {e}") - - - -@dp.my_signal_event_handle('-онлайн') -def off_online(event: MySignalEvent): - global online_thread - global stop_thread - - logger.info("Выключен онлайн") - - if online_thread == None or not online_thread.is_alive(): - utils.new_message(event.api, event.chat.peer_id, message="❗ Вечный онлайн не запущен") - return "ok" - stop_thread = True - # online_thread.join() - utils.new_message(event.api, event.chat.peer_id, message="✅ Вечный онлайн остановлен.") - return "ok" - - -@dp.my_signal_event_handle('+онлайн') -def on_online(event: MySignalEvent): - global online_thread - global stop_thread - - logger.info("Установлен онлайн") - - stop_thread = False - token = event.db.online_token - if token == None: - utils.new_message(event.api, event.chat.peer_id, message=f"❗ Токен не установлен.\n Устанувить можно в админ-панеле https://{event.db.host}") - return "ok" - if online_thread != None and online_thread.is_alive(): - utils.new_message(event.api, event.chat.peer_id, message="✅ Вечный онлайн и так запущен.") - return "ok" - api_ = VkApi(token) - online_thread = Thread(target=online_th, args=(api_, lambda:stop_thread)) - online_thread.setDaemon(True) - online_thread.setName('Online Thread') - online_thread.start() - utils.new_message(event.api, event.chat.peer_id, message="✅ Вечный онлайн запущен.") - return "ok" - -@dp.my_signal_event_handle('онлайн') -def check_online(event: MySignalEvent): - global online_thread - if online_thread != None and online_thread.is_alive(): - utils.new_message(event.api, event.chat.peer_id, message="✅ Вечный онлайн работает.") - return "ok" - else: - utils.new_message(event.api, event.chat.peer_id, message="✅ Вечный онлайн не работает.") - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/ping.py b/idm/commands/my_signals/ping.py deleted file mode 100644 index 56b50ed..0000000 --- a/idm/commands/my_signals/ping.py +++ /dev/null @@ -1,29 +0,0 @@ -from ...objects import dp, MySignalEvent -from ...utils import new_message -from datetime import datetime - -@dp.my_signal_event_handle('пинг', 'пиу', 'кинг') -def ping(event: MySignalEvent) -> str: - - c_time = datetime.now().timestamp() - delta = round(c_time - event.msg['date'], 2) - - c_time_str = str(datetime.fromtimestamp(round(c_time))) - v_time_str = str(datetime.fromtimestamp(round(event.msg['date']))) - - r_type = 'ПОНГ' if event.command == "пинг" else "ПАУ" if event.command == "пиу" else "КОНГ" - - if delta > 15:r_type += "\nТРЕВОГА. ШИНАПРОВОД СГРЫЗЕН!!!!" - elif delta > 10:r_type += "\nТак кто-то конкретно грызет шинапровод." - elif delta > 5:r_type += "\nТак кто-то начинает грызть шинапровод." - else:r_type += "\neee сытый, спасибо что накормили его." - - message = f"""{r_type} - - Ответ через: {delta} с. - Время сервера VK: {v_time_str} - Время сервера IDM: {c_time_str} - """.replace(' ', '') - new_message(event.api, event.chat.peer_id, message=message) - - return "ok" \ No newline at end of file diff --git a/idm/commands/my_signals/templates.py b/idm/commands/my_signals/templates.py deleted file mode 100644 index afe08d2..0000000 --- a/idm/commands/my_signals/templates.py +++ /dev/null @@ -1,76 +0,0 @@ -from ...objects import dp, MySignalEvent -from ...utils import new_message, edit_message - -@dp.my_signal_event_handle('+шаб') -def create_template(event: MySignalEvent) -> str: - - if ((event.payload == '' or event.payload == None) and len(event.attachments) == 0) or len(event.args) == 0: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Нет данных") - return "ok" - - name = " ".join(event.args) - data = event.payload - - for temp in event.db.templates: - if temp['name'] == name: - event.db.templates.remove(temp) - event.db.save() - - event.db.templates.append( - { - "name":name, - "payload":data, - "attachments":event.attachments - } - ) - event.db.save() - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=f"✅ Шаблон \"{name}\" сохранен.") - return "ok" - - -@dp.my_signal_event_handle('-шаб') -def remove_template(event: MySignalEvent) -> str: - - if len(event.args) == 0: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Нет данных") - - name = " ".join(event.args) - - for temp in event.db.templates: - if temp['name'] == name: - event.db.templates.remove(temp) - event.db.save() - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=f"✅Шаблон \"{name}\" удален.") - return "ok" - - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=f"❗ Шаблон \"{name}\" не найден.") - return "ok" - - -@dp.my_signal_event_handle('шабы') -def templates(event: MySignalEvent) -> str: - - _message = "Ваши шаблоны:" - itr = 0 - for temp in event.db.templates: - itr += 1 - _message += f"\n{itr}. {temp['name']}" - - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=_message) - return "ok" - -@dp.my_signal_event_handle('шаб') -def run_template(event: MySignalEvent) -> str: - - if len(event.args) == 0: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Нет данных") - - name = " ".join(event.args) - - for temp in event.db.templates: - if temp['name'] == name: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=temp['payload'], attachment=",".join(temp['attachments'])) - return "ok" - - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=f"❗ Шаблон \"{name}\" не найден.") - return "ok" diff --git a/idm/commands/my_signals/trusted_users.py b/idm/commands/my_signals/trusted_users.py deleted file mode 100644 index cf6282a..0000000 --- a/idm/commands/my_signals/trusted_users.py +++ /dev/null @@ -1,54 +0,0 @@ -from ...objects import dp, MySignalEvent -from ...utils import new_message, edit_message - -@dp.my_signal_event_handle('+дов') -def add_trusted_user(event: MySignalEvent) -> str: - if event.reply_message == None: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Ошибка при выполнении, необходимо пересланное сообщение") - return "ok" - - tr_id = event.reply_message['from_id'] - if tr_id in event.db.trusted_users: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message=f"⚠ Пользователь уже в доверенных.") - return "ok" - tr_user = event.api('users.get', user_ids=tr_id)[0] - event.db.trusted_users.append(tr_id) - event.db.save() - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message=f"✅ Пользователь [id{tr_user['id']}|{tr_user['first_name']} {tr_user['last_name']}] в доверенных.") - return "ok" - - -@dp.my_signal_event_handle('-дов') -def remove_trusted_user(event: MySignalEvent) -> str: - if event.reply_message == None: - edit_message(event.api, event.chat.peer_id, event.msg['id'], message="❗ Ошибка при выполнении, необходимо пересланное сообщение") - return "ok" - - tr_id = event.reply_message['from_id'] - if tr_id not in event.db.trusted_users: - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message=f"⚠ Пользователь не находился в доверенных.") - return "ok" - - tr_user = event.api('users.get', user_ids=tr_id)[0] - event.db.trusted_users.remove(tr_id) - event.db.save() - edit_message(event.api, event.chat.peer_id, event.msg['id'], - message=f"✅ Пользователь [id{tr_user['id']}|{tr_user['first_name']} {tr_user['last_name']}] удален из доверенных.") - return "ok" - -@dp.my_signal_event_handle('доверенные', "довы") -def trusted_users(event: MySignalEvent) -> str: - users = event.api('users.get', user_ids=",".join([str(i) for i in event.db.trusted_users])) - - message = "Доверенные пользователи:" - itr = 0 - for user in users: - itr += 1 - message += f"\n{itr}. [id{user['id']}|{user['first_name']} {user['last_name']}]" - - edit_message(event.api, event.chat.peer_id, event.msg['id'], message=message) - - return "ok" \ No newline at end of file diff --git a/idm/commands/ping.py b/idm/commands/ping.py deleted file mode 100644 index 7b8eecb..0000000 --- a/idm/commands/ping.py +++ /dev/null @@ -1,5 +0,0 @@ -from ..objects import dp, Event - -@dp.event_handle(dp.Methods.PING) -def ping(event: Event) -> str: - return "ok" \ No newline at end of file diff --git a/idm/commands/print_bookmark.py b/idm/commands/print_bookmark.py deleted file mode 100644 index 58bce26..0000000 --- a/idm/commands/print_bookmark.py +++ /dev/null @@ -1,9 +0,0 @@ -from .. import utils -from ..objects import dp, Event -from vkapi import VkApiResponseException - -@dp.event_handle(dp.Methods.PRINT_BOOKMARK) -def print_bookmark(event: Event) -> str: - utils.new_message(event.api, event.chat.peer_id, message=event.obj['description'], - reply_to=utils.get_msg_id(event.api, event.chat.peer_id, event.obj['conversation_message_id'])) - return "ok" \ No newline at end of file diff --git a/idm/commands/send_my_signal.py b/idm/commands/send_my_signal.py deleted file mode 100644 index 78491ce..0000000 --- a/idm/commands/send_my_signal.py +++ /dev/null @@ -1,12 +0,0 @@ -from ..objects import dp, Event, MySignalEvent -import typing - -@dp.event_handle(dp.Methods.SEND_MY_SIGNAL) -def send_my_signal(event: Event) -> typing.Union[str, dict]: - - msevent = MySignalEvent(event) - data = [d for d in dp.my_signal_event_run(msevent)] - - for d in data: - if d != "ok":return d - return "ok" \ No newline at end of file diff --git a/idm/commands/send_signal.py b/idm/commands/send_signal.py deleted file mode 100644 index 1697470..0000000 --- a/idm/commands/send_signal.py +++ /dev/null @@ -1,12 +0,0 @@ -from ..objects import dp, Event, SignalEvent -import typing - -@dp.event_handle(dp.Methods.SEND_SIGNAL) -def send_signal(event: Event) -> typing.Union[str, dict]: - - sevent = SignalEvent(event) - data = [d for d in dp.signal_event_run(sevent)] - - for d in data: - if d != "ok":return d - return "ok" \ No newline at end of file diff --git a/idm/commands/signals/__init__.py b/idm/commands/signals/__init__.py deleted file mode 100644 index 82c5e4f..0000000 --- a/idm/commands/signals/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .ping import ping -from .info import sinfo -from .repiat import repiat \ No newline at end of file diff --git a/idm/commands/signals/info.py b/idm/commands/signals/info.py deleted file mode 100644 index 98d26d5..0000000 --- a/idm/commands/signals/info.py +++ /dev/null @@ -1,42 +0,0 @@ -from ...objects import dp, MySignalEvent, SignalEvent -from ...utils import edit_message, new_message -from datetime import datetime -from idm import __version__ -from ..my_signals.auto_friends_add import afa_thread -from ..my_signals.online import online_thread -from threading import Thread - - -@dp.signal_event_handle('инфо', 'инфа', '-i', 'info') -def sinfo(event: SignalEvent) -> str: - - def is_alive(th: Thread) -> bool: - if th == None:return False - if not th.is_alive():return False - return True - - if event.msg['from_id'] not in event.db.trusted_users: - return "ok" - - owner = event.api('users.get', user_ids=event.db.owner_id)[0] - - - message = f"""Информация о дежурном: - IDM v{__version__} - Владелец: [id{owner['id']}|{owner['first_name']} {owner['last_name']}] - Чатов: {len(event.db.chats.keys())} - - Автодобавление в друзья: {'да' if is_alive(afa_thread) else 'нет'} - Вечный онлайн: {'да' if is_alive(online_thread) else 'нет'} - - Панель управления: https://{event.db.host}/ - - Информация о чате: - Я дежурный в чате: {'да' if event.chat.installed else 'нет'} - Iris ID: {event.chat.iris_id} - Peer ID: {event.chat.peer_id} - Имя: {event.chat.name} - - """.replace(' ', '') - new_message(event.api, event.chat.peer_id, message=message) - return "ok" \ No newline at end of file diff --git a/idm/commands/signals/ping.py b/idm/commands/signals/ping.py deleted file mode 100644 index 934c370..0000000 --- a/idm/commands/signals/ping.py +++ /dev/null @@ -1,30 +0,0 @@ -from ...objects import dp, SignalEvent -from ...utils import new_message -from datetime import datetime - -@dp.signal_event_handle('пинг', 'пиу', 'кинг') -def ping(event: SignalEvent) -> str: - - c_time = datetime.now().timestamp() - delta = round(c_time - event.msg['date'], 2) - - c_time_str = str(datetime.fromtimestamp(round(c_time))) - v_time_str = str(datetime.fromtimestamp(round(event.msg['date']))) - - r_type = 'ПОНГ' if event.command == "пинг" else "ПАУ" if event.command == "пиу" else "КОНГ" - - if delta > 15:r_type += "\nТРЕВОГА. ШИНАПРОВОД СГРЫЗЕН!!!!" - elif delta > 10:r_type += "\nТак кто-то конкретно грызет шинапровод." - elif delta > 5:r_type += "\nТак кто-то начинает грызть шинапровод." - else:r_type += "\neee сытый, спасибо, что накормили его." - - - message = f"""{r_type} - - Ответ через: {delta} - Время сервера VK: {v_time_str} - Время сервера IDM: {c_time_str} - """.replace(' ', '') - new_message(event.api, event.chat.peer_id, message=message) - - return "ok" \ No newline at end of file diff --git a/idm/commands/signals/repiat.py b/idm/commands/signals/repiat.py deleted file mode 100644 index 3296740..0000000 --- a/idm/commands/signals/repiat.py +++ /dev/null @@ -1,11 +0,0 @@ -from ...objects import dp, SignalEvent -from ...utils import new_message - -@dp.signal_event_handle('повтори') -def repiat(event: SignalEvent) -> str: - if event.msg['from_id'] not in event.db.trusted_users: - return "ok" - new_message(event.api, event.chat.peer_id, message=event.payload, - attachments=",".join(event.attachments)) - - return "ok" diff --git a/idm/commands/subscribe_signals.py b/idm/commands/subscribe_signals.py deleted file mode 100644 index f4c1eb2..0000000 --- a/idm/commands/subscribe_signals.py +++ /dev/null @@ -1,24 +0,0 @@ -from .. import utils -from ..objects import dp, Event -from vkapi import VkApiResponseException - -@dp.event_handle(dp.Methods.SUBSCRIBE_SIGNALS) -def subscribe_signals(event: Event) -> str: - message = f"""✅ Все отлично. - IDM настроен и готов к работе. - - Iris chat ID: {event.chat.iris_id} - VK peer ID: {event.chat.peer_id} - Панель управления IDM: https://{event.db.host}/ - - Приятного общения :3 - - PS - ВК: https://vk.com/llordrall - GitHub: https://github.com/LordRalInc/IDM - """.replace(" ", "") - - event.db.chats[event.chat.iris_id]['installed'] = True - event.db.save() - utils.new_message(event.api, event.chat.peer_id, message=message) - return "ok" \ No newline at end of file diff --git a/idm/commands/to_group.py b/idm/commands/to_group.py deleted file mode 100644 index 66dec4b..0000000 --- a/idm/commands/to_group.py +++ /dev/null @@ -1,76 +0,0 @@ -import typing -from .. import utils -from ..objects import dp, Event -from vkapi import VkApiResponseException -import re -import requests - -@dp.event_handle(dp.Methods.TO_GROUP) -def to_group(event: Event) -> str: - def parse_attachments(event: Event) -> typing.Tuple[str, typing.List[str]]: - def get_payload(text: str) -> str: - regexp = r"(^[\S]+)|([\S]+)|(\n[\s\S \n]+)" - _args = re.findall(regexp, text) - payload = "" - for arg in _args: - if arg[2] != '': - payload = arg[2][1:] - return payload - - def upload_photo(url: str) -> str: - server = event.api("photos.getWallUploadServer", group_id=event.obj['group_id']) - photo = requests.get(url).content - with open('tmp.jpg', 'wb') as f: - f.write(photo) - - data = requests.post(server['upload_url'], files={'photo':open('tmp.jpg',"rb")}).json() - attach = event.api("photos.saveWallPhoto", group_id=event.obj['group_id'], **data)[0] - - return f"photo{attach['owner_id']}_{attach['id']}_{attach['access_key']}" - - payload = get_payload(event.message['text']) - - attachments = [] - if event.reply_message != None: - if payload == "": - payload = event.reply_message['text'] - message = utils.get_msg(event.api, event.chat.peer_id, event.reply_message['conversation_message_id']) - for attachment in message.get('attachments', []): - - a_type = attachment['type'] - - if a_type in ['link']:continue - - if a_type == 'photo': - attachments.append(upload_photo( - attachment['photo']['sizes'][len(attachment['photo']['sizes']) - 1]['url'] - )) - else: - attachments.append( - f"{a_type}{attachment[a_type]['owner_id']}_{attachment[a_type]['id']}_{attachment[a_type]['access_key']}" - ) - - attachments.extend(event.attachments) - return payload, attachments - - text, attachments = parse_attachments(event) - - try: - data = event.api('wall.post', owner_id=(-1) * event.obj['group_id'], from_group=1, message=text, - attachments=",".join(attachments)) - - utils.new_message(event.api, event.chat.peer_id, message="✅ Запись опубликованна", - attachment=f"wall-{event.obj['group_id']}_{data['post_id']}") - except VkApiResponseException as e: - if e.error_code == 214: - utils.new_message(event.api, event.chat.peer_id, message="❗ Ошибка при публикации. Публикация запрещена. Превышен лимит на число публикаций в сутки, либо на указанное время уже запланирована другая запись, либо для текущего пользователя недоступно размещение записи на этой стене.") - elif e.error_code == 220: - utils.new_message(event.api, event.chat.peer_id, message="❗ Ошибка при публикации. Слишком много получателей.") - elif e.error_code == 222: - utils.new_message(event.api, event.chat.peer_id, message="❗ Ошибка при публикации.Запрещено размещать ссылки.") - else: - utils.new_message(event.api, event.chat.peer_id, message=f"❗ Ошибка при публикации. Ошибка VK: {e.error_msg}.") - except: - utils.new_message(event.api, event.chat.peer_id, message=f"❗ Ошибка при публикации. Неизвестная ошибка.") - - return "ok" \ No newline at end of file diff --git a/idm/objects/__init__.py b/idm/objects/__init__.py deleted file mode 100644 index ad9f87b..0000000 --- a/idm/objects/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .database import DB -from .methods import Methods - -from .events import * -from .handlers import * -from .dispatcher import Dispatcher, dp \ No newline at end of file diff --git a/idm/objects/database.py b/idm/objects/database.py deleted file mode 100644 index d36fb4d..0000000 --- a/idm/objects/database.py +++ /dev/null @@ -1,69 +0,0 @@ -import typing -import os -import json -import logging - -logger = logging.getLogger(__name__) - - -class DB: - path: str - - access_token: str - online_token: str - me_token: str - bp_token: str - secret: str - chats: str - trusted_users: list - owner_id: int - duty_id: int - vk_app_id: int - vk_app_secret: str - templates: typing.List[dict] - dynamic_templates: list - - host: str - installed: bool - - def __init__(self): - get_dir = os.path.dirname - self.path = os.path.join(get_dir(get_dir(get_dir(__file__))), 'database.json') - self.read() - self.update() - - def update(self): - self.__dict__.setdefault("dynamic_templates", []) - self.save() - - def read(self): - logger.debug("Читаю базу данных") - with open(self.path, "r", encoding="utf-8") as file: - self.__dict__.update( - json.loads(file.read())) - - - @property - def raw(self) -> dict: - return { - "access_token": self.access_token, - "online_token": self.online_token, - "me_token": self.me_token, - "bp_token": self.me_token, - "secret": self.secret, - "chats": self.chats, - "trusted_users": self.trusted_users, - "owner_id": self.owner_id, - "duty_id": self.duty_id, - "vk_app_id": self.vk_app_id, - "vk_app_secret": self.vk_app_secret, - "templates": self.templates, - "dynamic_templates":self.dynamic_templates, - "host": self.host, - "installed": self.installed - } - - def save(self) -> int: - logger.debug("Сохраняю базу данных") - with open(self.path, "w", encoding="utf-8") as file: - file.write(json.dumps(self.raw, ensure_ascii=False, indent=4)) \ No newline at end of file diff --git a/idm/objects/dispatcher.py b/idm/objects/dispatcher.py deleted file mode 100644 index 675ce91..0000000 --- a/idm/objects/dispatcher.py +++ /dev/null @@ -1,73 +0,0 @@ -import typing -from . import Methods, Handler, SignalHandler, MySignalHandler, \ - Event, SignalEvent, MySignalEvent - -import logging - -logger = logging.getLogger(__name__) - - - -class Dispatcher: - Methods: Methods - - event_handlers: typing.List[Handler] - signal_event_handlers: typing.List[SignalHandler] - my_signal_event_handlers: typing.List[MySignalHandler] - - def __init__(self): - self.Methods = Methods - - self.event_handlers = [] - self.signal_event_handlers = [] - self.my_signal_event_handlers = [] - - def event_register(self, method: typing.Union[Methods, str], f: typing.Callable): - logger.debug(f'Зарегистрирован новый ивент для метода {method.value}') - self.event_handlers.append(Handler(method, f)) - - def event_handle(self, method: typing.Union[Methods, str]) -> typing.WrapperDescriptorType: - def decorator(f: typing.Callable): - self.event_register(method, f) - return decorator - - def event_run(self, event: Event) -> typing.Iterable[typing.Union[str, dict]]: - for handler in self.event_handlers: - if handler.method == event.method: - yield handler(event) - - - def signal_event_register(self, commands: typing.List[str], f: typing.Callable): - logger.debug(f'Зарегистрирован новый ивент для сигналов к дежурному. Команды {commands}') - self.signal_event_handlers.append(SignalHandler(commands, f)) - - def signal_event_handle(self, *args: typing.Tuple[str]) -> typing.WrapperDescriptorType: - def decorator(f: typing.Callable): - self.signal_event_register(list(args), f) - return decorator - - def signal_event_run(self, event: SignalEvent) -> typing.Iterable[typing.Union[str, dict]]: - logger.info(f'Обрабатываю ивент {event.method.value}. Команда: {event.command}') - for handler in self.signal_event_handlers: - if event.command.lower() in handler.commands: - yield handler(event) - - - def my_signal_event_register(self, commands: typing.List[str], f: typing.Callable): - logger.debug(f'Зарегистрирован новый ивент для сигналов к приемнику. Команды {commands}') - self.my_signal_event_handlers.append(MySignalHandler(commands, f)) - - def my_signal_event_handle(self, *args: typing.Tuple[str]) -> typing.WrapperDescriptorType: - def decorator(f: typing.Callable): - self.my_signal_event_register(list(args), f) - return decorator - - def my_signal_event_run(self, event: MySignalEvent) -> typing.Iterable[typing.Union[str, dict]]: - logger.info(f'Обрабатываю ивент {event.method.value}. Команда: {event.command}') - for handler in self.my_signal_event_handlers: - if event.command.lower() in handler.commands: - yield handler(event) - - -dp = Dispatcher() - \ No newline at end of file diff --git a/idm/objects/events.py b/idm/objects/events.py deleted file mode 100644 index d9790a4..0000000 --- a/idm/objects/events.py +++ /dev/null @@ -1,254 +0,0 @@ -import json -import re - -from flask import Request - -from vkapi import VkApi - -from .. import utils -from . import DB, Methods - -import logging -logger = logging.getLogger(__name__) - - -class Chat: - id: int - peer_id: int - iris_id: str - name: str - - def __init__(self, data: dict, iris_id: str, installed: bool): - self.peer_id = data.get('peer_id', 0) - self.id = self.peer_id - 2000000000 - self.name = data.get('name', '') - self.iris_id = iris_id - self.installed = data.get('installed', False) - - -class Event: - db: DB - method: Methods - - api: VkApi - - msg: dict - message: dict - - obj: dict - object: dict - - user_id: str - secret: str - chat: Chat - attachments: list - reply_message: dict - - def set_msg(self): - self.message = self.msg = utils.get_msg( - self.api, self.chat.peer_id, self.msg['conversation_message_id']) - self.parse_attachments() - self.reply_message = self.msg.get("reply_message", None) - - def set_chat(self): - if 'chat' not in self.obj.keys(): - return - if self.obj['chat'] in self.db.chats.keys(): - self.chat = Chat( - self.db.chats[self.obj['chat']], self.obj['chat'], self.obj['chat']) - if self.msg != (None, {}): - self.set_msg() - return - - if self.msg not in [None, {}]: - chats = self.api("messages.getConversations", - count=100, filter="all") - for item in chats['items']: - conver = item['conversation'] - if conver['peer']['type'] == "chat": - message = utils.get_msg( - self.api, conver['peer']['id'], self.msg['conversation_message_id']) - if message == None: - continue - if message['from_id'] == self.msg['from_id'] and message['date'] == self.msg['date']: - self.db.chats.update( - { - self.obj['chat']: { - "peer_id": conver['peer']['id'], - "name": conver['chat_settings']['title'], - "installed": False - } - } - ) - self.db.save() - self.set_msg() - break - return - self.chat = None - - def __init__(self, request: Request, data_: dict=None): - - if request != None and request.data == b'': - self.user_id = None - self.message = self.msg = None - self.object = self.obj = None - self.secret = None - self.method = Methods.PING - else: - if data_ == None: - _data = json.loads(request.data) - else: - _data = data_ - self.user_id = _data.get('user_id', None) - self.secret = _data.get('secret', None) - self.object = self.obj = _data.get('object', {}) - self.message = self.msg = _data.get('message', {}) - - self.db = DB() - self.api = VkApi(self.db.access_token, raise_excepts=True) - self.method = Methods(_data.get('method', 'ping')) - self.attachments = [] - - if self.method in [Methods.BIND_CHAT, Methods.SEND_SIGNAL, Methods.SEND_MY_SIGNAL, Methods.SUBSCRIBE_SIGNALS, Methods.TO_GROUP]: - self.set_chat() - elif self.method == Methods.PING: - pass - else: - self.chat = Chat( - self.db.chats[self.obj['chat']], self.obj['chat'], self.obj['chat']) - - self.message = self.msg = None - self.reply_message = None - - - logger.info(self.__str__().replace('\n', ' ')) - - def parse_attachments(self): - for attachment in self.msg.get('attachments', []): - a_type = attachment['type'] - if a_type in ['link']: - continue - self.attachments.append( - f"{a_type}{attachment[a_type]['owner_id']}_{attachment[a_type]['id']}_{attachment[a_type]['access_key']}" - ) - - def __str__(self) -> str: - return f"""Новое событие от Iris callback API - Метод: {self.method} - Пользователь: {self.user_id} - Данные: {json.dumps(self.object, ensure_ascii=False)} - Сообщение: {json.dumps(self.message, ensure_ascii=False)} - """.replace(" ", "") - - -class SignalEvent(Event): - message: dict - msg: dict - chat: Chat - - command: str - args: list - payload: str - - reply_message: dict - - def __str__(self) -> str: - return f"""Новое событие от Iris callback API - Метод: {self.method} - Команда: {self.command} - Агрументы: {self.args} - Пользователь: {self.user_id} - Данные: {json.dumps(self.object, ensure_ascii=False)} - Сообщение: {json.dumps(self.message, ensure_ascii=False)} - """.replace(" ", "") - - def parse(self): - regexp = r"(^[\S]+)|([\S]+)|(\n[\s\S \n]+)" - _args = re.findall(regexp, self.message['text']) - args = [] - payload = "" - - for arg in _args: - if arg[1] != '': - args.append(arg[1]) - if arg[2] != '': - payload = arg[2][1:] - - if len(args) == 1: - self.command = args[0].lower() - self.args = None - else: - self.command = args[0].lower() - self.args = args[1:] - - self.payload = payload - - def __init__(self, event: Event): - self.event = event - self.api = event.api - self.db = event.db - self.method = event.method - self.obj = event.obj - self.object = event.object - self.user_id = event.user_id - self.secret = event.secret - self.attachments = event.attachments - self.chat = event.chat - self.message = event.message - self.msg = event.msg - self.reply_message = event.reply_message - - self.parse() - logger.debug(self.__str__().replace('\n', ' ')) - - -class MySignalEvent(Event): - - message: dict - msg: dict - chat: Chat - - command: str - args: list - payload: str - - reply_message: dict - - def __init__(self, event: Event): - self.event = event - self.api = event.api - self.db = event.db - self.method = event.method - self.obj = event.obj - self.object = event.object - self.user_id = event.user_id - self.secret = event.secret - self.attachments = event.attachments - self.chat = event.chat - self.message = event.message - self.msg = event.msg - self.reply_message = event.reply_message - - self.parse() - logger.debug(self.__str__().replace('\n', ' ')) - - def parse(self): - regexp = r"(^[\S]+)|([\S]+)|(\n[\s\S \n]+)" - _args = re.findall(regexp, self.message['text']) - args = [] - payload = "" - - for arg in _args: - if arg[1] != '': - args.append(arg[1]) - if arg[2] != '': - payload = arg[2][1:] - - if len(args) == 1: - self.command = args[0].lower() - self.args = None - else: - self.command = args[0].lower() - self.args = args[1:] - - self.payload = payload diff --git a/idm/objects/handlers.py b/idm/objects/handlers.py deleted file mode 100644 index 06168a6..0000000 --- a/idm/objects/handlers.py +++ /dev/null @@ -1,123 +0,0 @@ -import typing -from . import Methods, Event, SignalEvent, MySignalEvent -import logging -from vkapi import VkApiResponseException -import traceback - -logger = logging.getLogger(__name__) - - -class Handler: - method: Methods - f: typing.Callable - - def __init__(self, method: typing.Union[Methods, str], f: typing.Callable): - self.method = Methods(method) - self.f = f - - def __call__(self, event: Event) -> typing.Union[str, dict]: - logger.info(f"Выполнение команды {self.method.value}; F:{self.f.__name__}") - try: - return self.f(event) - except VkApiResponseException as e: - data = { - "тип":"vk_api", - "код_ошибки":e.error_code, - "сообщение":e.error_msg, - "параметры":e.request_params, - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - except Exception as e: - data = { - "тип":e.__class__.__name__, - "ошибка":f"{e}", - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - except: - data = { - "тип":"неизвесный", - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - -class SignalHandler: - commands: typing.List[str] - f: typing.Callable - - def __init__(self, commands: typing.List[str], f: typing.Callable): - self.commands = commands - self.f = f - - def __call__(self, event: SignalEvent): - try: - logger.info(f"Выполнение команды {event.command}; F:{self.f.__name__}") - return self.f(event) - except VkApiResponseException as e: - data = { - "тип":"vk_api", - "код_ошибки":e.error_code, - "сообщение":e.error_msg, - "параметры":e.request_params, - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - except Exception as e: - data = { - "тип":e.__class__.__name__, - "ошибка":f"{e}", - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - except: - data = { - "тип":"неизвесный", - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - - -class MySignalHandler: - commands: typing.List[str] - f: typing.Callable - - def __init__(self, commands: typing.List[str], f: typing.Callable): - self.commands = commands - self.f = f - - def __call__(self, event: MySignalEvent): - try: - logger.info(f"Выполнение команды {event.command}; F:{self.f.__name__}") - return self.f(event) - except VkApiResponseException as e: - data = { - "тип":"vk_api", - "код_ошибки":e.error_code, - "сообщение":e.error_msg, - "параметры":e.request_params, - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - except Exception as e: - data = { - "тип":e.__class__.__name__, - "ошибка":f"{e}", - "traceback":traceback.format_exc() - } - logger.exception(data) - return data - except: - data = { - "тип":"неизвесный", - "traceback":traceback.format_exc() - } - logger.exception(data) - return data \ No newline at end of file diff --git a/idm/objects/methods.py b/idm/objects/methods.py deleted file mode 100644 index c11a8f9..0000000 --- a/idm/objects/methods.py +++ /dev/null @@ -1,18 +0,0 @@ -from enum import Enum - -class Methods(Enum): - PING = "ping" - ADD_USER = "addUser" - BAN_EXPIRED = "banExpired" - SUBSCRIBE_SIGNALS = "subscribeSignals" - DELETE_MESSAGES = "deleteMessages" - DELETE_MESSAGES_FROM_USER = "deleteMessagesFromUser" - IGNORE_MESSAGES = "ignoreMessages" - PRINT_BOOKMARK = "printBookmark" - FORBIDDEN_LINKS = "forbiddenLinks" - SEND_SIGNAL = "sendSignal" - SEND_MY_SIGNAL = "sendMySignal" - HERE_API = "hireApi" - BAN_GET_REASON = "banGetReason" - TO_GROUP = "toGroup" - BIND_CHAT = "bindChat" \ No newline at end of file diff --git a/idm/routes.py b/idm/routes.py deleted file mode 100644 index 02f7bb3..0000000 --- a/idm/routes.py +++ /dev/null @@ -1,151 +0,0 @@ -from flask import Flask, redirect, request, render_template -from .objects import Event, dp, DB -import typing -from vkapi import VkApi, VkApiResponseException -from hashlib import md5 -import traceback - -import json - -app = Flask(__name__) - -@app.route('/') -def index(): - db = DB() - return render_template('pages/index.html', installed=db.installed) - -@app.route('/install') -def install(): - db = DB() - return render_template('pages/install.html', installed=db.installed) - -@app.route('/api/', methods=["POST"]) -def api(method: str): - - db = DB() - - if method == "setup_idm": - if db.installed: return redirect('/') - local_db = DB() - local_db.owner_id = int(request.form.get('owner_id', None)) - local_db.secret = request.form.get('secret', None) - local_db.access_token = request.form.get('access_token', None) - - local_db.online_token = request.form.get('online_token', None) if request.form.get('online_token', None) != '' else None - local_db.me_token = request.form.get('me_token', None) if request.form.get('me_token', None) != '' else None - local_db.bp_token = request.form.get('bp_token', None) if request.form.get('bp_token', None) != '' else None - - local_db.vk_app_id = int(request.form.get('vk_app_id', None)) - local_db.vk_app_secret = request.form.get('vk_app_secret', None) - local_db.host = request.form.get('host', None) - local_db.installed = True - local_db.trusted_users.append(local_db.owner_id) - local_db.duty_id = VkApi(local_db.access_token)('users.get')[0]['id'] - local_db.trusted_users.append(local_db.duty_id) - - - db = local_db - db.save() - return redirect('/login?next=/') - - if method == "edit_bot": - - if request.form.get('uid', None) == None: - return redirect('/login?next=/admin') - uid = int(request.form.get('uid', None)) - token = request.form.get('token', None) - if uid != db.owner_id and uid != db.duty_id: - return redirect('/') - if md5(f"{db.vk_app_id}{uid}{db.vk_app_secret}".encode()).hexdigest() != token: - return redirect('/login?next=/admin') - - db.secret = request.form.get('secret', None) - - access_token = request.form.get('access_token', None) - online_token = request.form.get('online_token', None) - bp_token = request.form.get('bp_token', None) - me_token = request.form.get('me_token', None) - - if access_token != None and access_token != '' and '*' not in access_token: - db.access_token = access_token - if online_token != None and online_token != '' and '*' not in online_token: - db.online_token = online_token - if bp_token != None and bp_token != '' and '*' not in bp_token: - db.bp_token = bp_token - if me_token != None and me_token != '' and '*' not in me_token: - db.me_token = me_token - db.save() - return redirect('/admin') - - if method == "reset": - secret = request.form.get('secret', None) - if secret == db.secret: - db.installed = False - db.chats = {} - db.trusted_users = [] - db.owner_id = 0 - db.duty_id = 0 - db.vk_app_id = 0 - db.vk_app_secret = "" - db.host = "" - db.secret = "" - db.access_token = None - db.online_token = None - db.me_token = None - db.bp_token = None - db.save() - return redirect('/') - - return "ok" - -@app.route('/admin') -def admin(): - def get_musk(token:str) -> str: - if token == None or len(token) != 85:return "" - return token[:4] + "*" * 77 + token[81:] - - - db = DB() - uid = request.cookies.get('uid', 0) - token = request.cookies.get('token', None) - if not db.installed: - return redirect('/install') - if request.cookies.get('uid', None) == None: - return redirect('/login?next=/admin') - if int(request.cookies.get('uid', 0)) != db.owner_id and int(request.cookies.get('uid', 0)) != db.duty_id: - return redirect('/') - if md5(f"{db.vk_app_id}{uid}{db.vk_app_secret}".encode()).hexdigest() != token: - return redirect('/login?next=/admin') - - local_db = db - - local_db.access_token = get_musk(db.access_token) - local_db.me_token = get_musk(db.me_token) - local_db.online_token = get_musk(db.online_token) - local_db.bp_token = get_musk(db.bp_token) - - return render_template('pages/admin.html', db=local_db.raw) - -@app.route('/login') -def login(): - db = DB() - return render_template('pages/login.html', vk_app_id=db.vk_app_id) - -@app.route('/callback', methods=["POST"]) -def callback(): - event = Event(request) - if event.db.secret != event.secret: - return "Неверный секретный код" - if event.user_id != event.db.duty_id: - return "Неверный ID дежурного" - data = [d for d in dp.event_run(event)] - for d in data: - if d != "ok": - return "<ошибочка>" + json.dumps({"ошибка":d}, ensure_ascii=False, indent=2) - return "ok" - - -@app.errorhandler(Exception) -def on_error(e): - return "<ошибочка>" + json.dumps({"тип":"неизвесный (on_error)", "ошибка":f"{e}"}, ensure_ascii=False, indent=2) - \ No newline at end of file diff --git a/idm/static/css/style.css b/idm/static/css/style.css deleted file mode 100644 index f59e347..0000000 --- a/idm/static/css/style.css +++ /dev/null @@ -1,73 +0,0 @@ -html * { - font-family: 'Noto Sans', sans-serif !important; -} -.nav-bar-img { - width: 32px; - height: 32px; - -moz-border-radius: 25px; /* закругление для старых Mozilla Firefox */ - -webkit-border-radius: 25px; /* закругл. для старых Chrome и Safari */ - -khtml-border-radius: 25px; /* закругл. для браузера Konquerer системы Linux */ - border-radius: 25px; /* закругление углов для всех, кто понимает */ -} - -.hidden { - display: none; -} - -.contact-icon { - height: 50px; - width: 50px; -} - -.nav-bar-link { - color: #c2c2c2; -} -.nav-bar-link :hover { - color: #fff; -} - -html, -body { - height: 100%; - overflow-x: hidden; -} - -.divider{ - margin-top: 1%; -} - -#page-content { - flex: 1 0 auto; - } - -#sticky-footer { - flex-shrink: none; - margin: 0 0 0 0 !important; - padding: 1% 0 1% 0 !important; -} -.nav-bar-dropdown-itendent { - margin-right: 10%; -} - -.terminal { - height: 700px; - background: #1a1d20; - color: #fff; -} - -.center { - margin: 0 auto; - float: none; -} - -.grecaptcha-badge { - visibility: hidden; -} - -table { - width: 100%; -} - -.page-verefid { - background: url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23666%22%20d%3D%22M5.09540485%2C12.9695708%20L3.9747705%2C13.149624%20C3.63753946%2C13.2038072%203.30857566%2C13.0138798%203.18688414%2C12.6947376%20L2.78249761%2C11.6342132%20C2.70931223%2C11.4422808%202.55771921%2C11.2906878%202.36578681%2C11.2175024%20L1.3052624%2C10.8131159%20C0.986120165%2C10.6914243%200.796192829%2C10.3624605%200.850376002%2C10.0252295%20L1.03042919%2C8.90459515%20C1.06301499%2C8.70178413%201.0075281%2C8.49470421%200.877902454%2C8.33535762%20L0.161654645%2C7.4548864%20C-0.0538848818%2C7.18992734%20-0.0538848818%2C6.81007266%200.161654645%2C6.5451136%20L0.877902454%2C5.66464238%20C1.0075281%2C5.50529579%201.06301499%2C5.29821587%201.03042919%2C5.09540485%20L0.850376002%2C3.9747705%20C0.796192829%2C3.63753946%200.986120165%2C3.30857566%201.3052624%2C3.18688414%20L2.36578681%2C2.78249761%20C2.55771921%2C2.70931223%202.70931223%2C2.55771921%202.78249761%2C2.36578681%20L3.18688414%2C1.3052624%20C3.30857566%2C0.986120165%203.63753946%2C0.796192829%203.9747705%2C0.850376002%20L5.09540485%2C1.03042919%20C5.29821587%2C1.06301499%205.50529579%2C1.0075281%205.66464238%2C0.877902454%20L6.5451136%2C0.161654645%20C6.81007266%2C-0.0538848818%207.18992734%2C-0.0538848818%207.4548864%2C0.161654645%20L8.33535762%2C0.877902454%20C8.49470421%2C1.0075281%208.70178413%2C1.06301499%208.90459515%2C1.03042919%20L10.0252295%2C0.850376002%20C10.3624605%2C0.796192829%2010.6914243%2C0.986120165%2010.8131159%2C1.3052624%20L11.2175024%2C2.36578681%20C11.2906878%2C2.55771921%2011.4422808%2C2.70931223%2011.6342132%2C2.78249761%20L12.6947376%2C3.18688414%20C13.0138798%2C3.30857566%2013.2038072%2C3.63753946%2013.149624%2C3.9747705%20L12.9695708%2C5.09540485%20C12.936985%2C5.29821587%2012.9924719%2C5.50529579%2013.1220975%2C5.66464238%20L13.8383454%2C6.5451136%20C14.0538849%2C6.81007266%2014.0538849%2C7.18992734%2013.8383454%2C7.4548864%20L13.1220975%2C8.33535762%20C12.9924719%2C8.49470421%2012.936985%2C8.70178413%2012.9695708%2C8.90459515%20L13.149624%2C10.0252295%20C13.2038072%2C10.3624605%2013.0138798%2C10.6914243%2012.6947376%2C10.8131159%20L11.6342132%2C11.2175024%20C11.4422808%2C11.2906878%2011.2906878%2C11.4422808%2011.2175024%2C11.6342132%20L10.8131159%2C12.6947376%20C10.6914243%2C13.0138798%2010.3624605%2C13.2038072%2010.0252295%2C13.149624%20L8.90459515%2C12.9695708%20C8.70178413%2C12.936985%208.49470421%2C12.9924719%208.33535762%2C13.1220975%20L7.4548864%2C13.8383454%20C7.18992734%2C14.0538849%206.81007266%2C14.0538849%206.5451136%2C13.8383454%20L5.66464238%2C13.1220975%20C5.50529579%2C12.9924719%205.29821587%2C12.936985%205.09540485%2C12.9695708%20L5.09540485%2C12.9695708%20Z%22%2F%3E%0A%20%20%20%20%3Cpolyline%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%221.5%22%20points%3D%224.25%207.25%206%209%209.75%205.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E) no-repeat 0!important; -} \ No newline at end of file diff --git a/idm/static/css/theme.css b/idm/static/css/theme.css deleted file mode 100644 index 232221f..0000000 --- a/idm/static/css/theme.css +++ /dev/null @@ -1,7569 +0,0 @@ -/*! - * Bootstrap v4.3.1 (https://getbootstrap.com/) - * Copyright 2011-2019 The Bootstrap Authors - * Copyright 2011-2019 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -:root { - --blue: #007bff; - --indigo: #6610f2; - --purple: #6f42c1; - --pink: #e83e8c; - --red: #dc3545; - --orange: #fd7e14; - --yellow: #ffc107; - --green: #28a745; - --teal: #20c997; - --cyan: #17a2b8; - --white: #fff; - --gray: #6c757d; - --gray-dark: #343a40; - --primary: #12bbad; - --secondary: #4f70ce; - --success: #28a745; - --info: #ccc; - --warning: #ffc107; - --danger: #dc3545; - --light: #f3f3f3; - --dark: #151515; - --breakpoint-xs: 0; - --breakpoint-sm: 576px; - --breakpoint-md: 768px; - --breakpoint-lg: 992px; - --breakpoint-xl: 1200px; - --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } - -*, -*::before, -*::after { - box-sizing: border-box; } - -html { - font-family: sans-serif; - line-height: 1.15; - -webkit-text-size-adjust: 100%; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } - -article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { - display: block; } - -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-size: 1rem; - font-weight: 200; - line-height: 1.5; - color: #333; - text-align: left; - background-color: white; } - -[tabindex="-1"]:focus { - outline: 0 !important; } - -hr { - box-sizing: content-box; - height: 0; - overflow: visible; } - -h1, h2, h3, h4, h5, h6 { - margin-top: 0; - margin-bottom: 0.75rem; } - -p { - margin-top: 0; - margin-bottom: 1rem; } - -abbr[title], -abbr[data-original-title] { - text-decoration: underline; - text-decoration: underline dotted; - cursor: help; - border-bottom: 0; - text-decoration-skip-ink: none; } - -address { - margin-bottom: 1rem; - font-style: normal; - line-height: inherit; } - -ol, -ul, -dl { - margin-top: 0; - margin-bottom: 1rem; } - -ol ol, -ul ul, -ol ul, -ul ol { - margin-bottom: 0; } - -dt { - font-weight: 700; } - -dd { - margin-bottom: .5rem; - margin-left: 0; } - -blockquote { - margin: 0 0 1rem; } - -b, -strong { - font-weight: bolder; } - -small { - font-size: 80%; } - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; } - -sub { - bottom: -.25em; } - -sup { - top: -.5em; } - -a { - color: #12bbad; - text-decoration: none; - background-color: transparent; } - a:hover { - color: #0b756c; - text-decoration: underline; } - -a:not([href]):not([tabindex]) { - color: inherit; - text-decoration: none; } - a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { - color: inherit; - text-decoration: none; } - a:not([href]):not([tabindex]):focus { - outline: 0; } - -pre, -code, -kbd, -samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - font-size: 1em; } - -pre { - margin-top: 0; - margin-bottom: 1rem; - overflow: auto; } - -figure { - margin: 0 0 1rem; } - -img { - vertical-align: middle; - border-style: none; } - -svg { - overflow: hidden; - vertical-align: middle; } - -table { - border-collapse: collapse; } - -caption { - padding-top: 0.75rem; - padding-bottom: 0.75rem; - color: #6c757d; - text-align: left; - caption-side: bottom; } - -th { - text-align: inherit; } - -label { - display: inline-block; - margin-bottom: 0.5rem; } - -button { - border-radius: 0; } - -button:focus { - outline: 1px dotted; - outline: 5px auto -webkit-focus-ring-color; } - -input, -button, -select, -optgroup, -textarea { - margin: 0; - font-family: inherit; - font-size: inherit; - line-height: inherit; } - -button, -input { - overflow: visible; } - -button, -select { - text-transform: none; } - -select { - word-wrap: normal; } - -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; } - -button:not(:disabled), -[type="button"]:not(:disabled), -[type="reset"]:not(:disabled), -[type="submit"]:not(:disabled) { - cursor: pointer; } - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - padding: 0; - border-style: none; } - -input[type="radio"], -input[type="checkbox"] { - box-sizing: border-box; - padding: 0; } - -input[type="date"], -input[type="time"], -input[type="datetime-local"], -input[type="month"] { - -webkit-appearance: listbox; } - -textarea { - overflow: auto; - resize: vertical; } - -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; } - -legend { - display: block; - width: 100%; - max-width: 100%; - padding: 0; - margin-bottom: .5rem; - font-size: 1.5rem; - line-height: inherit; - color: inherit; - white-space: normal; } - -progress { - vertical-align: baseline; } - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; } - -[type="search"] { - outline-offset: -2px; - -webkit-appearance: none; } - -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; } - -::-webkit-file-upload-button { - font: inherit; - -webkit-appearance: button; } - -output { - display: inline-block; } - -summary { - display: list-item; - cursor: pointer; } - -template { - display: none; } - -[hidden] { - display: none !important; } - -h1, h2, h3, h4, h5, h6, -.h1, .h2, .h3, .h4, .h5, .h6 { - margin-bottom: 0.75rem; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-weight: 200; - line-height: 1.2; } - -h1, .h1 { - font-size: 2.5rem; } - -h2, .h2 { - font-size: 2rem; } - -h3, .h3 { - font-size: 1.75rem; } - -h4, .h4 { - font-size: 1.5rem; } - -h5, .h5 { - font-size: 1.25rem; } - -h6, .h6 { - font-size: 1rem; } - -.lead { - font-size: 1.3rem; - font-weight: 300; } - -.display-1 { - font-size: 6rem; - font-weight: 300; - line-height: 1.2; } - -.display-2 { - font-size: 5.5rem; - font-weight: 300; - line-height: 1.2; } - -.display-3 { - font-size: 4.5rem; - font-weight: 300; - line-height: 1.2; } - -.display-4 { - font-size: 3.5rem; - font-weight: 300; - line-height: 1.2; } - -hr { - margin-top: 1.5rem; - margin-bottom: 1.5rem; - border: 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); } - -small, -.small { - font-size: 80%; - font-weight: 200; } - -mark, -.mark { - padding: 0.2em; - background-color: #fcf8e3; } - -.list-unstyled { - padding-left: 0; - list-style: none; } - -.list-inline { - padding-left: 0; - list-style: none; } - -.list-inline-item { - display: inline-block; } - .list-inline-item:not(:last-child) { - margin-right: 0.5rem; } - -.initialism { - font-size: 90%; - text-transform: uppercase; } - -.blockquote { - margin-bottom: 1.5rem; - font-size: 1.25rem; } - -.blockquote-footer { - display: block; - font-size: 80%; - color: #6c757d; } - .blockquote-footer::before { - content: "\2014\00A0"; } - -.img-fluid { - max-width: 100%; - height: auto; } - -.img-thumbnail { - padding: 0.25rem; - background-color: white; - border: 1px solid #dee2e6; - border-radius: 0.25rem; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); - max-width: 100%; - height: auto; } - -.figure { - display: inline-block; } - -.figure-img { - margin-bottom: 0.75rem; - line-height: 1; } - -.figure-caption { - font-size: 90%; - color: #6c757d; } - -code { - font-size: 87.5%; - color: #e83e8c; - word-break: break-word; } - a > code { - color: inherit; } - -kbd { - padding: 0.2rem 0.4rem; - font-size: 87.5%; - color: #fff; - background-color: #212529; - border-radius: 0.2rem; - box-shadow: inset 0 -0.1rem 0 rgba(0, 0, 0, 0.25); } - kbd kbd { - padding: 0; - font-size: 100%; - font-weight: 700; - box-shadow: none; } - -pre { - display: block; - font-size: 87.5%; - color: #212529; } - pre code { - font-size: inherit; - color: inherit; - word-break: normal; } - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; } - -.container { - width: 100%; - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; } - @media (min-width: 576px) { - .container { - max-width: 540px; } } - @media (min-width: 768px) { - .container { - max-width: 720px; } } - @media (min-width: 992px) { - .container { - max-width: 960px; } } - @media (min-width: 1200px) { - .container { - max-width: 1140px; } } - -.container-fluid { - width: 100%; - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; } - -.row { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -15px; - margin-left: -15px; } - -.no-gutters { - margin-right: 0; - margin-left: 0; } - .no-gutters > .col, - .no-gutters > [class*="col-"] { - padding-right: 0; - padding-left: 0; } - -.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col, -.col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm, -.col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md, -.col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg, -.col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl, -.col-xl-auto { - position: relative; - width: 100%; - padding-right: 15px; - padding-left: 15px; } - -.col { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - max-width: 100%; } - -.col-auto { - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: auto; - max-width: 100%; } - -.col-1 { - -ms-flex: 0 0 8.33333%; - flex: 0 0 8.33333%; - max-width: 8.33333%; } - -.col-2 { - -ms-flex: 0 0 16.66667%; - flex: 0 0 16.66667%; - max-width: 16.66667%; } - -.col-3 { - -ms-flex: 0 0 25%; - flex: 0 0 25%; - max-width: 25%; } - -.col-4 { - -ms-flex: 0 0 33.33333%; - flex: 0 0 33.33333%; - max-width: 33.33333%; } - -.col-5 { - -ms-flex: 0 0 41.66667%; - flex: 0 0 41.66667%; - max-width: 41.66667%; } - -.col-6 { - -ms-flex: 0 0 50%; - flex: 0 0 50%; - max-width: 50%; } - -.col-7 { - -ms-flex: 0 0 58.33333%; - flex: 0 0 58.33333%; - max-width: 58.33333%; } - -.col-8 { - -ms-flex: 0 0 66.66667%; - flex: 0 0 66.66667%; - max-width: 66.66667%; } - -.col-9 { - -ms-flex: 0 0 75%; - flex: 0 0 75%; - max-width: 75%; } - -.col-10 { - -ms-flex: 0 0 83.33333%; - flex: 0 0 83.33333%; - max-width: 83.33333%; } - -.col-11 { - -ms-flex: 0 0 91.66667%; - flex: 0 0 91.66667%; - max-width: 91.66667%; } - -.col-12 { - -ms-flex: 0 0 100%; - flex: 0 0 100%; - max-width: 100%; } - -.order-first { - -ms-flex-order: -1; - order: -1; } - -.order-last { - -ms-flex-order: 13; - order: 13; } - -.order-0 { - -ms-flex-order: 0; - order: 0; } - -.order-1 { - -ms-flex-order: 1; - order: 1; } - -.order-2 { - -ms-flex-order: 2; - order: 2; } - -.order-3 { - -ms-flex-order: 3; - order: 3; } - -.order-4 { - -ms-flex-order: 4; - order: 4; } - -.order-5 { - -ms-flex-order: 5; - order: 5; } - -.order-6 { - -ms-flex-order: 6; - order: 6; } - -.order-7 { - -ms-flex-order: 7; - order: 7; } - -.order-8 { - -ms-flex-order: 8; - order: 8; } - -.order-9 { - -ms-flex-order: 9; - order: 9; } - -.order-10 { - -ms-flex-order: 10; - order: 10; } - -.order-11 { - -ms-flex-order: 11; - order: 11; } - -.order-12 { - -ms-flex-order: 12; - order: 12; } - -.offset-1 { - margin-left: 8.33333%; } - -.offset-2 { - margin-left: 16.66667%; } - -.offset-3 { - margin-left: 25%; } - -.offset-4 { - margin-left: 33.33333%; } - -.offset-5 { - margin-left: 41.66667%; } - -.offset-6 { - margin-left: 50%; } - -.offset-7 { - margin-left: 58.33333%; } - -.offset-8 { - margin-left: 66.66667%; } - -.offset-9 { - margin-left: 75%; } - -.offset-10 { - margin-left: 83.33333%; } - -.offset-11 { - margin-left: 91.66667%; } - -@media (min-width: 576px) { - .col-sm { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - max-width: 100%; } - .col-sm-auto { - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: auto; - max-width: 100%; } - .col-sm-1 { - -ms-flex: 0 0 8.33333%; - flex: 0 0 8.33333%; - max-width: 8.33333%; } - .col-sm-2 { - -ms-flex: 0 0 16.66667%; - flex: 0 0 16.66667%; - max-width: 16.66667%; } - .col-sm-3 { - -ms-flex: 0 0 25%; - flex: 0 0 25%; - max-width: 25%; } - .col-sm-4 { - -ms-flex: 0 0 33.33333%; - flex: 0 0 33.33333%; - max-width: 33.33333%; } - .col-sm-5 { - -ms-flex: 0 0 41.66667%; - flex: 0 0 41.66667%; - max-width: 41.66667%; } - .col-sm-6 { - -ms-flex: 0 0 50%; - flex: 0 0 50%; - max-width: 50%; } - .col-sm-7 { - -ms-flex: 0 0 58.33333%; - flex: 0 0 58.33333%; - max-width: 58.33333%; } - .col-sm-8 { - -ms-flex: 0 0 66.66667%; - flex: 0 0 66.66667%; - max-width: 66.66667%; } - .col-sm-9 { - -ms-flex: 0 0 75%; - flex: 0 0 75%; - max-width: 75%; } - .col-sm-10 { - -ms-flex: 0 0 83.33333%; - flex: 0 0 83.33333%; - max-width: 83.33333%; } - .col-sm-11 { - -ms-flex: 0 0 91.66667%; - flex: 0 0 91.66667%; - max-width: 91.66667%; } - .col-sm-12 { - -ms-flex: 0 0 100%; - flex: 0 0 100%; - max-width: 100%; } - .order-sm-first { - -ms-flex-order: -1; - order: -1; } - .order-sm-last { - -ms-flex-order: 13; - order: 13; } - .order-sm-0 { - -ms-flex-order: 0; - order: 0; } - .order-sm-1 { - -ms-flex-order: 1; - order: 1; } - .order-sm-2 { - -ms-flex-order: 2; - order: 2; } - .order-sm-3 { - -ms-flex-order: 3; - order: 3; } - .order-sm-4 { - -ms-flex-order: 4; - order: 4; } - .order-sm-5 { - -ms-flex-order: 5; - order: 5; } - .order-sm-6 { - -ms-flex-order: 6; - order: 6; } - .order-sm-7 { - -ms-flex-order: 7; - order: 7; } - .order-sm-8 { - -ms-flex-order: 8; - order: 8; } - .order-sm-9 { - -ms-flex-order: 9; - order: 9; } - .order-sm-10 { - -ms-flex-order: 10; - order: 10; } - .order-sm-11 { - -ms-flex-order: 11; - order: 11; } - .order-sm-12 { - -ms-flex-order: 12; - order: 12; } - .offset-sm-0 { - margin-left: 0; } - .offset-sm-1 { - margin-left: 8.33333%; } - .offset-sm-2 { - margin-left: 16.66667%; } - .offset-sm-3 { - margin-left: 25%; } - .offset-sm-4 { - margin-left: 33.33333%; } - .offset-sm-5 { - margin-left: 41.66667%; } - .offset-sm-6 { - margin-left: 50%; } - .offset-sm-7 { - margin-left: 58.33333%; } - .offset-sm-8 { - margin-left: 66.66667%; } - .offset-sm-9 { - margin-left: 75%; } - .offset-sm-10 { - margin-left: 83.33333%; } - .offset-sm-11 { - margin-left: 91.66667%; } } - -@media (min-width: 768px) { - .col-md { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - max-width: 100%; } - .col-md-auto { - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: auto; - max-width: 100%; } - .col-md-1 { - -ms-flex: 0 0 8.33333%; - flex: 0 0 8.33333%; - max-width: 8.33333%; } - .col-md-2 { - -ms-flex: 0 0 16.66667%; - flex: 0 0 16.66667%; - max-width: 16.66667%; } - .col-md-3 { - -ms-flex: 0 0 25%; - flex: 0 0 25%; - max-width: 25%; } - .col-md-4 { - -ms-flex: 0 0 33.33333%; - flex: 0 0 33.33333%; - max-width: 33.33333%; } - .col-md-5 { - -ms-flex: 0 0 41.66667%; - flex: 0 0 41.66667%; - max-width: 41.66667%; } - .col-md-6 { - -ms-flex: 0 0 50%; - flex: 0 0 50%; - max-width: 50%; } - .col-md-7 { - -ms-flex: 0 0 58.33333%; - flex: 0 0 58.33333%; - max-width: 58.33333%; } - .col-md-8 { - -ms-flex: 0 0 66.66667%; - flex: 0 0 66.66667%; - max-width: 66.66667%; } - .col-md-9 { - -ms-flex: 0 0 75%; - flex: 0 0 75%; - max-width: 75%; } - .col-md-10 { - -ms-flex: 0 0 83.33333%; - flex: 0 0 83.33333%; - max-width: 83.33333%; } - .col-md-11 { - -ms-flex: 0 0 91.66667%; - flex: 0 0 91.66667%; - max-width: 91.66667%; } - .col-md-12 { - -ms-flex: 0 0 100%; - flex: 0 0 100%; - max-width: 100%; } - .order-md-first { - -ms-flex-order: -1; - order: -1; } - .order-md-last { - -ms-flex-order: 13; - order: 13; } - .order-md-0 { - -ms-flex-order: 0; - order: 0; } - .order-md-1 { - -ms-flex-order: 1; - order: 1; } - .order-md-2 { - -ms-flex-order: 2; - order: 2; } - .order-md-3 { - -ms-flex-order: 3; - order: 3; } - .order-md-4 { - -ms-flex-order: 4; - order: 4; } - .order-md-5 { - -ms-flex-order: 5; - order: 5; } - .order-md-6 { - -ms-flex-order: 6; - order: 6; } - .order-md-7 { - -ms-flex-order: 7; - order: 7; } - .order-md-8 { - -ms-flex-order: 8; - order: 8; } - .order-md-9 { - -ms-flex-order: 9; - order: 9; } - .order-md-10 { - -ms-flex-order: 10; - order: 10; } - .order-md-11 { - -ms-flex-order: 11; - order: 11; } - .order-md-12 { - -ms-flex-order: 12; - order: 12; } - .offset-md-0 { - margin-left: 0; } - .offset-md-1 { - margin-left: 8.33333%; } - .offset-md-2 { - margin-left: 16.66667%; } - .offset-md-3 { - margin-left: 25%; } - .offset-md-4 { - margin-left: 33.33333%; } - .offset-md-5 { - margin-left: 41.66667%; } - .offset-md-6 { - margin-left: 50%; } - .offset-md-7 { - margin-left: 58.33333%; } - .offset-md-8 { - margin-left: 66.66667%; } - .offset-md-9 { - margin-left: 75%; } - .offset-md-10 { - margin-left: 83.33333%; } - .offset-md-11 { - margin-left: 91.66667%; } } - -@media (min-width: 992px) { - .col-lg { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - max-width: 100%; } - .col-lg-auto { - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: auto; - max-width: 100%; } - .col-lg-1 { - -ms-flex: 0 0 8.33333%; - flex: 0 0 8.33333%; - max-width: 8.33333%; } - .col-lg-2 { - -ms-flex: 0 0 16.66667%; - flex: 0 0 16.66667%; - max-width: 16.66667%; } - .col-lg-3 { - -ms-flex: 0 0 25%; - flex: 0 0 25%; - max-width: 25%; } - .col-lg-4 { - -ms-flex: 0 0 33.33333%; - flex: 0 0 33.33333%; - max-width: 33.33333%; } - .col-lg-5 { - -ms-flex: 0 0 41.66667%; - flex: 0 0 41.66667%; - max-width: 41.66667%; } - .col-lg-6 { - -ms-flex: 0 0 50%; - flex: 0 0 50%; - max-width: 50%; } - .col-lg-7 { - -ms-flex: 0 0 58.33333%; - flex: 0 0 58.33333%; - max-width: 58.33333%; } - .col-lg-8 { - -ms-flex: 0 0 66.66667%; - flex: 0 0 66.66667%; - max-width: 66.66667%; } - .col-lg-9 { - -ms-flex: 0 0 75%; - flex: 0 0 75%; - max-width: 75%; } - .col-lg-10 { - -ms-flex: 0 0 83.33333%; - flex: 0 0 83.33333%; - max-width: 83.33333%; } - .col-lg-11 { - -ms-flex: 0 0 91.66667%; - flex: 0 0 91.66667%; - max-width: 91.66667%; } - .col-lg-12 { - -ms-flex: 0 0 100%; - flex: 0 0 100%; - max-width: 100%; } - .order-lg-first { - -ms-flex-order: -1; - order: -1; } - .order-lg-last { - -ms-flex-order: 13; - order: 13; } - .order-lg-0 { - -ms-flex-order: 0; - order: 0; } - .order-lg-1 { - -ms-flex-order: 1; - order: 1; } - .order-lg-2 { - -ms-flex-order: 2; - order: 2; } - .order-lg-3 { - -ms-flex-order: 3; - order: 3; } - .order-lg-4 { - -ms-flex-order: 4; - order: 4; } - .order-lg-5 { - -ms-flex-order: 5; - order: 5; } - .order-lg-6 { - -ms-flex-order: 6; - order: 6; } - .order-lg-7 { - -ms-flex-order: 7; - order: 7; } - .order-lg-8 { - -ms-flex-order: 8; - order: 8; } - .order-lg-9 { - -ms-flex-order: 9; - order: 9; } - .order-lg-10 { - -ms-flex-order: 10; - order: 10; } - .order-lg-11 { - -ms-flex-order: 11; - order: 11; } - .order-lg-12 { - -ms-flex-order: 12; - order: 12; } - .offset-lg-0 { - margin-left: 0; } - .offset-lg-1 { - margin-left: 8.33333%; } - .offset-lg-2 { - margin-left: 16.66667%; } - .offset-lg-3 { - margin-left: 25%; } - .offset-lg-4 { - margin-left: 33.33333%; } - .offset-lg-5 { - margin-left: 41.66667%; } - .offset-lg-6 { - margin-left: 50%; } - .offset-lg-7 { - margin-left: 58.33333%; } - .offset-lg-8 { - margin-left: 66.66667%; } - .offset-lg-9 { - margin-left: 75%; } - .offset-lg-10 { - margin-left: 83.33333%; } - .offset-lg-11 { - margin-left: 91.66667%; } } - -@media (min-width: 1200px) { - .col-xl { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - max-width: 100%; } - .col-xl-auto { - -ms-flex: 0 0 auto; - flex: 0 0 auto; - width: auto; - max-width: 100%; } - .col-xl-1 { - -ms-flex: 0 0 8.33333%; - flex: 0 0 8.33333%; - max-width: 8.33333%; } - .col-xl-2 { - -ms-flex: 0 0 16.66667%; - flex: 0 0 16.66667%; - max-width: 16.66667%; } - .col-xl-3 { - -ms-flex: 0 0 25%; - flex: 0 0 25%; - max-width: 25%; } - .col-xl-4 { - -ms-flex: 0 0 33.33333%; - flex: 0 0 33.33333%; - max-width: 33.33333%; } - .col-xl-5 { - -ms-flex: 0 0 41.66667%; - flex: 0 0 41.66667%; - max-width: 41.66667%; } - .col-xl-6 { - -ms-flex: 0 0 50%; - flex: 0 0 50%; - max-width: 50%; } - .col-xl-7 { - -ms-flex: 0 0 58.33333%; - flex: 0 0 58.33333%; - max-width: 58.33333%; } - .col-xl-8 { - -ms-flex: 0 0 66.66667%; - flex: 0 0 66.66667%; - max-width: 66.66667%; } - .col-xl-9 { - -ms-flex: 0 0 75%; - flex: 0 0 75%; - max-width: 75%; } - .col-xl-10 { - -ms-flex: 0 0 83.33333%; - flex: 0 0 83.33333%; - max-width: 83.33333%; } - .col-xl-11 { - -ms-flex: 0 0 91.66667%; - flex: 0 0 91.66667%; - max-width: 91.66667%; } - .col-xl-12 { - -ms-flex: 0 0 100%; - flex: 0 0 100%; - max-width: 100%; } - .order-xl-first { - -ms-flex-order: -1; - order: -1; } - .order-xl-last { - -ms-flex-order: 13; - order: 13; } - .order-xl-0 { - -ms-flex-order: 0; - order: 0; } - .order-xl-1 { - -ms-flex-order: 1; - order: 1; } - .order-xl-2 { - -ms-flex-order: 2; - order: 2; } - .order-xl-3 { - -ms-flex-order: 3; - order: 3; } - .order-xl-4 { - -ms-flex-order: 4; - order: 4; } - .order-xl-5 { - -ms-flex-order: 5; - order: 5; } - .order-xl-6 { - -ms-flex-order: 6; - order: 6; } - .order-xl-7 { - -ms-flex-order: 7; - order: 7; } - .order-xl-8 { - -ms-flex-order: 8; - order: 8; } - .order-xl-9 { - -ms-flex-order: 9; - order: 9; } - .order-xl-10 { - -ms-flex-order: 10; - order: 10; } - .order-xl-11 { - -ms-flex-order: 11; - order: 11; } - .order-xl-12 { - -ms-flex-order: 12; - order: 12; } - .offset-xl-0 { - margin-left: 0; } - .offset-xl-1 { - margin-left: 8.33333%; } - .offset-xl-2 { - margin-left: 16.66667%; } - .offset-xl-3 { - margin-left: 25%; } - .offset-xl-4 { - margin-left: 33.33333%; } - .offset-xl-5 { - margin-left: 41.66667%; } - .offset-xl-6 { - margin-left: 50%; } - .offset-xl-7 { - margin-left: 58.33333%; } - .offset-xl-8 { - margin-left: 66.66667%; } - .offset-xl-9 { - margin-left: 75%; } - .offset-xl-10 { - margin-left: 83.33333%; } - .offset-xl-11 { - margin-left: 91.66667%; } } - -.table { - width: 100%; - margin-bottom: 1.5rem; - color: #333; } - .table th, - .table td { - padding: 0.75rem; - vertical-align: top; - border-top: 1px solid #dee2e6; } - .table thead th { - vertical-align: bottom; - border-bottom: 2px solid #dee2e6; } - .table tbody + tbody { - border-top: 2px solid #dee2e6; } - -.table-sm th, -.table-sm td { - padding: 0.3rem; } - -.table-bordered { - border: 1px solid #dee2e6; } - .table-bordered th, - .table-bordered td { - border: 1px solid #dee2e6; } - .table-bordered thead th, - .table-bordered thead td { - border-bottom-width: 2px; } - -.table-borderless th, -.table-borderless td, -.table-borderless thead th, -.table-borderless tbody + tbody { - border: 0; } - -.table-striped tbody tr:nth-of-type(odd) { - background-color: rgba(0, 0, 0, 0.05); } - -.table-hover tbody tr:hover { - color: #333; - background-color: rgba(0, 0, 0, 0.075); } - -.table-primary, -.table-primary > th, -.table-primary > td { - background-color: #bdece8; } - -.table-primary th, -.table-primary td, -.table-primary thead th, -.table-primary tbody + tbody { - border-color: #84dcd4; } - -.table-hover .table-primary:hover { - background-color: #a9e6e1; } - .table-hover .table-primary:hover > td, - .table-hover .table-primary:hover > th { - background-color: #a9e6e1; } - -.table-secondary, -.table-secondary > th, -.table-secondary > td { - background-color: #ced7f1; } - -.table-secondary th, -.table-secondary td, -.table-secondary thead th, -.table-secondary tbody + tbody { - border-color: #a3b5e6; } - -.table-hover .table-secondary:hover { - background-color: #bac7eb; } - .table-hover .table-secondary:hover > td, - .table-hover .table-secondary:hover > th { - background-color: #bac7eb; } - -.table-success, -.table-success > th, -.table-success > td { - background-color: #c3e6cb; } - -.table-success th, -.table-success td, -.table-success thead th, -.table-success tbody + tbody { - border-color: #8fd19e; } - -.table-hover .table-success:hover { - background-color: #b1dfbb; } - .table-hover .table-success:hover > td, - .table-hover .table-success:hover > th { - background-color: #b1dfbb; } - -.table-info, -.table-info > th, -.table-info > td { - background-color: #f1f1f1; } - -.table-info th, -.table-info td, -.table-info thead th, -.table-info tbody + tbody { - border-color: #e4e4e4; } - -.table-hover .table-info:hover { - background-color: #e4e4e4; } - .table-hover .table-info:hover > td, - .table-hover .table-info:hover > th { - background-color: #e4e4e4; } - -.table-warning, -.table-warning > th, -.table-warning > td { - background-color: #ffeeba; } - -.table-warning th, -.table-warning td, -.table-warning thead th, -.table-warning tbody + tbody { - border-color: #ffdf7e; } - -.table-hover .table-warning:hover { - background-color: #ffe8a1; } - .table-hover .table-warning:hover > td, - .table-hover .table-warning:hover > th { - background-color: #ffe8a1; } - -.table-danger, -.table-danger > th, -.table-danger > td { - background-color: #f5c6cb; } - -.table-danger th, -.table-danger td, -.table-danger thead th, -.table-danger tbody + tbody { - border-color: #ed969e; } - -.table-hover .table-danger:hover { - background-color: #f1b0b7; } - .table-hover .table-danger:hover > td, - .table-hover .table-danger:hover > th { - background-color: #f1b0b7; } - -.table-light, -.table-light > th, -.table-light > td { - background-color: #fcfcfc; } - -.table-light th, -.table-light td, -.table-light thead th, -.table-light tbody + tbody { - border-color: #f9f9f9; } - -.table-hover .table-light:hover { - background-color: #efefef; } - .table-hover .table-light:hover > td, - .table-hover .table-light:hover > th { - background-color: #efefef; } - -.table-dark, -.table-dark > th, -.table-dark > td { - background-color: #bdbdbd; } - -.table-dark th, -.table-dark td, -.table-dark thead th, -.table-dark tbody + tbody { - border-color: #858585; } - -.table-hover .table-dark:hover { - background-color: #b0b0b0; } - .table-hover .table-dark:hover > td, - .table-hover .table-dark:hover > th { - background-color: #b0b0b0; } - -.table-active, -.table-active > th, -.table-active > td { - background-color: rgba(0, 0, 0, 0.075); } - -.table-hover .table-active:hover { - background-color: rgba(0, 0, 0, 0.075); } - .table-hover .table-active:hover > td, - .table-hover .table-active:hover > th { - background-color: rgba(0, 0, 0, 0.075); } - -.table .thead-dark th { - color: #fff; - background-color: #343a40; - border-color: #454d55; } - -.table .thead-light th { - color: #495057; - background-color: #e9ecef; - border-color: #dee2e6; } - -.table-dark { - color: #fff; - background-color: #343a40; } - .table-dark th, - .table-dark td, - .table-dark thead th { - border-color: #454d55; } - .table-dark.table-bordered { - border: 0; } - .table-dark.table-striped tbody tr:nth-of-type(odd) { - background-color: rgba(255, 255, 255, 0.05); } - .table-dark.table-hover tbody tr:hover { - color: #fff; - background-color: rgba(255, 255, 255, 0.075); } - -@media (max-width: 575.98px) { - .table-responsive-sm { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; } - .table-responsive-sm > .table-bordered { - border: 0; } } - -@media (max-width: 767.98px) { - .table-responsive-md { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; } - .table-responsive-md > .table-bordered { - border: 0; } } - -@media (max-width: 991.98px) { - .table-responsive-lg { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; } - .table-responsive-lg > .table-bordered { - border: 0; } } - -@media (max-width: 1199.98px) { - .table-responsive-xl { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; } - .table-responsive-xl > .table-bordered { - border: 0; } } - -.table-responsive { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; } - .table-responsive > .table-bordered { - border: 0; } - -.form-control { - display: block; - width: 100%; - height: calc(1.5em + 0.75rem + 2px); - padding: 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 200; - line-height: 1.5; - color: #495057; - background-color: #fff; - background-clip: padding-box; - border: 1px solid #ced4da; - border-radius: 0.25rem; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .form-control { - transition: none; } } - .form-control::-ms-expand { - background-color: transparent; - border: 0; } - .form-control:focus { - color: #495057; - background-color: #fff; - border-color: #5defe3; - outline: 0; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .form-control:-ms-input-placeholder { - color: #6c757d; - opacity: 1; } - .form-control::placeholder { - color: #6c757d; - opacity: 1; } - .form-control:disabled, .form-control[readonly] { - background-color: #e9ecef; - opacity: 1; } - -select.form-control:focus::-ms-value { - color: #495057; - background-color: #fff; } - -.form-control-file, -.form-control-range { - display: block; - width: 100%; } - -.col-form-label { - padding-top: calc(0.375rem + 1px); - padding-bottom: calc(0.375rem + 1px); - margin-bottom: 0; - font-size: inherit; - line-height: 1.5; } - -.col-form-label-lg { - padding-top: calc(0.5rem + 1px); - padding-bottom: calc(0.5rem + 1px); - font-size: 1.25rem; - line-height: 1.5; } - -.col-form-label-sm { - padding-top: calc(0.25rem + 1px); - padding-bottom: calc(0.25rem + 1px); - font-size: 0.875rem; - line-height: 1.5; } - -.form-control-plaintext { - display: block; - width: 100%; - padding-top: 0.375rem; - padding-bottom: 0.375rem; - margin-bottom: 0; - line-height: 1.5; - color: #333; - background-color: transparent; - border: solid transparent; - border-width: 1px 0; } - .form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { - padding-right: 0; - padding-left: 0; } - -.form-control-sm { - height: calc(1.5em + 0.5rem + 2px); - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - line-height: 1.5; - border-radius: 0.2rem; } - -.form-control-lg { - height: calc(1.5em + 1rem + 2px); - padding: 0.5rem 1rem; - font-size: 1.25rem; - line-height: 1.5; - border-radius: 0.3rem; } - -select.form-control[size], select.form-control[multiple] { - height: auto; } - -textarea.form-control { - height: auto; } - -.form-group { - margin-bottom: 1rem; } - -.form-text { - display: block; - margin-top: 0.25rem; } - -.form-row { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -5px; - margin-left: -5px; } - .form-row > .col, - .form-row > [class*="col-"] { - padding-right: 5px; - padding-left: 5px; } - -.form-check { - position: relative; - display: block; - padding-left: 1.25rem; } - -.form-check-input { - position: absolute; - margin-top: 0.3rem; - margin-left: -1.25rem; } - .form-check-input:disabled ~ .form-check-label { - color: #6c757d; } - -.form-check-label { - margin-bottom: 0; } - -.form-check-inline { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - padding-left: 0; - margin-right: 0.75rem; } - .form-check-inline .form-check-input { - position: static; - margin-top: 0; - margin-right: 0.3125rem; - margin-left: 0; } - -.valid-feedback { - display: none; - width: 100%; - margin-top: 0.25rem; - font-size: 80%; - color: #28a745; } - -.valid-tooltip { - position: absolute; - top: 100%; - z-index: 5; - display: none; - max-width: 100%; - padding: 0.25rem 0.5rem; - margin-top: .1rem; - font-size: 0.875rem; - line-height: 1.5; - color: #fff; - background-color: rgba(40, 167, 69, 0.9); - border-radius: 0.25rem; } - -.was-validated .form-control:valid, .form-control.is-valid { - border-color: #28a745; - padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-position: center right calc(0.375em + 0.1875rem); - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .form-control:valid:focus, .form-control.is-valid:focus { - border-color: #28a745; - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } - .was-validated .form-control:valid ~ .valid-feedback, - .was-validated .form-control:valid ~ .valid-tooltip, .form-control.is-valid ~ .valid-feedback, - .form-control.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated textarea.form-control:valid, textarea.form-control.is-valid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); } - -.was-validated .custom-select:valid, .custom-select.is-valid { - border-color: #28a745; - padding-right: calc((1em + 0.75rem) * 3 / 4 + 1.75rem); - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .custom-select:valid:focus, .custom-select.is-valid:focus { - border-color: #28a745; - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } - .was-validated .custom-select:valid ~ .valid-feedback, - .was-validated .custom-select:valid ~ .valid-tooltip, .custom-select.is-valid ~ .valid-feedback, - .custom-select.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated .form-control-file:valid ~ .valid-feedback, -.was-validated .form-control-file:valid ~ .valid-tooltip, .form-control-file.is-valid ~ .valid-feedback, -.form-control-file.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label { - color: #28a745; } - -.was-validated .form-check-input:valid ~ .valid-feedback, -.was-validated .form-check-input:valid ~ .valid-tooltip, .form-check-input.is-valid ~ .valid-feedback, -.form-check-input.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated .custom-control-input:valid ~ .custom-control-label, .custom-control-input.is-valid ~ .custom-control-label { - color: #28a745; } - .was-validated .custom-control-input:valid ~ .custom-control-label::before, .custom-control-input.is-valid ~ .custom-control-label::before { - border-color: #28a745; } - -.was-validated .custom-control-input:valid ~ .valid-feedback, -.was-validated .custom-control-input:valid ~ .valid-tooltip, .custom-control-input.is-valid ~ .valid-feedback, -.custom-control-input.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before, .custom-control-input.is-valid:checked ~ .custom-control-label::before { - border-color: #34ce57; - background-color: #34ce57; } - -.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before, .custom-control-input.is-valid:focus ~ .custom-control-label::before { - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } - -.was-validated .custom-control-input:valid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-valid:focus:not(:checked) ~ .custom-control-label::before { - border-color: #28a745; } - -.was-validated .custom-file-input:valid ~ .custom-file-label, .custom-file-input.is-valid ~ .custom-file-label { - border-color: #28a745; } - -.was-validated .custom-file-input:valid ~ .valid-feedback, -.was-validated .custom-file-input:valid ~ .valid-tooltip, .custom-file-input.is-valid ~ .valid-feedback, -.custom-file-input.is-valid ~ .valid-tooltip { - display: block; } - -.was-validated .custom-file-input:valid:focus ~ .custom-file-label, .custom-file-input.is-valid:focus ~ .custom-file-label { - border-color: #28a745; - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } - -.invalid-feedback { - display: none; - width: 100%; - margin-top: 0.25rem; - font-size: 80%; - color: #dc3545; } - -.invalid-tooltip { - position: absolute; - top: 100%; - z-index: 5; - display: none; - max-width: 100%; - padding: 0.25rem 0.5rem; - margin-top: .1rem; - font-size: 0.875rem; - line-height: 1.5; - color: #fff; - background-color: rgba(220, 53, 69, 0.9); - border-radius: 0.25rem; } - -.was-validated .form-control:invalid, .form-control.is-invalid { - border-color: #dc3545; - padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"); - background-repeat: no-repeat; - background-position: center right calc(0.375em + 0.1875rem); - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { - border-color: #dc3545; - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } - .was-validated .form-control:invalid ~ .invalid-feedback, - .was-validated .form-control:invalid ~ .invalid-tooltip, .form-control.is-invalid ~ .invalid-feedback, - .form-control.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); } - -.was-validated .custom-select:invalid, .custom-select.is-invalid { - border-color: #dc3545; - padding-right: calc((1em + 0.75rem) * 3 / 4 + 1.75rem); - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } - .was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus { - border-color: #dc3545; - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } - .was-validated .custom-select:invalid ~ .invalid-feedback, - .was-validated .custom-select:invalid ~ .invalid-tooltip, .custom-select.is-invalid ~ .invalid-feedback, - .custom-select.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated .form-control-file:invalid ~ .invalid-feedback, -.was-validated .form-control-file:invalid ~ .invalid-tooltip, .form-control-file.is-invalid ~ .invalid-feedback, -.form-control-file.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { - color: #dc3545; } - -.was-validated .form-check-input:invalid ~ .invalid-feedback, -.was-validated .form-check-input:invalid ~ .invalid-tooltip, .form-check-input.is-invalid ~ .invalid-feedback, -.form-check-input.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated .custom-control-input:invalid ~ .custom-control-label, .custom-control-input.is-invalid ~ .custom-control-label { - color: #dc3545; } - .was-validated .custom-control-input:invalid ~ .custom-control-label::before, .custom-control-input.is-invalid ~ .custom-control-label::before { - border-color: #dc3545; } - -.was-validated .custom-control-input:invalid ~ .invalid-feedback, -.was-validated .custom-control-input:invalid ~ .invalid-tooltip, .custom-control-input.is-invalid ~ .invalid-feedback, -.custom-control-input.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before, .custom-control-input.is-invalid:checked ~ .custom-control-label::before { - border-color: #e4606d; - background-color: #e4606d; } - -.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, .custom-control-input.is-invalid:focus ~ .custom-control-label::before { - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } - -.was-validated .custom-control-input:invalid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-invalid:focus:not(:checked) ~ .custom-control-label::before { - border-color: #dc3545; } - -.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label { - border-color: #dc3545; } - -.was-validated .custom-file-input:invalid ~ .invalid-feedback, -.was-validated .custom-file-input:invalid ~ .invalid-tooltip, .custom-file-input.is-invalid ~ .invalid-feedback, -.custom-file-input.is-invalid ~ .invalid-tooltip { - display: block; } - -.was-validated .custom-file-input:invalid:focus ~ .custom-file-label, .custom-file-input.is-invalid:focus ~ .custom-file-label { - border-color: #dc3545; - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } - -.form-inline { - display: -ms-flexbox; - display: flex; - -ms-flex-flow: row wrap; - flex-flow: row wrap; - -ms-flex-align: center; - align-items: center; } - .form-inline .form-check { - width: 100%; } - @media (min-width: 576px) { - .form-inline label { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - margin-bottom: 0; } - .form-inline .form-group { - display: -ms-flexbox; - display: flex; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - -ms-flex-flow: row wrap; - flex-flow: row wrap; - -ms-flex-align: center; - align-items: center; - margin-bottom: 0; } - .form-inline .form-control { - display: inline-block; - width: auto; - vertical-align: middle; } - .form-inline .form-control-plaintext { - display: inline-block; } - .form-inline .input-group, - .form-inline .custom-select { - width: auto; } - .form-inline .form-check { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - width: auto; - padding-left: 0; } - .form-inline .form-check-input { - position: relative; - -ms-flex-negative: 0; - flex-shrink: 0; - margin-top: 0; - margin-right: 0.25rem; - margin-left: 0; } - .form-inline .custom-control { - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; } - .form-inline .custom-control-label { - margin-bottom: 0; } } - -.btn { - display: inline-block; - font-weight: 200; - color: #333; - text-align: center; - vertical-align: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-color: transparent; - border: 1px solid transparent; - padding: 0.375rem 0.75rem; - font-size: 1rem; - line-height: 1.5; - border-radius: 0.25rem; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .btn { - transition: none; } } - .btn:hover { - color: #333; - text-decoration: none; } - .btn:focus, .btn.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .btn.disabled, .btn:disabled { - opacity: 0.65; - box-shadow: none; } - .btn:not(:disabled):not(.disabled):active, .btn:not(:disabled):not(.disabled).active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } - .btn:not(:disabled):not(.disabled):active:focus, .btn:not(:disabled):not(.disabled).active:focus { - box-shadow: 0 0 0 0.2rem rgba(18, 187, 173, 0.25), inset 0 3px 5px rgba(0, 0, 0, 0.125); } - -a.btn.disabled, -fieldset:disabled a.btn { - pointer-events: none; } - -.btn-primary { - color: #fff; - background-color: #12bbad; - border-color: #12bbad; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-primary:hover { - color: #fff; - background-color: #0f988d; - border-color: #0e8c82; } - .btn-primary:focus, .btn-primary.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(54, 197, 185, 0.5); } - .btn-primary.disabled, .btn-primary:disabled { - color: #fff; - background-color: #12bbad; - border-color: #12bbad; } - .btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, - .show > .btn-primary.dropdown-toggle { - color: #fff; - background-color: #0e8c82; - border-color: #0c8177; } - .btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, - .show > .btn-primary.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(54, 197, 185, 0.5); } - -.btn-secondary { - color: #fff; - background-color: #4f70ce; - border-color: #4f70ce; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-secondary:hover { - color: #fff; - background-color: #365ac1; - border-color: #3355b7; } - .btn-secondary:focus, .btn-secondary.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(105, 133, 213, 0.5); } - .btn-secondary.disabled, .btn-secondary:disabled { - color: #fff; - background-color: #4f70ce; - border-color: #4f70ce; } - .btn-secondary:not(:disabled):not(.disabled):active, .btn-secondary:not(:disabled):not(.disabled).active, - .show > .btn-secondary.dropdown-toggle { - color: #fff; - background-color: #3355b7; - border-color: #3051ad; } - .btn-secondary:not(:disabled):not(.disabled):active:focus, .btn-secondary:not(:disabled):not(.disabled).active:focus, - .show > .btn-secondary.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(105, 133, 213, 0.5); } - -.btn-success { - color: #fff; - background-color: #28a745; - border-color: #28a745; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-success:hover { - color: #fff; - background-color: #218838; - border-color: #1e7e34; } - .btn-success:focus, .btn-success.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(72, 180, 97, 0.5); } - .btn-success.disabled, .btn-success:disabled { - color: #fff; - background-color: #28a745; - border-color: #28a745; } - .btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, - .show > .btn-success.dropdown-toggle { - color: #fff; - background-color: #1e7e34; - border-color: #1c7430; } - .btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, - .show > .btn-success.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(72, 180, 97, 0.5); } - -.btn-info { - color: #212529; - background-color: #ccc; - border-color: #ccc; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-info:hover { - color: #212529; - background-color: #b9b9b9; - border-color: #b3b3b3; } - .btn-info:focus, .btn-info.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(178, 179, 180, 0.5); } - .btn-info.disabled, .btn-info:disabled { - color: #212529; - background-color: #ccc; - border-color: #ccc; } - .btn-info:not(:disabled):not(.disabled):active, .btn-info:not(:disabled):not(.disabled).active, - .show > .btn-info.dropdown-toggle { - color: #212529; - background-color: #b3b3b3; - border-color: #acacac; } - .btn-info:not(:disabled):not(.disabled):active:focus, .btn-info:not(:disabled):not(.disabled).active:focus, - .show > .btn-info.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(178, 179, 180, 0.5); } - -.btn-warning { - color: #212529; - background-color: #ffc107; - border-color: #ffc107; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-warning:hover { - color: #212529; - background-color: #e0a800; - border-color: #d39e00; } - .btn-warning:focus, .btn-warning.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(222, 170, 12, 0.5); } - .btn-warning.disabled, .btn-warning:disabled { - color: #212529; - background-color: #ffc107; - border-color: #ffc107; } - .btn-warning:not(:disabled):not(.disabled):active, .btn-warning:not(:disabled):not(.disabled).active, - .show > .btn-warning.dropdown-toggle { - color: #212529; - background-color: #d39e00; - border-color: #c69500; } - .btn-warning:not(:disabled):not(.disabled):active:focus, .btn-warning:not(:disabled):not(.disabled).active:focus, - .show > .btn-warning.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(222, 170, 12, 0.5); } - -.btn-danger { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-danger:hover { - color: #fff; - background-color: #c82333; - border-color: #bd2130; } - .btn-danger:focus, .btn-danger.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(225, 83, 97, 0.5); } - .btn-danger.disabled, .btn-danger:disabled { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; } - .btn-danger:not(:disabled):not(.disabled):active, .btn-danger:not(:disabled):not(.disabled).active, - .show > .btn-danger.dropdown-toggle { - color: #fff; - background-color: #bd2130; - border-color: #b21f2d; } - .btn-danger:not(:disabled):not(.disabled):active:focus, .btn-danger:not(:disabled):not(.disabled).active:focus, - .show > .btn-danger.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(225, 83, 97, 0.5); } - -.btn-light { - color: #212529; - background-color: #f3f3f3; - border-color: #f3f3f3; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-light:hover { - color: #212529; - background-color: #e0e0e0; - border-color: #dadada; } - .btn-light:focus, .btn-light.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(212, 212, 213, 0.5); } - .btn-light.disabled, .btn-light:disabled { - color: #212529; - background-color: #f3f3f3; - border-color: #f3f3f3; } - .btn-light:not(:disabled):not(.disabled):active, .btn-light:not(:disabled):not(.disabled).active, - .show > .btn-light.dropdown-toggle { - color: #212529; - background-color: #dadada; - border-color: lightgray; } - .btn-light:not(:disabled):not(.disabled):active:focus, .btn-light:not(:disabled):not(.disabled).active:focus, - .show > .btn-light.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(212, 212, 213, 0.5); } - -.btn-dark { - color: #fff; - background-color: #151515; - border-color: #151515; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); } - .btn-dark:hover { - color: #fff; - background-color: #020202; - border-color: black; } - .btn-dark:focus, .btn-dark.focus { - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(56, 56, 56, 0.5); } - .btn-dark.disabled, .btn-dark:disabled { - color: #fff; - background-color: #151515; - border-color: #151515; } - .btn-dark:not(:disabled):not(.disabled):active, .btn-dark:not(:disabled):not(.disabled).active, - .show > .btn-dark.dropdown-toggle { - color: #fff; - background-color: black; - border-color: black; } - .btn-dark:not(:disabled):not(.disabled):active:focus, .btn-dark:not(:disabled):not(.disabled).active:focus, - .show > .btn-dark.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(56, 56, 56, 0.5); } - -.btn-outline-primary { - color: #12bbad; - border-color: #12bbad; } - .btn-outline-primary:hover { - color: #fff; - background-color: #12bbad; - border-color: #12bbad; } - .btn-outline-primary:focus, .btn-outline-primary.focus { - box-shadow: 0 0 0 0.2rem rgba(18, 187, 173, 0.5); } - .btn-outline-primary.disabled, .btn-outline-primary:disabled { - color: #12bbad; - background-color: transparent; } - .btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, - .show > .btn-outline-primary.dropdown-toggle { - color: #fff; - background-color: #12bbad; - border-color: #12bbad; } - .btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-primary.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(18, 187, 173, 0.5); } - -.btn-outline-secondary { - color: #4f70ce; - border-color: #4f70ce; } - .btn-outline-secondary:hover { - color: #fff; - background-color: #4f70ce; - border-color: #4f70ce; } - .btn-outline-secondary:focus, .btn-outline-secondary.focus { - box-shadow: 0 0 0 0.2rem rgba(79, 112, 206, 0.5); } - .btn-outline-secondary.disabled, .btn-outline-secondary:disabled { - color: #4f70ce; - background-color: transparent; } - .btn-outline-secondary:not(:disabled):not(.disabled):active, .btn-outline-secondary:not(:disabled):not(.disabled).active, - .show > .btn-outline-secondary.dropdown-toggle { - color: #fff; - background-color: #4f70ce; - border-color: #4f70ce; } - .btn-outline-secondary:not(:disabled):not(.disabled):active:focus, .btn-outline-secondary:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-secondary.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(79, 112, 206, 0.5); } - -.btn-outline-success { - color: #28a745; - border-color: #28a745; } - .btn-outline-success:hover { - color: #fff; - background-color: #28a745; - border-color: #28a745; } - .btn-outline-success:focus, .btn-outline-success.focus { - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); } - .btn-outline-success.disabled, .btn-outline-success:disabled { - color: #28a745; - background-color: transparent; } - .btn-outline-success:not(:disabled):not(.disabled):active, .btn-outline-success:not(:disabled):not(.disabled).active, - .show > .btn-outline-success.dropdown-toggle { - color: #fff; - background-color: #28a745; - border-color: #28a745; } - .btn-outline-success:not(:disabled):not(.disabled):active:focus, .btn-outline-success:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-success.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(40, 167, 69, 0.5); } - -.btn-outline-info { - color: #ccc; - border-color: #ccc; } - .btn-outline-info:hover { - color: #212529; - background-color: #ccc; - border-color: #ccc; } - .btn-outline-info:focus, .btn-outline-info.focus { - box-shadow: 0 0 0 0.2rem rgba(204, 204, 204, 0.5); } - .btn-outline-info.disabled, .btn-outline-info:disabled { - color: #ccc; - background-color: transparent; } - .btn-outline-info:not(:disabled):not(.disabled):active, .btn-outline-info:not(:disabled):not(.disabled).active, - .show > .btn-outline-info.dropdown-toggle { - color: #212529; - background-color: #ccc; - border-color: #ccc; } - .btn-outline-info:not(:disabled):not(.disabled):active:focus, .btn-outline-info:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-info.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(204, 204, 204, 0.5); } - -.btn-outline-warning { - color: #ffc107; - border-color: #ffc107; } - .btn-outline-warning:hover { - color: #212529; - background-color: #ffc107; - border-color: #ffc107; } - .btn-outline-warning:focus, .btn-outline-warning.focus { - box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); } - .btn-outline-warning.disabled, .btn-outline-warning:disabled { - color: #ffc107; - background-color: transparent; } - .btn-outline-warning:not(:disabled):not(.disabled):active, .btn-outline-warning:not(:disabled):not(.disabled).active, - .show > .btn-outline-warning.dropdown-toggle { - color: #212529; - background-color: #ffc107; - border-color: #ffc107; } - .btn-outline-warning:not(:disabled):not(.disabled):active:focus, .btn-outline-warning:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-warning.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(255, 193, 7, 0.5); } - -.btn-outline-danger { - color: #dc3545; - border-color: #dc3545; } - .btn-outline-danger:hover { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; } - .btn-outline-danger:focus, .btn-outline-danger.focus { - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); } - .btn-outline-danger.disabled, .btn-outline-danger:disabled { - color: #dc3545; - background-color: transparent; } - .btn-outline-danger:not(:disabled):not(.disabled):active, .btn-outline-danger:not(:disabled):not(.disabled).active, - .show > .btn-outline-danger.dropdown-toggle { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; } - .btn-outline-danger:not(:disabled):not(.disabled):active:focus, .btn-outline-danger:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-danger.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(220, 53, 69, 0.5); } - -.btn-outline-light { - color: #f3f3f3; - border-color: #f3f3f3; } - .btn-outline-light:hover { - color: #212529; - background-color: #f3f3f3; - border-color: #f3f3f3; } - .btn-outline-light:focus, .btn-outline-light.focus { - box-shadow: 0 0 0 0.2rem rgba(243, 243, 243, 0.5); } - .btn-outline-light.disabled, .btn-outline-light:disabled { - color: #f3f3f3; - background-color: transparent; } - .btn-outline-light:not(:disabled):not(.disabled):active, .btn-outline-light:not(:disabled):not(.disabled).active, - .show > .btn-outline-light.dropdown-toggle { - color: #212529; - background-color: #f3f3f3; - border-color: #f3f3f3; } - .btn-outline-light:not(:disabled):not(.disabled):active:focus, .btn-outline-light:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-light.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(243, 243, 243, 0.5); } - -.btn-outline-dark { - color: #151515; - border-color: #151515; } - .btn-outline-dark:hover { - color: #fff; - background-color: #151515; - border-color: #151515; } - .btn-outline-dark:focus, .btn-outline-dark.focus { - box-shadow: 0 0 0 0.2rem rgba(21, 21, 21, 0.5); } - .btn-outline-dark.disabled, .btn-outline-dark:disabled { - color: #151515; - background-color: transparent; } - .btn-outline-dark:not(:disabled):not(.disabled):active, .btn-outline-dark:not(:disabled):not(.disabled).active, - .show > .btn-outline-dark.dropdown-toggle { - color: #fff; - background-color: #151515; - border-color: #151515; } - .btn-outline-dark:not(:disabled):not(.disabled):active:focus, .btn-outline-dark:not(:disabled):not(.disabled).active:focus, - .show > .btn-outline-dark.dropdown-toggle:focus { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125), 0 0 0 0.2rem rgba(21, 21, 21, 0.5); } - -.btn-link { - font-weight: 200; - color: #12bbad; - text-decoration: none; } - .btn-link:hover { - color: #0b756c; - text-decoration: underline; } - .btn-link:focus, .btn-link.focus { - text-decoration: underline; - box-shadow: none; } - .btn-link:disabled, .btn-link.disabled { - color: #6c757d; - pointer-events: none; } - -.btn-lg, .btn-group-lg > .btn { - padding: 0.5rem 1rem; - font-size: 1.25rem; - line-height: 1.5; - border-radius: 0.3rem; } - -.btn-sm, .btn-group-sm > .btn { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - line-height: 1.5; - border-radius: 0.2rem; } - -.btn-block { - display: block; - width: 100%; } - .btn-block + .btn-block { - margin-top: 0.5rem; } - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; } - -.fade { - transition: opacity 0.15s linear; } - @media (prefers-reduced-motion: reduce) { - .fade { - transition: none; } } - .fade:not(.show) { - opacity: 0; } - -.collapse:not(.show) { - display: none; } - -.collapsing { - position: relative; - height: 0; - overflow: hidden; - transition: height 0.35s ease; } - @media (prefers-reduced-motion: reduce) { - .collapsing { - transition: none; } } - -.dropup, -.dropright, -.dropdown, -.dropleft { - position: relative; } - -.dropdown-toggle { - white-space: nowrap; } - .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid; - border-right: 0.3em solid transparent; - border-bottom: 0; - border-left: 0.3em solid transparent; } - .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 10rem; - padding: 0.5rem 0; - margin: 0.125rem 0 0; - font-size: 1rem; - color: #333; - text-align: left; - list-style: none; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 0.25rem; - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175); } - -.dropdown-menu-left { - right: auto; - left: 0; } - -.dropdown-menu-right { - right: 0; - left: auto; } - -@media (min-width: 576px) { - .dropdown-menu-sm-left { - right: auto; - left: 0; } - .dropdown-menu-sm-right { - right: 0; - left: auto; } } - -@media (min-width: 768px) { - .dropdown-menu-md-left { - right: auto; - left: 0; } - .dropdown-menu-md-right { - right: 0; - left: auto; } } - -@media (min-width: 992px) { - .dropdown-menu-lg-left { - right: auto; - left: 0; } - .dropdown-menu-lg-right { - right: 0; - left: auto; } } - -@media (min-width: 1200px) { - .dropdown-menu-xl-left { - right: auto; - left: 0; } - .dropdown-menu-xl-right { - right: 0; - left: auto; } } - -.dropup .dropdown-menu { - top: auto; - bottom: 100%; - margin-top: 0; - margin-bottom: 0.125rem; } - -.dropup .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0; - border-right: 0.3em solid transparent; - border-bottom: 0.3em solid; - border-left: 0.3em solid transparent; } - -.dropup .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropright .dropdown-menu { - top: 0; - right: auto; - left: 100%; - margin-top: 0; - margin-left: 0.125rem; } - -.dropright .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid transparent; - border-right: 0; - border-bottom: 0.3em solid transparent; - border-left: 0.3em solid; } - -.dropright .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropright .dropdown-toggle::after { - vertical-align: 0; } - -.dropleft .dropdown-menu { - top: 0; - right: 100%; - left: auto; - margin-top: 0; - margin-right: 0.125rem; } - -.dropleft .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; } - -.dropleft .dropdown-toggle::after { - display: none; } - -.dropleft .dropdown-toggle::before { - display: inline-block; - margin-right: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid transparent; - border-right: 0.3em solid; - border-bottom: 0.3em solid transparent; } - -.dropleft .dropdown-toggle:empty::after { - margin-left: 0; } - -.dropleft .dropdown-toggle::before { - vertical-align: 0; } - -.dropdown-menu[x-placement^="top"], .dropdown-menu[x-placement^="right"], .dropdown-menu[x-placement^="bottom"], .dropdown-menu[x-placement^="left"] { - right: auto; - bottom: auto; } - -.dropdown-divider { - height: 0; - margin: 0.75rem 0; - overflow: hidden; - border-top: 1px solid #e9ecef; } - -.dropdown-item { - display: block; - width: 100%; - padding: 0.25rem 1.5rem; - clear: both; - font-weight: 200; - color: #212529; - text-align: inherit; - white-space: nowrap; - background-color: transparent; - border: 0; } - .dropdown-item:hover, .dropdown-item:focus { - color: #16181b; - text-decoration: none; - background-color: #f8f9fa; } - .dropdown-item.active, .dropdown-item:active { - color: #fff; - text-decoration: none; - background-color: #12bbad; } - .dropdown-item.disabled, .dropdown-item:disabled { - color: #6c757d; - pointer-events: none; - background-color: transparent; } - -.dropdown-menu.show { - display: block; } - -.dropdown-header { - display: block; - padding: 0.5rem 1.5rem; - margin-bottom: 0; - font-size: 0.875rem; - color: #6c757d; - white-space: nowrap; } - -.dropdown-item-text { - display: block; - padding: 0.25rem 1.5rem; - color: #212529; } - -.btn-group, -.btn-group-vertical { - position: relative; - display: -ms-inline-flexbox; - display: inline-flex; - vertical-align: middle; } - .btn-group > .btn, - .btn-group-vertical > .btn { - position: relative; - -ms-flex: 1 1 auto; - flex: 1 1 auto; } - .btn-group > .btn:hover, - .btn-group-vertical > .btn:hover { - z-index: 1; } - .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active, - .btn-group-vertical > .btn:focus, - .btn-group-vertical > .btn:active, - .btn-group-vertical > .btn.active { - z-index: 1; } - -.btn-toolbar { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -ms-flex-pack: start; - justify-content: flex-start; } - .btn-toolbar .input-group { - width: auto; } - -.btn-group > .btn:not(:first-child), -.btn-group > .btn-group:not(:first-child) { - margin-left: -1px; } - -.btn-group > .btn:not(:last-child):not(.dropdown-toggle), -.btn-group > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - -.btn-group > .btn:not(:first-child), -.btn-group > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - -.dropdown-toggle-split { - padding-right: 0.5625rem; - padding-left: 0.5625rem; } - .dropdown-toggle-split::after, - .dropup .dropdown-toggle-split::after, - .dropright .dropdown-toggle-split::after { - margin-left: 0; } - .dropleft .dropdown-toggle-split::before { - margin-right: 0; } - -.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { - padding-right: 0.375rem; - padding-left: 0.375rem; } - -.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { - padding-right: 0.75rem; - padding-left: 0.75rem; } - -.btn-group.show .dropdown-toggle { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } - .btn-group.show .dropdown-toggle.btn-link { - box-shadow: none; } - -.btn-group-vertical { - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-align: start; - align-items: flex-start; - -ms-flex-pack: center; - justify-content: center; } - .btn-group-vertical > .btn, - .btn-group-vertical > .btn-group { - width: 100%; } - .btn-group-vertical > .btn:not(:first-child), - .btn-group-vertical > .btn-group:not(:first-child) { - margin-top: -1px; } - .btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), - .btn-group-vertical > .btn-group:not(:last-child) > .btn { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; } - .btn-group-vertical > .btn:not(:first-child), - .btn-group-vertical > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-top-right-radius: 0; } - -.btn-group-toggle > .btn, -.btn-group-toggle > .btn-group > .btn { - margin-bottom: 0; } - .btn-group-toggle > .btn input[type="radio"], - .btn-group-toggle > .btn input[type="checkbox"], - .btn-group-toggle > .btn-group > .btn input[type="radio"], - .btn-group-toggle > .btn-group > .btn input[type="checkbox"] { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; } - -.input-group { - position: relative; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -ms-flex-align: stretch; - align-items: stretch; - width: 100%; } - .input-group > .form-control, - .input-group > .form-control-plaintext, - .input-group > .custom-select, - .input-group > .custom-file { - position: relative; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - width: 1%; - margin-bottom: 0; } - .input-group > .form-control + .form-control, - .input-group > .form-control + .custom-select, - .input-group > .form-control + .custom-file, - .input-group > .form-control-plaintext + .form-control, - .input-group > .form-control-plaintext + .custom-select, - .input-group > .form-control-plaintext + .custom-file, - .input-group > .custom-select + .form-control, - .input-group > .custom-select + .custom-select, - .input-group > .custom-select + .custom-file, - .input-group > .custom-file + .form-control, - .input-group > .custom-file + .custom-select, - .input-group > .custom-file + .custom-file { - margin-left: -1px; } - .input-group > .form-control:focus, - .input-group > .custom-select:focus, - .input-group > .custom-file .custom-file-input:focus ~ .custom-file-label { - z-index: 3; } - .input-group > .custom-file .custom-file-input:focus { - z-index: 4; } - .input-group > .form-control:not(:last-child), - .input-group > .custom-select:not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - .input-group > .form-control:not(:first-child), - .input-group > .custom-select:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - .input-group > .custom-file { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; } - .input-group > .custom-file:not(:last-child) .custom-file-label, - .input-group > .custom-file:not(:last-child) .custom-file-label::after { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - .input-group > .custom-file:not(:first-child) .custom-file-label { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - -.input-group-prepend, -.input-group-append { - display: -ms-flexbox; - display: flex; } - .input-group-prepend .btn, - .input-group-append .btn { - position: relative; - z-index: 2; } - .input-group-prepend .btn:focus, - .input-group-append .btn:focus { - z-index: 3; } - .input-group-prepend .btn + .btn, - .input-group-prepend .btn + .input-group-text, - .input-group-prepend .input-group-text + .input-group-text, - .input-group-prepend .input-group-text + .btn, - .input-group-append .btn + .btn, - .input-group-append .btn + .input-group-text, - .input-group-append .input-group-text + .input-group-text, - .input-group-append .input-group-text + .btn { - margin-left: -1px; } - -.input-group-prepend { - margin-right: -1px; } - -.input-group-append { - margin-left: -1px; } - -.input-group-text { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - padding: 0.375rem 0.75rem; - margin-bottom: 0; - font-size: 1rem; - font-weight: 200; - line-height: 1.5; - color: #495057; - text-align: center; - white-space: nowrap; - background-color: #e9ecef; - border: 1px solid #ced4da; - border-radius: 0.25rem; } - .input-group-text input[type="radio"], - .input-group-text input[type="checkbox"] { - margin-top: 0; } - -.input-group-lg > .form-control:not(textarea), -.input-group-lg > .custom-select { - height: calc(1.5em + 1rem + 2px); } - -.input-group-lg > .form-control, -.input-group-lg > .custom-select, -.input-group-lg > .input-group-prepend > .input-group-text, -.input-group-lg > .input-group-append > .input-group-text, -.input-group-lg > .input-group-prepend > .btn, -.input-group-lg > .input-group-append > .btn { - padding: 0.5rem 1rem; - font-size: 1.25rem; - line-height: 1.5; - border-radius: 0.3rem; } - -.input-group-sm > .form-control:not(textarea), -.input-group-sm > .custom-select { - height: calc(1.5em + 0.5rem + 2px); } - -.input-group-sm > .form-control, -.input-group-sm > .custom-select, -.input-group-sm > .input-group-prepend > .input-group-text, -.input-group-sm > .input-group-append > .input-group-text, -.input-group-sm > .input-group-prepend > .btn, -.input-group-sm > .input-group-append > .btn { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - line-height: 1.5; - border-radius: 0.2rem; } - -.input-group-lg > .custom-select, -.input-group-sm > .custom-select { - padding-right: 1.75rem; } - -.input-group > .input-group-prepend > .btn, -.input-group > .input-group-prepend > .input-group-text, -.input-group > .input-group-append:not(:last-child) > .btn, -.input-group > .input-group-append:not(:last-child) > .input-group-text, -.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - -.input-group > .input-group-append > .btn, -.input-group > .input-group-append > .input-group-text, -.input-group > .input-group-prepend:not(:first-child) > .btn, -.input-group > .input-group-prepend:not(:first-child) > .input-group-text, -.input-group > .input-group-prepend:first-child > .btn:not(:first-child), -.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - -.custom-control { - position: relative; - display: block; - min-height: 1.5rem; - padding-left: 1.5rem; } - -.custom-control-inline { - display: -ms-inline-flexbox; - display: inline-flex; - margin-right: 1rem; } - -.custom-control-input { - position: absolute; - z-index: -1; - opacity: 0; } - .custom-control-input:checked ~ .custom-control-label::before { - color: #fff; - border-color: #12bbad; - background-color: #12bbad; - box-shadow: none; } - .custom-control-input:focus ~ .custom-control-label::before { - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .custom-control-input:focus:not(:checked) ~ .custom-control-label::before { - border-color: #5defe3; } - .custom-control-input:not(:disabled):active ~ .custom-control-label::before { - color: #fff; - background-color: #8cf4eb; - border-color: #8cf4eb; - box-shadow: none; } - .custom-control-input:disabled ~ .custom-control-label { - color: #6c757d; } - .custom-control-input:disabled ~ .custom-control-label::before { - background-color: #e9ecef; } - -.custom-control-label { - position: relative; - margin-bottom: 0; - vertical-align: top; } - .custom-control-label::before { - position: absolute; - top: 0.25rem; - left: -1.5rem; - display: block; - width: 1rem; - height: 1rem; - pointer-events: none; - content: ""; - background-color: #fff; - border: #adb5bd solid 1px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } - .custom-control-label::after { - position: absolute; - top: 0.25rem; - left: -1.5rem; - display: block; - width: 1rem; - height: 1rem; - content: ""; - background: no-repeat 50% / 50% 50%; } - -.custom-checkbox .custom-control-label::before { - border-radius: 0.25rem; } - -.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e"); } - -.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { - border-color: #12bbad; - background-color: #12bbad; - box-shadow: none; } - -.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e"); } - -.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before { - background-color: rgba(18, 187, 173, 0.5); } - -.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before { - background-color: rgba(18, 187, 173, 0.5); } - -.custom-radio .custom-control-label::before { - border-radius: 50%; } - -.custom-radio .custom-control-input:checked ~ .custom-control-label::after { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } - -.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before { - background-color: rgba(18, 187, 173, 0.5); } - -.custom-switch { - padding-left: 2.25rem; } - .custom-switch .custom-control-label::before { - left: -2.25rem; - width: 1.75rem; - pointer-events: all; - border-radius: 0.5rem; } - .custom-switch .custom-control-label::after { - top: calc(0.25rem + 2px); - left: calc(-2.25rem + 2px); - width: calc(1rem - 4px); - height: calc(1rem - 4px); - background-color: #adb5bd; - border-radius: 0.5rem; - transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .custom-switch .custom-control-label::after { - transition: none; } } - .custom-switch .custom-control-input:checked ~ .custom-control-label::after { - background-color: #fff; - transform: translateX(0.75rem); } - .custom-switch .custom-control-input:disabled:checked ~ .custom-control-label::before { - background-color: rgba(18, 187, 173, 0.5); } - -.custom-select { - display: inline-block; - width: 100%; - height: calc(1.5em + 0.75rem + 2px); - padding: 0.375rem 1.75rem 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 200; - line-height: 1.5; - color: #495057; - vertical-align: middle; - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px; - background-color: #fff; - border: 1px solid #ced4da; - border-radius: 0.25rem; - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; } - .custom-select:focus { - border-color: #5defe3; - outline: 0; - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .custom-select:focus::-ms-value { - color: #495057; - background-color: #fff; } - .custom-select[multiple], .custom-select[size]:not([size="1"]) { - height: auto; - padding-right: 0.75rem; - background-image: none; } - .custom-select:disabled { - color: #6c757d; - background-color: #e9ecef; } - .custom-select::-ms-expand { - display: none; } - -.custom-select-sm { - height: calc(1.5em + 0.5rem + 2px); - padding-top: 0.25rem; - padding-bottom: 0.25rem; - padding-left: 0.5rem; - font-size: 0.875rem; } - -.custom-select-lg { - height: calc(1.5em + 1rem + 2px); - padding-top: 0.5rem; - padding-bottom: 0.5rem; - padding-left: 1rem; - font-size: 1.25rem; } - -.custom-file { - position: relative; - display: inline-block; - width: 100%; - height: calc(1.5em + 0.75rem + 2px); - margin-bottom: 0; } - -.custom-file-input { - position: relative; - z-index: 2; - width: 100%; - height: calc(1.5em + 0.75rem + 2px); - margin: 0; - opacity: 0; } - .custom-file-input:focus ~ .custom-file-label { - border-color: #5defe3; - box-shadow: 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .custom-file-input:disabled ~ .custom-file-label { - background-color: #e9ecef; } - .custom-file-input:lang(en) ~ .custom-file-label::after { - content: "Browse"; } - .custom-file-input ~ .custom-file-label[data-browse]::after { - content: attr(data-browse); } - -.custom-file-label { - position: absolute; - top: 0; - right: 0; - left: 0; - z-index: 1; - height: calc(1.5em + 0.75rem + 2px); - padding: 0.375rem 0.75rem; - font-weight: 200; - line-height: 1.5; - color: #495057; - background-color: #fff; - border: 1px solid #ced4da; - border-radius: 0.25rem; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } - .custom-file-label::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - z-index: 3; - display: block; - height: calc(1.5em + 0.75rem); - padding: 0.375rem 0.75rem; - line-height: 1.5; - color: #495057; - content: "Browse"; - background-color: #e9ecef; - border-left: inherit; - border-radius: 0 0.25rem 0.25rem 0; } - -.custom-range { - width: 100%; - height: calc(1rem + 0.4rem); - padding: 0; - background-color: transparent; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; } - .custom-range:focus { - outline: none; } - .custom-range:focus::-webkit-slider-thumb { - box-shadow: 0 0 0 1px white, 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .custom-range:focus::-moz-range-thumb { - box-shadow: 0 0 0 1px white, 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .custom-range:focus::-ms-thumb { - box-shadow: 0 0 0 1px white, 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - .custom-range::-moz-focus-outer { - border: 0; } - .custom-range::-webkit-slider-thumb { - width: 1rem; - height: 1rem; - margin-top: -0.25rem; - background-color: #12bbad; - border: 0; - border-radius: 1rem; - box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1); - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - -webkit-appearance: none; - appearance: none; } - @media (prefers-reduced-motion: reduce) { - .custom-range::-webkit-slider-thumb { - transition: none; } } - .custom-range::-webkit-slider-thumb:active { - background-color: #8cf4eb; } - .custom-range::-webkit-slider-runnable-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: #dee2e6; - border-color: transparent; - border-radius: 1rem; - box-shadow: inset 0 0.25rem 0.25rem rgba(0, 0, 0, 0.1); } - .custom-range::-moz-range-thumb { - width: 1rem; - height: 1rem; - background-color: #12bbad; - border: 0; - border-radius: 1rem; - box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1); - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - -moz-appearance: none; - appearance: none; } - @media (prefers-reduced-motion: reduce) { - .custom-range::-moz-range-thumb { - transition: none; } } - .custom-range::-moz-range-thumb:active { - background-color: #8cf4eb; } - .custom-range::-moz-range-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: #dee2e6; - border-color: transparent; - border-radius: 1rem; - box-shadow: inset 0 0.25rem 0.25rem rgba(0, 0, 0, 0.1); } - .custom-range::-ms-thumb { - width: 1rem; - height: 1rem; - margin-top: 0; - margin-right: 0.2rem; - margin-left: 0.2rem; - background-color: #12bbad; - border: 0; - border-radius: 1rem; - box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.1); - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - appearance: none; } - @media (prefers-reduced-motion: reduce) { - .custom-range::-ms-thumb { - transition: none; } } - .custom-range::-ms-thumb:active { - background-color: #8cf4eb; } - .custom-range::-ms-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: transparent; - border-color: transparent; - border-width: 0.5rem; - box-shadow: inset 0 0.25rem 0.25rem rgba(0, 0, 0, 0.1); } - .custom-range::-ms-fill-lower { - background-color: #dee2e6; - border-radius: 1rem; } - .custom-range::-ms-fill-upper { - margin-right: 15px; - background-color: #dee2e6; - border-radius: 1rem; } - .custom-range:disabled::-webkit-slider-thumb { - background-color: #adb5bd; } - .custom-range:disabled::-webkit-slider-runnable-track { - cursor: default; } - .custom-range:disabled::-moz-range-thumb { - background-color: #adb5bd; } - .custom-range:disabled::-moz-range-track { - cursor: default; } - .custom-range:disabled::-ms-thumb { - background-color: #adb5bd; } - -.custom-control-label::before, -.custom-file-label, -.custom-select { - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .custom-control-label::before, - .custom-file-label, - .custom-select { - transition: none; } } - -.nav { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - padding-left: 0; - margin-bottom: 0; - list-style: none; } - -.nav-link { - display: block; - padding: 0.5rem 1rem; } - .nav-link:hover, .nav-link:focus { - text-decoration: none; } - .nav-link.disabled { - color: #6c757d; - pointer-events: none; - cursor: default; } - -.nav-tabs { - border-bottom: 1px solid #dee2e6; } - .nav-tabs .nav-item { - margin-bottom: -1px; } - .nav-tabs .nav-link { - border: 1px solid transparent; - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; } - .nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { - border-color: #e9ecef #e9ecef #dee2e6; } - .nav-tabs .nav-link.disabled { - color: #6c757d; - background-color: transparent; - border-color: transparent; } - .nav-tabs .nav-link.active, - .nav-tabs .nav-item.show .nav-link { - color: #495057; - background-color: white; - border-color: #dee2e6 #dee2e6 white; } - .nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; } - -.nav-pills .nav-link { - border-radius: 0.25rem; } - -.nav-pills .nav-link.active, -.nav-pills .show > .nav-link { - color: #fff; - background-color: #12bbad; } - -.nav-fill .nav-item { - -ms-flex: 1 1 auto; - flex: 1 1 auto; - text-align: center; } - -.nav-justified .nav-item { - -ms-flex-preferred-size: 0; - flex-basis: 0; - -ms-flex-positive: 1; - flex-grow: 1; - text-align: center; } - -.tab-content > .tab-pane { - display: none; } - -.tab-content > .active { - display: block; } - -.navbar { - position: relative; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: justify; - justify-content: space-between; - padding: 0.75rem 1.5rem; } - .navbar > .container, - .navbar > .container-fluid { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: justify; - justify-content: space-between; } - -.navbar-brand { - display: inline-block; - padding-top: 0.3125rem; - padding-bottom: 0.3125rem; - margin-right: 1.5rem; - font-size: 1.25rem; - line-height: inherit; - white-space: nowrap; } - .navbar-brand:hover, .navbar-brand:focus { - text-decoration: none; } - -.navbar-nav { - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; - list-style: none; } - .navbar-nav .nav-link { - padding-right: 0; - padding-left: 0; } - .navbar-nav .dropdown-menu { - position: static; - float: none; } - -.navbar-text { - display: inline-block; - padding-top: 0.5rem; - padding-bottom: 0.5rem; } - -.navbar-collapse { - -ms-flex-preferred-size: 100%; - flex-basis: 100%; - -ms-flex-positive: 1; - flex-grow: 1; - -ms-flex-align: center; - align-items: center; } - -.navbar-toggler { - padding: 0.25rem 0.75rem; - font-size: 1.25rem; - line-height: 1; - background-color: transparent; - border: 1px solid transparent; - border-radius: 0.25rem; } - .navbar-toggler:hover, .navbar-toggler:focus { - text-decoration: none; } - -.navbar-toggler-icon { - display: inline-block; - width: 1.5em; - height: 1.5em; - vertical-align: middle; - content: ""; - background: no-repeat center center; - background-size: 100% 100%; } - -@media (max-width: 575.98px) { - .navbar-expand-sm > .container, - .navbar-expand-sm > .container-fluid { - padding-right: 0; - padding-left: 0; } } - -@media (min-width: 576px) { - .navbar-expand-sm { - -ms-flex-flow: row nowrap; - flex-flow: row nowrap; - -ms-flex-pack: start; - justify-content: flex-start; } - .navbar-expand-sm .navbar-nav { - -ms-flex-direction: row; - flex-direction: row; } - .navbar-expand-sm .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-sm .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; } - .navbar-expand-sm > .container, - .navbar-expand-sm > .container-fluid { - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; } - .navbar-expand-sm .navbar-collapse { - display: -ms-flexbox !important; - display: flex !important; - -ms-flex-preferred-size: auto; - flex-basis: auto; } - .navbar-expand-sm .navbar-toggler { - display: none; } } - -@media (max-width: 767.98px) { - .navbar-expand-md > .container, - .navbar-expand-md > .container-fluid { - padding-right: 0; - padding-left: 0; } } - -@media (min-width: 768px) { - .navbar-expand-md { - -ms-flex-flow: row nowrap; - flex-flow: row nowrap; - -ms-flex-pack: start; - justify-content: flex-start; } - .navbar-expand-md .navbar-nav { - -ms-flex-direction: row; - flex-direction: row; } - .navbar-expand-md .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-md .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; } - .navbar-expand-md > .container, - .navbar-expand-md > .container-fluid { - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; } - .navbar-expand-md .navbar-collapse { - display: -ms-flexbox !important; - display: flex !important; - -ms-flex-preferred-size: auto; - flex-basis: auto; } - .navbar-expand-md .navbar-toggler { - display: none; } } - -@media (max-width: 991.98px) { - .navbar-expand-lg > .container, - .navbar-expand-lg > .container-fluid { - padding-right: 0; - padding-left: 0; } } - -@media (min-width: 992px) { - .navbar-expand-lg { - -ms-flex-flow: row nowrap; - flex-flow: row nowrap; - -ms-flex-pack: start; - justify-content: flex-start; } - .navbar-expand-lg .navbar-nav { - -ms-flex-direction: row; - flex-direction: row; } - .navbar-expand-lg .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-lg .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; } - .navbar-expand-lg > .container, - .navbar-expand-lg > .container-fluid { - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; } - .navbar-expand-lg .navbar-collapse { - display: -ms-flexbox !important; - display: flex !important; - -ms-flex-preferred-size: auto; - flex-basis: auto; } - .navbar-expand-lg .navbar-toggler { - display: none; } } - -@media (max-width: 1199.98px) { - .navbar-expand-xl > .container, - .navbar-expand-xl > .container-fluid { - padding-right: 0; - padding-left: 0; } } - -@media (min-width: 1200px) { - .navbar-expand-xl { - -ms-flex-flow: row nowrap; - flex-flow: row nowrap; - -ms-flex-pack: start; - justify-content: flex-start; } - .navbar-expand-xl .navbar-nav { - -ms-flex-direction: row; - flex-direction: row; } - .navbar-expand-xl .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand-xl .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; } - .navbar-expand-xl > .container, - .navbar-expand-xl > .container-fluid { - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; } - .navbar-expand-xl .navbar-collapse { - display: -ms-flexbox !important; - display: flex !important; - -ms-flex-preferred-size: auto; - flex-basis: auto; } - .navbar-expand-xl .navbar-toggler { - display: none; } } - -.navbar-expand { - -ms-flex-flow: row nowrap; - flex-flow: row nowrap; - -ms-flex-pack: start; - justify-content: flex-start; } - .navbar-expand > .container, - .navbar-expand > .container-fluid { - padding-right: 0; - padding-left: 0; } - .navbar-expand .navbar-nav { - -ms-flex-direction: row; - flex-direction: row; } - .navbar-expand .navbar-nav .dropdown-menu { - position: absolute; } - .navbar-expand .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; } - .navbar-expand > .container, - .navbar-expand > .container-fluid { - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; } - .navbar-expand .navbar-collapse { - display: -ms-flexbox !important; - display: flex !important; - -ms-flex-preferred-size: auto; - flex-basis: auto; } - .navbar-expand .navbar-toggler { - display: none; } - -.navbar-light .navbar-brand { - color: rgba(0, 0, 0, 0.9); } - .navbar-light .navbar-brand:hover, .navbar-light .navbar-brand:focus { - color: rgba(0, 0, 0, 0.9); } - -.navbar-light .navbar-nav .nav-link { - color: rgba(0, 0, 0, 0.5); } - .navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus { - color: rgba(0, 0, 0, 0.7); } - .navbar-light .navbar-nav .nav-link.disabled { - color: rgba(0, 0, 0, 0.3); } - -.navbar-light .navbar-nav .show > .nav-link, -.navbar-light .navbar-nav .active > .nav-link, -.navbar-light .navbar-nav .nav-link.show, -.navbar-light .navbar-nav .nav-link.active { - color: rgba(0, 0, 0, 0.9); } - -.navbar-light .navbar-toggler { - color: rgba(0, 0, 0, 0.5); - border-color: rgba(0, 0, 0, 0.1); } - -.navbar-light .navbar-toggler-icon { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } - -.navbar-light .navbar-text { - color: rgba(0, 0, 0, 0.5); } - .navbar-light .navbar-text a { - color: rgba(0, 0, 0, 0.9); } - .navbar-light .navbar-text a:hover, .navbar-light .navbar-text a:focus { - color: rgba(0, 0, 0, 0.9); } - -.navbar-dark .navbar-brand { - color: #fff; } - .navbar-dark .navbar-brand:hover, .navbar-dark .navbar-brand:focus { - color: #fff; } - -.navbar-dark .navbar-nav .nav-link { - color: rgba(255, 255, 255, 0.5); } - .navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus { - color: rgba(255, 255, 255, 0.75); } - .navbar-dark .navbar-nav .nav-link.disabled { - color: rgba(255, 255, 255, 0.25); } - -.navbar-dark .navbar-nav .show > .nav-link, -.navbar-dark .navbar-nav .active > .nav-link, -.navbar-dark .navbar-nav .nav-link.show, -.navbar-dark .navbar-nav .nav-link.active { - color: #fff; } - -.navbar-dark .navbar-toggler { - color: rgba(255, 255, 255, 0.5); - border-color: rgba(255, 255, 255, 0.1); } - -.navbar-dark .navbar-toggler-icon { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); } - -.navbar-dark .navbar-text { - color: rgba(255, 255, 255, 0.5); } - .navbar-dark .navbar-text a { - color: #fff; } - .navbar-dark .navbar-text a:hover, .navbar-dark .navbar-text a:focus { - color: #fff; } - -.card { - position: relative; - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; - min-width: 0; - word-wrap: break-word; - background-color: #fff; - background-clip: border-box; - border: 1px solid rgba(0, 0, 0, 0.125); - border-radius: 0.25rem; } - .card > hr { - margin-right: 0; - margin-left: 0; } - .card > .list-group:first-child .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; } - .card > .list-group:last-child .list-group-item:last-child { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; } - -.card-body { - -ms-flex: 1 1 auto; - flex: 1 1 auto; - padding: 1.25rem; } - -.card-title { - margin-bottom: 0.75rem; } - -.card-subtitle { - margin-top: -0.375rem; - margin-bottom: 0; } - -.card-text:last-child { - margin-bottom: 0; } - -.card-link:hover { - text-decoration: none; } - -.card-link + .card-link { - margin-left: 1.25rem; } - -.card-header { - padding: 0.75rem 1.25rem; - margin-bottom: 0; - background-color: rgba(0, 0, 0, 0.03); - border-bottom: 1px solid rgba(0, 0, 0, 0.125); } - .card-header:first-child { - border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0; } - .card-header + .list-group .list-group-item:first-child { - border-top: 0; } - -.card-footer { - padding: 0.75rem 1.25rem; - background-color: rgba(0, 0, 0, 0.03); - border-top: 1px solid rgba(0, 0, 0, 0.125); } - .card-footer:last-child { - border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px); } - -.card-header-tabs { - margin-right: -0.625rem; - margin-bottom: -0.75rem; - margin-left: -0.625rem; - border-bottom: 0; } - -.card-header-pills { - margin-right: -0.625rem; - margin-left: -0.625rem; } - -.card-img-overlay { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - padding: 1.25rem; } - -.card-img { - width: 100%; - border-radius: calc(0.25rem - 1px); } - -.card-img-top { - width: 100%; - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); } - -.card-img-bottom { - width: 100%; - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); } - -.card-deck { - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; } - .card-deck .card { - margin-bottom: 15px; } - @media (min-width: 576px) { - .card-deck { - -ms-flex-flow: row wrap; - flex-flow: row wrap; - margin-right: -15px; - margin-left: -15px; } - .card-deck .card { - display: -ms-flexbox; - display: flex; - -ms-flex: 1 0 0%; - flex: 1 0 0%; - -ms-flex-direction: column; - flex-direction: column; - margin-right: 15px; - margin-bottom: 0; - margin-left: 15px; } } - -.card-group { - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; } - .card-group > .card { - margin-bottom: 15px; } - @media (min-width: 576px) { - .card-group { - -ms-flex-flow: row wrap; - flex-flow: row wrap; } - .card-group > .card { - -ms-flex: 1 0 0%; - flex: 1 0 0%; - margin-bottom: 0; } - .card-group > .card + .card { - margin-left: 0; - border-left: 0; } - .card-group > .card:not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; } - .card-group > .card:not(:last-child) .card-img-top, - .card-group > .card:not(:last-child) .card-header { - border-top-right-radius: 0; } - .card-group > .card:not(:last-child) .card-img-bottom, - .card-group > .card:not(:last-child) .card-footer { - border-bottom-right-radius: 0; } - .card-group > .card:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; } - .card-group > .card:not(:first-child) .card-img-top, - .card-group > .card:not(:first-child) .card-header { - border-top-left-radius: 0; } - .card-group > .card:not(:first-child) .card-img-bottom, - .card-group > .card:not(:first-child) .card-footer { - border-bottom-left-radius: 0; } } - -.card-columns .card { - margin-bottom: 0.75rem; } - -@media (min-width: 576px) { - .card-columns { - column-count: 3; - column-gap: 1.25rem; - orphans: 1; - widows: 1; } - .card-columns .card { - display: inline-block; - width: 100%; } } - -.accordion > .card { - overflow: hidden; } - .accordion > .card:not(:first-of-type) .card-header:first-child { - border-radius: 0; } - .accordion > .card:not(:first-of-type):not(:last-of-type) { - border-bottom: 0; - border-radius: 0; } - .accordion > .card:first-of-type { - border-bottom: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; } - .accordion > .card:last-of-type { - border-top-left-radius: 0; - border-top-right-radius: 0; } - .accordion > .card .card-header { - margin-bottom: -1px; } - -.breadcrumb { - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - padding: 0.75rem 1rem; - margin-bottom: 1rem; - list-style: none; - background-color: #e9ecef; - border-radius: 0.25rem; } - -.breadcrumb-item + .breadcrumb-item { - padding-left: 0.5rem; } - .breadcrumb-item + .breadcrumb-item::before { - display: inline-block; - padding-right: 0.5rem; - color: #6c757d; - content: "/"; } - -.breadcrumb-item + .breadcrumb-item:hover::before { - text-decoration: underline; } - -.breadcrumb-item + .breadcrumb-item:hover::before { - text-decoration: none; } - -.breadcrumb-item.active { - color: #6c757d; } - -.pagination { - display: -ms-flexbox; - display: flex; - padding-left: 0; - list-style: none; - border-radius: 0.25rem; } - -.page-link { - position: relative; - display: block; - padding: 0.5rem 0.75rem; - margin-left: -1px; - line-height: 1.25; - color: #12bbad; - background-color: #fff; - border: 1px solid #dee2e6; } - .page-link:hover { - z-index: 2; - color: #0b756c; - text-decoration: none; - background-color: #e9ecef; - border-color: #dee2e6; } - .page-link:focus { - z-index: 2; - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(18, 187, 173, 0.25); } - -.page-item:first-child .page-link { - margin-left: 0; - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; } - -.page-item:last-child .page-link { - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; } - -.page-item.active .page-link { - z-index: 1; - color: #fff; - background-color: #12bbad; - border-color: #12bbad; } - -.page-item.disabled .page-link { - color: #6c757d; - pointer-events: none; - cursor: auto; - background-color: #fff; - border-color: #dee2e6; } - -.pagination-lg .page-link { - padding: 0.75rem 1.5rem; - font-size: 1.25rem; - line-height: 1.5; } - -.pagination-lg .page-item:first-child .page-link { - border-top-left-radius: 0.3rem; - border-bottom-left-radius: 0.3rem; } - -.pagination-lg .page-item:last-child .page-link { - border-top-right-radius: 0.3rem; - border-bottom-right-radius: 0.3rem; } - -.pagination-sm .page-link { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - line-height: 1.5; } - -.pagination-sm .page-item:first-child .page-link { - border-top-left-radius: 0.2rem; - border-bottom-left-radius: 0.2rem; } - -.pagination-sm .page-item:last-child .page-link { - border-top-right-radius: 0.2rem; - border-bottom-right-radius: 0.2rem; } - -.badge { - display: inline-block; - padding: 0.25em 0.4em; - font-size: 75%; - font-weight: 700; - line-height: 1; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: 0.25rem; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .badge { - transition: none; } } - a.badge:hover, a.badge:focus { - text-decoration: none; } - .badge:empty { - display: none; } - -.btn .badge { - position: relative; - top: -1px; } - -.badge-pill { - padding-right: 0.6em; - padding-left: 0.6em; - border-radius: 10rem; } - -.badge-primary { - color: #fff; - background-color: #12bbad; } - a.badge-primary:hover, a.badge-primary:focus { - color: #fff; - background-color: #0e8c82; } - a.badge-primary:focus, a.badge-primary.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(18, 187, 173, 0.5); } - -.badge-secondary { - color: #fff; - background-color: #4f70ce; } - a.badge-secondary:hover, a.badge-secondary:focus { - color: #fff; - background-color: #3355b7; } - a.badge-secondary:focus, a.badge-secondary.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(79, 112, 206, 0.5); } - -.badge-success { - color: #fff; - background-color: #28a745; } - a.badge-success:hover, a.badge-success:focus { - color: #fff; - background-color: #1e7e34; } - a.badge-success:focus, a.badge-success.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); } - -.badge-info { - color: #212529; - background-color: #ccc; } - a.badge-info:hover, a.badge-info:focus { - color: #212529; - background-color: #b3b3b3; } - a.badge-info:focus, a.badge-info.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(204, 204, 204, 0.5); } - -.badge-warning { - color: #212529; - background-color: #ffc107; } - a.badge-warning:hover, a.badge-warning:focus { - color: #212529; - background-color: #d39e00; } - a.badge-warning:focus, a.badge-warning.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); } - -.badge-danger { - color: #fff; - background-color: #dc3545; } - a.badge-danger:hover, a.badge-danger:focus { - color: #fff; - background-color: #bd2130; } - a.badge-danger:focus, a.badge-danger.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); } - -.badge-light { - color: #212529; - background-color: #f3f3f3; } - a.badge-light:hover, a.badge-light:focus { - color: #212529; - background-color: #dadada; } - a.badge-light:focus, a.badge-light.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(243, 243, 243, 0.5); } - -.badge-dark { - color: #fff; - background-color: #151515; } - a.badge-dark:hover, a.badge-dark:focus { - color: #fff; - background-color: black; } - a.badge-dark:focus, a.badge-dark.focus { - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(21, 21, 21, 0.5); } - -.jumbotron { - padding: 2rem 1rem; - margin-bottom: 2rem; - background-color: #e9ecef; - border-radius: 0.3rem; } - @media (min-width: 576px) { - .jumbotron { - padding: 4rem 2rem; } } - -.jumbotron-fluid { - padding-right: 0; - padding-left: 0; - border-radius: 0; } - -.alert { - position: relative; - padding: 0.75rem 1.25rem; - margin-bottom: 1rem; - border: 1px solid transparent; - border-radius: 0.25rem; } - -.alert-heading { - color: inherit; } - -.alert-link { - font-weight: 700; } - -.alert-dismissible { - padding-right: 4rem; } - .alert-dismissible .close { - position: absolute; - top: 0; - right: 0; - padding: 0.75rem 1.25rem; - color: inherit; } - -.alert-primary { - color: #09615a; - background-color: #d0f1ef; - border-color: #bdece8; } - .alert-primary hr { - border-top-color: #a9e6e1; } - .alert-primary .alert-link { - color: #05322f; } - -.alert-secondary { - color: #293a6b; - background-color: #dce2f5; - border-color: #ced7f1; } - .alert-secondary hr { - border-top-color: #bac7eb; } - .alert-secondary .alert-link { - color: #1b2646; } - -.alert-success { - color: #155724; - background-color: #d4edda; - border-color: #c3e6cb; } - .alert-success hr { - border-top-color: #b1dfbb; } - .alert-success .alert-link { - color: #0b2e13; } - -.alert-info { - color: #6a6a6a; - background-color: whitesmoke; - border-color: #f1f1f1; } - .alert-info hr { - border-top-color: #e4e4e4; } - .alert-info .alert-link { - color: #515151; } - -.alert-warning { - color: #856404; - background-color: #fff3cd; - border-color: #ffeeba; } - .alert-warning hr { - border-top-color: #ffe8a1; } - .alert-warning .alert-link { - color: #533f03; } - -.alert-danger { - color: #721c24; - background-color: #f8d7da; - border-color: #f5c6cb; } - .alert-danger hr { - border-top-color: #f1b0b7; } - .alert-danger .alert-link { - color: #491217; } - -.alert-light { - color: #7e7e7e; - background-color: #fdfdfd; - border-color: #fcfcfc; } - .alert-light hr { - border-top-color: #efefef; } - .alert-light .alert-link { - color: #656565; } - -.alert-dark { - color: #0b0b0b; - background-color: #d0d0d0; - border-color: #bdbdbd; } - .alert-dark hr { - border-top-color: #b0b0b0; } - .alert-dark .alert-link { - color: black; } - -@keyframes progress-bar-stripes { - from { - background-position: 1rem 0; } - to { - background-position: 0 0; } } - -.progress { - display: -ms-flexbox; - display: flex; - height: 1rem; - overflow: hidden; - font-size: 0.75rem; - background-color: #e9ecef; - border-radius: 0.25rem; - box-shadow: inset 0 0.1rem 0.1rem rgba(0, 0, 0, 0.1); } - -.progress-bar { - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-pack: center; - justify-content: center; - color: #fff; - text-align: center; - white-space: nowrap; - background-color: #12bbad; - transition: width 0.6s ease; } - @media (prefers-reduced-motion: reduce) { - .progress-bar { - transition: none; } } - -.progress-bar-striped { - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 1rem 1rem; } - -.progress-bar-animated { - animation: progress-bar-stripes 1s linear infinite; } - @media (prefers-reduced-motion: reduce) { - .progress-bar-animated { - animation: none; } } - -.media { - display: -ms-flexbox; - display: flex; - -ms-flex-align: start; - align-items: flex-start; } - -.media-body { - -ms-flex: 1; - flex: 1; } - -.list-group { - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; } - -.list-group-item-action { - width: 100%; - color: #495057; - text-align: inherit; } - .list-group-item-action:hover, .list-group-item-action:focus { - z-index: 1; - color: #495057; - text-decoration: none; - background-color: #f8f9fa; } - .list-group-item-action:active { - color: #333; - background-color: #e9ecef; } - -.list-group-item { - position: relative; - display: block; - padding: 0.75rem 1.25rem; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid rgba(0, 0, 0, 0.125); } - .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; } - .list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; } - .list-group-item.disabled, .list-group-item:disabled { - color: #6c757d; - pointer-events: none; - background-color: #fff; } - .list-group-item.active { - z-index: 2; - color: #fff; - background-color: #12bbad; - border-color: #12bbad; } - -.list-group-horizontal { - -ms-flex-direction: row; - flex-direction: row; } - .list-group-horizontal .list-group-item { - margin-right: -1px; - margin-bottom: 0; } - .list-group-horizontal .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; } - .list-group-horizontal .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; } - -@media (min-width: 576px) { - .list-group-horizontal-sm { - -ms-flex-direction: row; - flex-direction: row; } - .list-group-horizontal-sm .list-group-item { - margin-right: -1px; - margin-bottom: 0; } - .list-group-horizontal-sm .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; } - .list-group-horizontal-sm .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; } } - -@media (min-width: 768px) { - .list-group-horizontal-md { - -ms-flex-direction: row; - flex-direction: row; } - .list-group-horizontal-md .list-group-item { - margin-right: -1px; - margin-bottom: 0; } - .list-group-horizontal-md .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; } - .list-group-horizontal-md .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; } } - -@media (min-width: 992px) { - .list-group-horizontal-lg { - -ms-flex-direction: row; - flex-direction: row; } - .list-group-horizontal-lg .list-group-item { - margin-right: -1px; - margin-bottom: 0; } - .list-group-horizontal-lg .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; } - .list-group-horizontal-lg .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; } } - -@media (min-width: 1200px) { - .list-group-horizontal-xl { - -ms-flex-direction: row; - flex-direction: row; } - .list-group-horizontal-xl .list-group-item { - margin-right: -1px; - margin-bottom: 0; } - .list-group-horizontal-xl .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; } - .list-group-horizontal-xl .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; } } - -.list-group-flush .list-group-item { - border-right: 0; - border-left: 0; - border-radius: 0; } - .list-group-flush .list-group-item:last-child { - margin-bottom: -1px; } - -.list-group-flush:first-child .list-group-item:first-child { - border-top: 0; } - -.list-group-flush:last-child .list-group-item:last-child { - margin-bottom: 0; - border-bottom: 0; } - -.list-group-item-primary { - color: #09615a; - background-color: #bdece8; } - .list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus { - color: #09615a; - background-color: #a9e6e1; } - .list-group-item-primary.list-group-item-action.active { - color: #fff; - background-color: #09615a; - border-color: #09615a; } - -.list-group-item-secondary { - color: #293a6b; - background-color: #ced7f1; } - .list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus { - color: #293a6b; - background-color: #bac7eb; } - .list-group-item-secondary.list-group-item-action.active { - color: #fff; - background-color: #293a6b; - border-color: #293a6b; } - -.list-group-item-success { - color: #155724; - background-color: #c3e6cb; } - .list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus { - color: #155724; - background-color: #b1dfbb; } - .list-group-item-success.list-group-item-action.active { - color: #fff; - background-color: #155724; - border-color: #155724; } - -.list-group-item-info { - color: #6a6a6a; - background-color: #f1f1f1; } - .list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus { - color: #6a6a6a; - background-color: #e4e4e4; } - .list-group-item-info.list-group-item-action.active { - color: #fff; - background-color: #6a6a6a; - border-color: #6a6a6a; } - -.list-group-item-warning { - color: #856404; - background-color: #ffeeba; } - .list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus { - color: #856404; - background-color: #ffe8a1; } - .list-group-item-warning.list-group-item-action.active { - color: #fff; - background-color: #856404; - border-color: #856404; } - -.list-group-item-danger { - color: #721c24; - background-color: #f5c6cb; } - .list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus { - color: #721c24; - background-color: #f1b0b7; } - .list-group-item-danger.list-group-item-action.active { - color: #fff; - background-color: #721c24; - border-color: #721c24; } - -.list-group-item-light { - color: #7e7e7e; - background-color: #fcfcfc; } - .list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus { - color: #7e7e7e; - background-color: #efefef; } - .list-group-item-light.list-group-item-action.active { - color: #fff; - background-color: #7e7e7e; - border-color: #7e7e7e; } - -.list-group-item-dark { - color: #0b0b0b; - background-color: #bdbdbd; } - .list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus { - color: #0b0b0b; - background-color: #b0b0b0; } - .list-group-item-dark.list-group-item-action.active { - color: #fff; - background-color: #0b0b0b; - border-color: #0b0b0b; } - -.close { - float: right; - font-size: 1.5rem; - font-weight: 700; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - opacity: .5; } - .close:hover { - color: #000; - text-decoration: none; } - .close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus { - opacity: .75; } - -button.close { - padding: 0; - background-color: transparent; - border: 0; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; } - -a.close.disabled { - pointer-events: none; } - -.toast { - max-width: 350px; - overflow: hidden; - font-size: 0.875rem; - background-color: rgba(255, 255, 255, 0.85); - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.1); - box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1); - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - opacity: 0; - border-radius: 0.25rem; } - .toast:not(:last-child) { - margin-bottom: 0.75rem; } - .toast.showing { - opacity: 1; } - .toast.show { - display: block; - opacity: 1; } - .toast.hide { - display: none; } - -.toast-header { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - padding: 0.25rem 0.75rem; - color: #6c757d; - background-color: rgba(255, 255, 255, 0.85); - background-clip: padding-box; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); } - -.toast-body { - padding: 0.75rem; } - -.modal-open { - overflow: hidden; } - .modal-open .modal { - overflow-x: hidden; - overflow-y: auto; } - -.modal { - position: fixed; - top: 0; - left: 0; - z-index: 1050; - display: none; - width: 100%; - height: 100%; - overflow: hidden; - outline: 0; } - -.modal-dialog { - position: relative; - width: auto; - margin: 0.5rem; - pointer-events: none; } - .modal.fade .modal-dialog { - transition: transform 0.3s ease-out; - transform: translate(0, -50px); } - @media (prefers-reduced-motion: reduce) { - .modal.fade .modal-dialog { - transition: none; } } - .modal.show .modal-dialog { - transform: none; } - -.modal-dialog-scrollable { - display: -ms-flexbox; - display: flex; - max-height: calc(100% - 1rem); } - .modal-dialog-scrollable .modal-content { - max-height: calc(100vh - 1rem); - overflow: hidden; } - .modal-dialog-scrollable .modal-header, - .modal-dialog-scrollable .modal-footer { - -ms-flex-negative: 0; - flex-shrink: 0; } - .modal-dialog-scrollable .modal-body { - overflow-y: auto; } - -.modal-dialog-centered { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - min-height: calc(100% - 1rem); } - .modal-dialog-centered::before { - display: block; - height: calc(100vh - 1rem); - content: ""; } - .modal-dialog-centered.modal-dialog-scrollable { - -ms-flex-direction: column; - flex-direction: column; - -ms-flex-pack: center; - justify-content: center; - height: 100%; } - .modal-dialog-centered.modal-dialog-scrollable .modal-content { - max-height: none; } - .modal-dialog-centered.modal-dialog-scrollable::before { - content: none; } - -.modal-content { - position: relative; - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; - width: 100%; - pointer-events: auto; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 0.3rem; - box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5); - outline: 0; } - -.modal-backdrop { - position: fixed; - top: 0; - left: 0; - z-index: 1040; - width: 100vw; - height: 100vh; - background-color: #000; } - .modal-backdrop.fade { - opacity: 0; } - .modal-backdrop.show { - opacity: 0.5; } - -.modal-header { - display: -ms-flexbox; - display: flex; - -ms-flex-align: start; - align-items: flex-start; - -ms-flex-pack: justify; - justify-content: space-between; - padding: 1rem 1rem; - border-bottom: 1px solid #dee2e6; - border-top-left-radius: 0.3rem; - border-top-right-radius: 0.3rem; } - .modal-header .close { - padding: 1rem 1rem; - margin: -1rem -1rem -1rem auto; } - -.modal-title { - margin-bottom: 0; - line-height: 1.5; } - -.modal-body { - position: relative; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - padding: 1rem; } - -.modal-footer { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: end; - justify-content: flex-end; - padding: 1rem; - border-top: 1px solid #dee2e6; - border-bottom-right-radius: 0.3rem; - border-bottom-left-radius: 0.3rem; } - .modal-footer > :not(:first-child) { - margin-left: .25rem; } - .modal-footer > :not(:last-child) { - margin-right: .25rem; } - -.modal-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; } - -@media (min-width: 576px) { - .modal-dialog { - max-width: 500px; - margin: 1.75rem auto; } - .modal-dialog-scrollable { - max-height: calc(100% - 3.5rem); } - .modal-dialog-scrollable .modal-content { - max-height: calc(100vh - 3.5rem); } - .modal-dialog-centered { - min-height: calc(100% - 3.5rem); } - .modal-dialog-centered::before { - height: calc(100vh - 3.5rem); } - .modal-content { - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5); } - .modal-sm { - max-width: 300px; } } - -@media (min-width: 992px) { - .modal-lg, - .modal-xl { - max-width: 800px; } } - -@media (min-width: 1200px) { - .modal-xl { - max-width: 1140px; } } - -.tooltip { - position: absolute; - z-index: 1070; - display: block; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-style: normal; - font-weight: 200; - line-height: 1.5; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - white-space: normal; - line-break: auto; - font-size: 0.875rem; - word-wrap: break-word; - opacity: 0; } - .tooltip.show { - opacity: 0.9; } - .tooltip .arrow { - position: absolute; - display: block; - width: 0.8rem; - height: 0.4rem; } - .tooltip .arrow::before { - position: absolute; - content: ""; - border-color: transparent; - border-style: solid; } - -.bs-tooltip-top, .bs-tooltip-auto[x-placement^="top"] { - padding: 0.4rem 0; } - .bs-tooltip-top .arrow, .bs-tooltip-auto[x-placement^="top"] .arrow { - bottom: 0; } - .bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^="top"] .arrow::before { - top: 0; - border-width: 0.4rem 0.4rem 0; - border-top-color: #000; } - -.bs-tooltip-right, .bs-tooltip-auto[x-placement^="right"] { - padding: 0 0.4rem; } - .bs-tooltip-right .arrow, .bs-tooltip-auto[x-placement^="right"] .arrow { - left: 0; - width: 0.4rem; - height: 0.8rem; } - .bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^="right"] .arrow::before { - right: 0; - border-width: 0.4rem 0.4rem 0.4rem 0; - border-right-color: #000; } - -.bs-tooltip-bottom, .bs-tooltip-auto[x-placement^="bottom"] { - padding: 0.4rem 0; } - .bs-tooltip-bottom .arrow, .bs-tooltip-auto[x-placement^="bottom"] .arrow { - top: 0; } - .bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^="bottom"] .arrow::before { - bottom: 0; - border-width: 0 0.4rem 0.4rem; - border-bottom-color: #000; } - -.bs-tooltip-left, .bs-tooltip-auto[x-placement^="left"] { - padding: 0 0.4rem; } - .bs-tooltip-left .arrow, .bs-tooltip-auto[x-placement^="left"] .arrow { - right: 0; - width: 0.4rem; - height: 0.8rem; } - .bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^="left"] .arrow::before { - left: 0; - border-width: 0.4rem 0 0.4rem 0.4rem; - border-left-color: #000; } - -.tooltip-inner { - max-width: 200px; - padding: 0.25rem 0.5rem; - color: #fff; - text-align: center; - background-color: #000; - border-radius: 0.25rem; } - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: block; - max-width: 276px; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-style: normal; - font-weight: 200; - line-height: 1.5; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - white-space: normal; - line-break: auto; - font-size: 0.875rem; - word-wrap: break-word; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 0.3rem; - box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2); } - .popover .arrow { - position: absolute; - display: block; - width: 1rem; - height: 0.5rem; - margin: 0 0.3rem; } - .popover .arrow::before, .popover .arrow::after { - position: absolute; - display: block; - content: ""; - border-color: transparent; - border-style: solid; } - -.bs-popover-top, .bs-popover-auto[x-placement^="top"] { - margin-bottom: 0.5rem; } - .bs-popover-top > .arrow, .bs-popover-auto[x-placement^="top"] > .arrow { - bottom: calc((0.5rem + 1px) * -1); } - .bs-popover-top > .arrow::before, .bs-popover-auto[x-placement^="top"] > .arrow::before { - bottom: 0; - border-width: 0.5rem 0.5rem 0; - border-top-color: rgba(0, 0, 0, 0.25); } - .bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after { - bottom: 1px; - border-width: 0.5rem 0.5rem 0; - border-top-color: #fff; } - -.bs-popover-right, .bs-popover-auto[x-placement^="right"] { - margin-left: 0.5rem; } - .bs-popover-right > .arrow, .bs-popover-auto[x-placement^="right"] > .arrow { - left: calc((0.5rem + 1px) * -1); - width: 0.5rem; - height: 1rem; - margin: 0.3rem 0; } - .bs-popover-right > .arrow::before, .bs-popover-auto[x-placement^="right"] > .arrow::before { - left: 0; - border-width: 0.5rem 0.5rem 0.5rem 0; - border-right-color: rgba(0, 0, 0, 0.25); } - .bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^="right"] > .arrow::after { - left: 1px; - border-width: 0.5rem 0.5rem 0.5rem 0; - border-right-color: #fff; } - -.bs-popover-bottom, .bs-popover-auto[x-placement^="bottom"] { - margin-top: 0.5rem; } - .bs-popover-bottom > .arrow, .bs-popover-auto[x-placement^="bottom"] > .arrow { - top: calc((0.5rem + 1px) * -1); } - .bs-popover-bottom > .arrow::before, .bs-popover-auto[x-placement^="bottom"] > .arrow::before { - top: 0; - border-width: 0 0.5rem 0.5rem 0.5rem; - border-bottom-color: rgba(0, 0, 0, 0.25); } - .bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after { - top: 1px; - border-width: 0 0.5rem 0.5rem 0.5rem; - border-bottom-color: #fff; } - .bs-popover-bottom .popover-header::before, .bs-popover-auto[x-placement^="bottom"] .popover-header::before { - position: absolute; - top: 0; - left: 50%; - display: block; - width: 1rem; - margin-left: -0.5rem; - content: ""; - border-bottom: 1px solid #f7f7f7; } - -.bs-popover-left, .bs-popover-auto[x-placement^="left"] { - margin-right: 0.5rem; } - .bs-popover-left > .arrow, .bs-popover-auto[x-placement^="left"] > .arrow { - right: calc((0.5rem + 1px) * -1); - width: 0.5rem; - height: 1rem; - margin: 0.3rem 0; } - .bs-popover-left > .arrow::before, .bs-popover-auto[x-placement^="left"] > .arrow::before { - right: 0; - border-width: 0.5rem 0 0.5rem 0.5rem; - border-left-color: rgba(0, 0, 0, 0.25); } - .bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^="left"] > .arrow::after { - right: 1px; - border-width: 0.5rem 0 0.5rem 0.5rem; - border-left-color: #fff; } - -.popover-header { - padding: 0.5rem 0.75rem; - margin-bottom: 0; - font-size: 1rem; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-top-left-radius: calc(0.3rem - 1px); - border-top-right-radius: calc(0.3rem - 1px); } - .popover-header:empty { - display: none; } - -.popover-body { - padding: 0.5rem 0.75rem; - color: #333; } - -.carousel { - position: relative; } - -.carousel.pointer-event { - -ms-touch-action: pan-y; - touch-action: pan-y; } - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; } - .carousel-inner::after { - display: block; - clear: both; - content: ""; } - -.carousel-item { - position: relative; - display: none; - float: left; - width: 100%; - margin-right: -100%; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - transition: transform 0.6s ease-in-out; } - @media (prefers-reduced-motion: reduce) { - .carousel-item { - transition: none; } } - -.carousel-item.active, -.carousel-item-next, -.carousel-item-prev { - display: block; } - -.carousel-item-next:not(.carousel-item-left), -.active.carousel-item-right { - transform: translateX(100%); } - -.carousel-item-prev:not(.carousel-item-right), -.active.carousel-item-left { - transform: translateX(-100%); } - -.carousel-fade .carousel-item { - opacity: 0; - transition-property: opacity; - transform: none; } - -.carousel-fade .carousel-item.active, -.carousel-fade .carousel-item-next.carousel-item-left, -.carousel-fade .carousel-item-prev.carousel-item-right { - z-index: 1; - opacity: 1; } - -.carousel-fade .active.carousel-item-left, -.carousel-fade .active.carousel-item-right { - z-index: 0; - opacity: 0; - transition: 0s 0.6s opacity; } - @media (prefers-reduced-motion: reduce) { - .carousel-fade .active.carousel-item-left, - .carousel-fade .active.carousel-item-right { - transition: none; } } - -.carousel-control-prev, -.carousel-control-next { - position: absolute; - top: 0; - bottom: 0; - z-index: 1; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - width: 15%; - color: #fff; - text-align: center; - opacity: 0.5; - transition: opacity 0.15s ease; } - @media (prefers-reduced-motion: reduce) { - .carousel-control-prev, - .carousel-control-next { - transition: none; } } - .carousel-control-prev:hover, .carousel-control-prev:focus, - .carousel-control-next:hover, - .carousel-control-next:focus { - color: #fff; - text-decoration: none; - outline: 0; - opacity: 0.9; } - -.carousel-control-prev { - left: 0; } - -.carousel-control-next { - right: 0; } - -.carousel-control-prev-icon, -.carousel-control-next-icon { - display: inline-block; - width: 20px; - height: 20px; - background: no-repeat 50% / 100% 100%; } - -.carousel-control-prev-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e"); } - -.carousel-control-next-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e"); } - -.carousel-indicators { - position: absolute; - right: 0; - bottom: 0; - left: 0; - z-index: 15; - display: -ms-flexbox; - display: flex; - -ms-flex-pack: center; - justify-content: center; - padding-left: 0; - margin-right: 15%; - margin-left: 15%; - list-style: none; } - .carousel-indicators li { - box-sizing: content-box; - -ms-flex: 0 1 auto; - flex: 0 1 auto; - width: 30px; - height: 3px; - margin-right: 3px; - margin-left: 3px; - text-indent: -999px; - cursor: pointer; - background-color: #fff; - background-clip: padding-box; - border-top: 10px solid transparent; - border-bottom: 10px solid transparent; - opacity: .5; - transition: opacity 0.6s ease; } - @media (prefers-reduced-motion: reduce) { - .carousel-indicators li { - transition: none; } } - .carousel-indicators .active { - opacity: 1; } - -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #fff; - text-align: center; } - -@keyframes spinner-border { - to { - transform: rotate(360deg); } } - -.spinner-border { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: text-bottom; - border: 0.25em solid currentColor; - border-right-color: transparent; - border-radius: 50%; - animation: spinner-border .75s linear infinite; } - -.spinner-border-sm { - width: 1rem; - height: 1rem; - border-width: 0.2em; } - -@keyframes spinner-grow { - 0% { - transform: scale(0); } - 50% { - opacity: 1; } } - -.spinner-grow { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: text-bottom; - background-color: currentColor; - border-radius: 50%; - opacity: 0; - animation: spinner-grow .75s linear infinite; } - -.spinner-grow-sm { - width: 1rem; - height: 1rem; } - -.align-baseline { - vertical-align: baseline !important; } - -.align-top { - vertical-align: top !important; } - -.align-middle { - vertical-align: middle !important; } - -.align-bottom { - vertical-align: bottom !important; } - -.align-text-bottom { - vertical-align: text-bottom !important; } - -.align-text-top { - vertical-align: text-top !important; } - -.bg-primary { - background-color: #12bbad !important; } - -a.bg-primary:hover, a.bg-primary:focus, -button.bg-primary:hover, -button.bg-primary:focus { - background-color: #0e8c82 !important; } - -.bg-secondary { - background-color: #4f70ce !important; } - -a.bg-secondary:hover, a.bg-secondary:focus, -button.bg-secondary:hover, -button.bg-secondary:focus { - background-color: #3355b7 !important; } - -.bg-success { - background-color: #28a745 !important; } - -a.bg-success:hover, a.bg-success:focus, -button.bg-success:hover, -button.bg-success:focus { - background-color: #1e7e34 !important; } - -.bg-info { - background-color: #ccc !important; } - -a.bg-info:hover, a.bg-info:focus, -button.bg-info:hover, -button.bg-info:focus { - background-color: #b3b3b3 !important; } - -.bg-warning { - background-color: #ffc107 !important; } - -a.bg-warning:hover, a.bg-warning:focus, -button.bg-warning:hover, -button.bg-warning:focus { - background-color: #d39e00 !important; } - -.bg-danger { - background-color: #dc3545 !important; } - -a.bg-danger:hover, a.bg-danger:focus, -button.bg-danger:hover, -button.bg-danger:focus { - background-color: #bd2130 !important; } - -.bg-light { - background-color: #f3f3f3 !important; } - -a.bg-light:hover, a.bg-light:focus, -button.bg-light:hover, -button.bg-light:focus { - background-color: #dadada !important; } - -.bg-dark { - background-color: #151515 !important; } - -a.bg-dark:hover, a.bg-dark:focus, -button.bg-dark:hover, -button.bg-dark:focus { - background-color: black !important; } - -.bg-white { - background-color: #fff !important; } - -.bg-transparent { - background-color: transparent !important; } - -.border { - border: 1px solid #dee2e6 !important; } - -.border-top { - border-top: 1px solid #dee2e6 !important; } - -.border-right { - border-right: 1px solid #dee2e6 !important; } - -.border-bottom { - border-bottom: 1px solid #dee2e6 !important; } - -.border-left { - border-left: 1px solid #dee2e6 !important; } - -.border-0 { - border: 0 !important; } - -.border-top-0 { - border-top: 0 !important; } - -.border-right-0 { - border-right: 0 !important; } - -.border-bottom-0 { - border-bottom: 0 !important; } - -.border-left-0 { - border-left: 0 !important; } - -.border-primary { - border-color: #12bbad !important; } - -.border-secondary { - border-color: #4f70ce !important; } - -.border-success { - border-color: #28a745 !important; } - -.border-info { - border-color: #ccc !important; } - -.border-warning { - border-color: #ffc107 !important; } - -.border-danger { - border-color: #dc3545 !important; } - -.border-light { - border-color: #f3f3f3 !important; } - -.border-dark { - border-color: #151515 !important; } - -.border-white { - border-color: #fff !important; } - -.rounded-sm { - border-radius: 0.2rem !important; } - -.rounded { - border-radius: 0.25rem !important; } - -.rounded-top { - border-top-left-radius: 0.25rem !important; - border-top-right-radius: 0.25rem !important; } - -.rounded-right { - border-top-right-radius: 0.25rem !important; - border-bottom-right-radius: 0.25rem !important; } - -.rounded-bottom { - border-bottom-right-radius: 0.25rem !important; - border-bottom-left-radius: 0.25rem !important; } - -.rounded-left { - border-top-left-radius: 0.25rem !important; - border-bottom-left-radius: 0.25rem !important; } - -.rounded-lg { - border-radius: 0.3rem !important; } - -.rounded-circle { - border-radius: 50% !important; } - -.rounded-pill { - border-radius: 50rem !important; } - -.rounded-0 { - border-radius: 0 !important; } - -.clearfix::after { - display: block; - clear: both; - content: ""; } - -.d-none { - display: none !important; } - -.d-inline { - display: inline !important; } - -.d-inline-block { - display: inline-block !important; } - -.d-block { - display: block !important; } - -.d-table { - display: table !important; } - -.d-table-row { - display: table-row !important; } - -.d-table-cell { - display: table-cell !important; } - -.d-flex { - display: -ms-flexbox !important; - display: flex !important; } - -.d-inline-flex { - display: -ms-inline-flexbox !important; - display: inline-flex !important; } - -@media (min-width: 576px) { - .d-sm-none { - display: none !important; } - .d-sm-inline { - display: inline !important; } - .d-sm-inline-block { - display: inline-block !important; } - .d-sm-block { - display: block !important; } - .d-sm-table { - display: table !important; } - .d-sm-table-row { - display: table-row !important; } - .d-sm-table-cell { - display: table-cell !important; } - .d-sm-flex { - display: -ms-flexbox !important; - display: flex !important; } - .d-sm-inline-flex { - display: -ms-inline-flexbox !important; - display: inline-flex !important; } } - -@media (min-width: 768px) { - .d-md-none { - display: none !important; } - .d-md-inline { - display: inline !important; } - .d-md-inline-block { - display: inline-block !important; } - .d-md-block { - display: block !important; } - .d-md-table { - display: table !important; } - .d-md-table-row { - display: table-row !important; } - .d-md-table-cell { - display: table-cell !important; } - .d-md-flex { - display: -ms-flexbox !important; - display: flex !important; } - .d-md-inline-flex { - display: -ms-inline-flexbox !important; - display: inline-flex !important; } } - -@media (min-width: 992px) { - .d-lg-none { - display: none !important; } - .d-lg-inline { - display: inline !important; } - .d-lg-inline-block { - display: inline-block !important; } - .d-lg-block { - display: block !important; } - .d-lg-table { - display: table !important; } - .d-lg-table-row { - display: table-row !important; } - .d-lg-table-cell { - display: table-cell !important; } - .d-lg-flex { - display: -ms-flexbox !important; - display: flex !important; } - .d-lg-inline-flex { - display: -ms-inline-flexbox !important; - display: inline-flex !important; } } - -@media (min-width: 1200px) { - .d-xl-none { - display: none !important; } - .d-xl-inline { - display: inline !important; } - .d-xl-inline-block { - display: inline-block !important; } - .d-xl-block { - display: block !important; } - .d-xl-table { - display: table !important; } - .d-xl-table-row { - display: table-row !important; } - .d-xl-table-cell { - display: table-cell !important; } - .d-xl-flex { - display: -ms-flexbox !important; - display: flex !important; } - .d-xl-inline-flex { - display: -ms-inline-flexbox !important; - display: inline-flex !important; } } - -@media print { - .d-print-none { - display: none !important; } - .d-print-inline { - display: inline !important; } - .d-print-inline-block { - display: inline-block !important; } - .d-print-block { - display: block !important; } - .d-print-table { - display: table !important; } - .d-print-table-row { - display: table-row !important; } - .d-print-table-cell { - display: table-cell !important; } - .d-print-flex { - display: -ms-flexbox !important; - display: flex !important; } - .d-print-inline-flex { - display: -ms-inline-flexbox !important; - display: inline-flex !important; } } - -.embed-responsive { - position: relative; - display: block; - width: 100%; - padding: 0; - overflow: hidden; } - .embed-responsive::before { - display: block; - content: ""; } - .embed-responsive .embed-responsive-item, - .embed-responsive iframe, - .embed-responsive embed, - .embed-responsive object, - .embed-responsive video { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; } - -.embed-responsive-21by9::before { - padding-top: 42.85714%; } - -.embed-responsive-16by9::before { - padding-top: 56.25%; } - -.embed-responsive-4by3::before { - padding-top: 75%; } - -.embed-responsive-1by1::before { - padding-top: 100%; } - -.flex-row { - -ms-flex-direction: row !important; - flex-direction: row !important; } - -.flex-column { - -ms-flex-direction: column !important; - flex-direction: column !important; } - -.flex-row-reverse { - -ms-flex-direction: row-reverse !important; - flex-direction: row-reverse !important; } - -.flex-column-reverse { - -ms-flex-direction: column-reverse !important; - flex-direction: column-reverse !important; } - -.flex-wrap { - -ms-flex-wrap: wrap !important; - flex-wrap: wrap !important; } - -.flex-nowrap { - -ms-flex-wrap: nowrap !important; - flex-wrap: nowrap !important; } - -.flex-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; - flex-wrap: wrap-reverse !important; } - -.flex-fill { - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; } - -.flex-grow-0 { - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; } - -.flex-grow-1 { - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; } - -.flex-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; } - -.flex-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; } - -.justify-content-start { - -ms-flex-pack: start !important; - justify-content: flex-start !important; } - -.justify-content-end { - -ms-flex-pack: end !important; - justify-content: flex-end !important; } - -.justify-content-center { - -ms-flex-pack: center !important; - justify-content: center !important; } - -.justify-content-between { - -ms-flex-pack: justify !important; - justify-content: space-between !important; } - -.justify-content-around { - -ms-flex-pack: distribute !important; - justify-content: space-around !important; } - -.align-items-start { - -ms-flex-align: start !important; - align-items: flex-start !important; } - -.align-items-end { - -ms-flex-align: end !important; - align-items: flex-end !important; } - -.align-items-center { - -ms-flex-align: center !important; - align-items: center !important; } - -.align-items-baseline { - -ms-flex-align: baseline !important; - align-items: baseline !important; } - -.align-items-stretch { - -ms-flex-align: stretch !important; - align-items: stretch !important; } - -.align-content-start { - -ms-flex-line-pack: start !important; - align-content: flex-start !important; } - -.align-content-end { - -ms-flex-line-pack: end !important; - align-content: flex-end !important; } - -.align-content-center { - -ms-flex-line-pack: center !important; - align-content: center !important; } - -.align-content-between { - -ms-flex-line-pack: justify !important; - align-content: space-between !important; } - -.align-content-around { - -ms-flex-line-pack: distribute !important; - align-content: space-around !important; } - -.align-content-stretch { - -ms-flex-line-pack: stretch !important; - align-content: stretch !important; } - -.align-self-auto { - -ms-flex-item-align: auto !important; - -ms-grid-row-align: auto !important; - align-self: auto !important; } - -.align-self-start { - -ms-flex-item-align: start !important; - align-self: flex-start !important; } - -.align-self-end { - -ms-flex-item-align: end !important; - align-self: flex-end !important; } - -.align-self-center { - -ms-flex-item-align: center !important; - -ms-grid-row-align: center !important; - align-self: center !important; } - -.align-self-baseline { - -ms-flex-item-align: baseline !important; - align-self: baseline !important; } - -.align-self-stretch { - -ms-flex-item-align: stretch !important; - -ms-grid-row-align: stretch !important; - align-self: stretch !important; } - -@media (min-width: 576px) { - .flex-sm-row { - -ms-flex-direction: row !important; - flex-direction: row !important; } - .flex-sm-column { - -ms-flex-direction: column !important; - flex-direction: column !important; } - .flex-sm-row-reverse { - -ms-flex-direction: row-reverse !important; - flex-direction: row-reverse !important; } - .flex-sm-column-reverse { - -ms-flex-direction: column-reverse !important; - flex-direction: column-reverse !important; } - .flex-sm-wrap { - -ms-flex-wrap: wrap !important; - flex-wrap: wrap !important; } - .flex-sm-nowrap { - -ms-flex-wrap: nowrap !important; - flex-wrap: nowrap !important; } - .flex-sm-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; - flex-wrap: wrap-reverse !important; } - .flex-sm-fill { - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; } - .flex-sm-grow-0 { - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; } - .flex-sm-grow-1 { - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; } - .flex-sm-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; } - .flex-sm-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; } - .justify-content-sm-start { - -ms-flex-pack: start !important; - justify-content: flex-start !important; } - .justify-content-sm-end { - -ms-flex-pack: end !important; - justify-content: flex-end !important; } - .justify-content-sm-center { - -ms-flex-pack: center !important; - justify-content: center !important; } - .justify-content-sm-between { - -ms-flex-pack: justify !important; - justify-content: space-between !important; } - .justify-content-sm-around { - -ms-flex-pack: distribute !important; - justify-content: space-around !important; } - .align-items-sm-start { - -ms-flex-align: start !important; - align-items: flex-start !important; } - .align-items-sm-end { - -ms-flex-align: end !important; - align-items: flex-end !important; } - .align-items-sm-center { - -ms-flex-align: center !important; - align-items: center !important; } - .align-items-sm-baseline { - -ms-flex-align: baseline !important; - align-items: baseline !important; } - .align-items-sm-stretch { - -ms-flex-align: stretch !important; - align-items: stretch !important; } - .align-content-sm-start { - -ms-flex-line-pack: start !important; - align-content: flex-start !important; } - .align-content-sm-end { - -ms-flex-line-pack: end !important; - align-content: flex-end !important; } - .align-content-sm-center { - -ms-flex-line-pack: center !important; - align-content: center !important; } - .align-content-sm-between { - -ms-flex-line-pack: justify !important; - align-content: space-between !important; } - .align-content-sm-around { - -ms-flex-line-pack: distribute !important; - align-content: space-around !important; } - .align-content-sm-stretch { - -ms-flex-line-pack: stretch !important; - align-content: stretch !important; } - .align-self-sm-auto { - -ms-flex-item-align: auto !important; - -ms-grid-row-align: auto !important; - align-self: auto !important; } - .align-self-sm-start { - -ms-flex-item-align: start !important; - align-self: flex-start !important; } - .align-self-sm-end { - -ms-flex-item-align: end !important; - align-self: flex-end !important; } - .align-self-sm-center { - -ms-flex-item-align: center !important; - -ms-grid-row-align: center !important; - align-self: center !important; } - .align-self-sm-baseline { - -ms-flex-item-align: baseline !important; - align-self: baseline !important; } - .align-self-sm-stretch { - -ms-flex-item-align: stretch !important; - -ms-grid-row-align: stretch !important; - align-self: stretch !important; } } - -@media (min-width: 768px) { - .flex-md-row { - -ms-flex-direction: row !important; - flex-direction: row !important; } - .flex-md-column { - -ms-flex-direction: column !important; - flex-direction: column !important; } - .flex-md-row-reverse { - -ms-flex-direction: row-reverse !important; - flex-direction: row-reverse !important; } - .flex-md-column-reverse { - -ms-flex-direction: column-reverse !important; - flex-direction: column-reverse !important; } - .flex-md-wrap { - -ms-flex-wrap: wrap !important; - flex-wrap: wrap !important; } - .flex-md-nowrap { - -ms-flex-wrap: nowrap !important; - flex-wrap: nowrap !important; } - .flex-md-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; - flex-wrap: wrap-reverse !important; } - .flex-md-fill { - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; } - .flex-md-grow-0 { - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; } - .flex-md-grow-1 { - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; } - .flex-md-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; } - .flex-md-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; } - .justify-content-md-start { - -ms-flex-pack: start !important; - justify-content: flex-start !important; } - .justify-content-md-end { - -ms-flex-pack: end !important; - justify-content: flex-end !important; } - .justify-content-md-center { - -ms-flex-pack: center !important; - justify-content: center !important; } - .justify-content-md-between { - -ms-flex-pack: justify !important; - justify-content: space-between !important; } - .justify-content-md-around { - -ms-flex-pack: distribute !important; - justify-content: space-around !important; } - .align-items-md-start { - -ms-flex-align: start !important; - align-items: flex-start !important; } - .align-items-md-end { - -ms-flex-align: end !important; - align-items: flex-end !important; } - .align-items-md-center { - -ms-flex-align: center !important; - align-items: center !important; } - .align-items-md-baseline { - -ms-flex-align: baseline !important; - align-items: baseline !important; } - .align-items-md-stretch { - -ms-flex-align: stretch !important; - align-items: stretch !important; } - .align-content-md-start { - -ms-flex-line-pack: start !important; - align-content: flex-start !important; } - .align-content-md-end { - -ms-flex-line-pack: end !important; - align-content: flex-end !important; } - .align-content-md-center { - -ms-flex-line-pack: center !important; - align-content: center !important; } - .align-content-md-between { - -ms-flex-line-pack: justify !important; - align-content: space-between !important; } - .align-content-md-around { - -ms-flex-line-pack: distribute !important; - align-content: space-around !important; } - .align-content-md-stretch { - -ms-flex-line-pack: stretch !important; - align-content: stretch !important; } - .align-self-md-auto { - -ms-flex-item-align: auto !important; - -ms-grid-row-align: auto !important; - align-self: auto !important; } - .align-self-md-start { - -ms-flex-item-align: start !important; - align-self: flex-start !important; } - .align-self-md-end { - -ms-flex-item-align: end !important; - align-self: flex-end !important; } - .align-self-md-center { - -ms-flex-item-align: center !important; - -ms-grid-row-align: center !important; - align-self: center !important; } - .align-self-md-baseline { - -ms-flex-item-align: baseline !important; - align-self: baseline !important; } - .align-self-md-stretch { - -ms-flex-item-align: stretch !important; - -ms-grid-row-align: stretch !important; - align-self: stretch !important; } } - -@media (min-width: 992px) { - .flex-lg-row { - -ms-flex-direction: row !important; - flex-direction: row !important; } - .flex-lg-column { - -ms-flex-direction: column !important; - flex-direction: column !important; } - .flex-lg-row-reverse { - -ms-flex-direction: row-reverse !important; - flex-direction: row-reverse !important; } - .flex-lg-column-reverse { - -ms-flex-direction: column-reverse !important; - flex-direction: column-reverse !important; } - .flex-lg-wrap { - -ms-flex-wrap: wrap !important; - flex-wrap: wrap !important; } - .flex-lg-nowrap { - -ms-flex-wrap: nowrap !important; - flex-wrap: nowrap !important; } - .flex-lg-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; - flex-wrap: wrap-reverse !important; } - .flex-lg-fill { - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; } - .flex-lg-grow-0 { - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; } - .flex-lg-grow-1 { - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; } - .flex-lg-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; } - .flex-lg-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; } - .justify-content-lg-start { - -ms-flex-pack: start !important; - justify-content: flex-start !important; } - .justify-content-lg-end { - -ms-flex-pack: end !important; - justify-content: flex-end !important; } - .justify-content-lg-center { - -ms-flex-pack: center !important; - justify-content: center !important; } - .justify-content-lg-between { - -ms-flex-pack: justify !important; - justify-content: space-between !important; } - .justify-content-lg-around { - -ms-flex-pack: distribute !important; - justify-content: space-around !important; } - .align-items-lg-start { - -ms-flex-align: start !important; - align-items: flex-start !important; } - .align-items-lg-end { - -ms-flex-align: end !important; - align-items: flex-end !important; } - .align-items-lg-center { - -ms-flex-align: center !important; - align-items: center !important; } - .align-items-lg-baseline { - -ms-flex-align: baseline !important; - align-items: baseline !important; } - .align-items-lg-stretch { - -ms-flex-align: stretch !important; - align-items: stretch !important; } - .align-content-lg-start { - -ms-flex-line-pack: start !important; - align-content: flex-start !important; } - .align-content-lg-end { - -ms-flex-line-pack: end !important; - align-content: flex-end !important; } - .align-content-lg-center { - -ms-flex-line-pack: center !important; - align-content: center !important; } - .align-content-lg-between { - -ms-flex-line-pack: justify !important; - align-content: space-between !important; } - .align-content-lg-around { - -ms-flex-line-pack: distribute !important; - align-content: space-around !important; } - .align-content-lg-stretch { - -ms-flex-line-pack: stretch !important; - align-content: stretch !important; } - .align-self-lg-auto { - -ms-flex-item-align: auto !important; - -ms-grid-row-align: auto !important; - align-self: auto !important; } - .align-self-lg-start { - -ms-flex-item-align: start !important; - align-self: flex-start !important; } - .align-self-lg-end { - -ms-flex-item-align: end !important; - align-self: flex-end !important; } - .align-self-lg-center { - -ms-flex-item-align: center !important; - -ms-grid-row-align: center !important; - align-self: center !important; } - .align-self-lg-baseline { - -ms-flex-item-align: baseline !important; - align-self: baseline !important; } - .align-self-lg-stretch { - -ms-flex-item-align: stretch !important; - -ms-grid-row-align: stretch !important; - align-self: stretch !important; } } - -@media (min-width: 1200px) { - .flex-xl-row { - -ms-flex-direction: row !important; - flex-direction: row !important; } - .flex-xl-column { - -ms-flex-direction: column !important; - flex-direction: column !important; } - .flex-xl-row-reverse { - -ms-flex-direction: row-reverse !important; - flex-direction: row-reverse !important; } - .flex-xl-column-reverse { - -ms-flex-direction: column-reverse !important; - flex-direction: column-reverse !important; } - .flex-xl-wrap { - -ms-flex-wrap: wrap !important; - flex-wrap: wrap !important; } - .flex-xl-nowrap { - -ms-flex-wrap: nowrap !important; - flex-wrap: nowrap !important; } - .flex-xl-wrap-reverse { - -ms-flex-wrap: wrap-reverse !important; - flex-wrap: wrap-reverse !important; } - .flex-xl-fill { - -ms-flex: 1 1 auto !important; - flex: 1 1 auto !important; } - .flex-xl-grow-0 { - -ms-flex-positive: 0 !important; - flex-grow: 0 !important; } - .flex-xl-grow-1 { - -ms-flex-positive: 1 !important; - flex-grow: 1 !important; } - .flex-xl-shrink-0 { - -ms-flex-negative: 0 !important; - flex-shrink: 0 !important; } - .flex-xl-shrink-1 { - -ms-flex-negative: 1 !important; - flex-shrink: 1 !important; } - .justify-content-xl-start { - -ms-flex-pack: start !important; - justify-content: flex-start !important; } - .justify-content-xl-end { - -ms-flex-pack: end !important; - justify-content: flex-end !important; } - .justify-content-xl-center { - -ms-flex-pack: center !important; - justify-content: center !important; } - .justify-content-xl-between { - -ms-flex-pack: justify !important; - justify-content: space-between !important; } - .justify-content-xl-around { - -ms-flex-pack: distribute !important; - justify-content: space-around !important; } - .align-items-xl-start { - -ms-flex-align: start !important; - align-items: flex-start !important; } - .align-items-xl-end { - -ms-flex-align: end !important; - align-items: flex-end !important; } - .align-items-xl-center { - -ms-flex-align: center !important; - align-items: center !important; } - .align-items-xl-baseline { - -ms-flex-align: baseline !important; - align-items: baseline !important; } - .align-items-xl-stretch { - -ms-flex-align: stretch !important; - align-items: stretch !important; } - .align-content-xl-start { - -ms-flex-line-pack: start !important; - align-content: flex-start !important; } - .align-content-xl-end { - -ms-flex-line-pack: end !important; - align-content: flex-end !important; } - .align-content-xl-center { - -ms-flex-line-pack: center !important; - align-content: center !important; } - .align-content-xl-between { - -ms-flex-line-pack: justify !important; - align-content: space-between !important; } - .align-content-xl-around { - -ms-flex-line-pack: distribute !important; - align-content: space-around !important; } - .align-content-xl-stretch { - -ms-flex-line-pack: stretch !important; - align-content: stretch !important; } - .align-self-xl-auto { - -ms-flex-item-align: auto !important; - -ms-grid-row-align: auto !important; - align-self: auto !important; } - .align-self-xl-start { - -ms-flex-item-align: start !important; - align-self: flex-start !important; } - .align-self-xl-end { - -ms-flex-item-align: end !important; - align-self: flex-end !important; } - .align-self-xl-center { - -ms-flex-item-align: center !important; - -ms-grid-row-align: center !important; - align-self: center !important; } - .align-self-xl-baseline { - -ms-flex-item-align: baseline !important; - align-self: baseline !important; } - .align-self-xl-stretch { - -ms-flex-item-align: stretch !important; - -ms-grid-row-align: stretch !important; - align-self: stretch !important; } } - -.float-left { - float: left !important; } - -.float-right { - float: right !important; } - -.float-none { - float: none !important; } - -@media (min-width: 576px) { - .float-sm-left { - float: left !important; } - .float-sm-right { - float: right !important; } - .float-sm-none { - float: none !important; } } - -@media (min-width: 768px) { - .float-md-left { - float: left !important; } - .float-md-right { - float: right !important; } - .float-md-none { - float: none !important; } } - -@media (min-width: 992px) { - .float-lg-left { - float: left !important; } - .float-lg-right { - float: right !important; } - .float-lg-none { - float: none !important; } } - -@media (min-width: 1200px) { - .float-xl-left { - float: left !important; } - .float-xl-right { - float: right !important; } - .float-xl-none { - float: none !important; } } - -.overflow-auto { - overflow: auto !important; } - -.overflow-hidden { - overflow: hidden !important; } - -.position-static { - position: static !important; } - -.position-relative { - position: relative !important; } - -.position-absolute { - position: absolute !important; } - -.position-fixed { - position: fixed !important; } - -.position-sticky { - position: -webkit-sticky !important; - position: sticky !important; } - -.fixed-top { - position: fixed; - top: 0; - right: 0; - left: 0; - z-index: 1030; } - -.fixed-bottom { - position: fixed; - right: 0; - bottom: 0; - left: 0; - z-index: 1030; } - -@supports ((position: -webkit-sticky) or (position: sticky)) { - .sticky-top { - position: -webkit-sticky; - position: sticky; - top: 0; - z-index: 1020; } } - -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; } - -.sr-only-focusable:active, .sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - overflow: visible; - clip: auto; - white-space: normal; } - -.shadow-sm { - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; } - -.shadow { - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; } - -.shadow-lg { - box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; } - -.shadow-none { - box-shadow: none !important; } - -.w-25 { - width: 25% !important; } - -.w-50 { - width: 50% !important; } - -.w-75 { - width: 75% !important; } - -.w-100 { - width: 100% !important; } - -.w-auto { - width: auto !important; } - -.h-25 { - height: 25% !important; } - -.h-50 { - height: 50% !important; } - -.h-75 { - height: 75% !important; } - -.h-100 { - height: 100% !important; } - -.h-auto { - height: auto !important; } - -.mw-100 { - max-width: 100% !important; } - -.mh-100 { - max-height: 100% !important; } - -.min-vw-100 { - min-width: 100vw !important; } - -.min-vh-100 { - min-height: 100vh !important; } - -.vw-100 { - width: 100vw !important; } - -.vh-100 { - height: 100vh !important; } - -.stretched-link::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1; - pointer-events: auto; - content: ""; - background-color: rgba(0, 0, 0, 0); } - -.m-0 { - margin: 0 !important; } - -.mt-0, -.my-0 { - margin-top: 0 !important; } - -.mr-0, -.mx-0 { - margin-right: 0 !important; } - -.mb-0, -.my-0 { - margin-bottom: 0 !important; } - -.ml-0, -.mx-0 { - margin-left: 0 !important; } - -.m-1 { - margin: 0.375rem !important; } - -.mt-1, -.my-1 { - margin-top: 0.375rem !important; } - -.mr-1, -.mx-1 { - margin-right: 0.375rem !important; } - -.mb-1, -.my-1 { - margin-bottom: 0.375rem !important; } - -.ml-1, -.mx-1 { - margin-left: 0.375rem !important; } - -.m-2 { - margin: 0.75rem !important; } - -.mt-2, -.my-2 { - margin-top: 0.75rem !important; } - -.mr-2, -.mx-2 { - margin-right: 0.75rem !important; } - -.mb-2, -.my-2 { - margin-bottom: 0.75rem !important; } - -.ml-2, -.mx-2 { - margin-left: 0.75rem !important; } - -.m-3 { - margin: 1.5rem !important; } - -.mt-3, -.my-3 { - margin-top: 1.5rem !important; } - -.mr-3, -.mx-3 { - margin-right: 1.5rem !important; } - -.mb-3, -.my-3 { - margin-bottom: 1.5rem !important; } - -.ml-3, -.mx-3 { - margin-left: 1.5rem !important; } - -.m-4 { - margin: 2.25rem !important; } - -.mt-4, -.my-4 { - margin-top: 2.25rem !important; } - -.mr-4, -.mx-4 { - margin-right: 2.25rem !important; } - -.mb-4, -.my-4 { - margin-bottom: 2.25rem !important; } - -.ml-4, -.mx-4 { - margin-left: 2.25rem !important; } - -.m-5 { - margin: 4.5rem !important; } - -.mt-5, -.my-5 { - margin-top: 4.5rem !important; } - -.mr-5, -.mx-5 { - margin-right: 4.5rem !important; } - -.mb-5, -.my-5 { - margin-bottom: 4.5rem !important; } - -.ml-5, -.mx-5 { - margin-left: 4.5rem !important; } - -.p-0 { - padding: 0 !important; } - -.pt-0, -.py-0 { - padding-top: 0 !important; } - -.pr-0, -.px-0 { - padding-right: 0 !important; } - -.pb-0, -.py-0 { - padding-bottom: 0 !important; } - -.pl-0, -.px-0 { - padding-left: 0 !important; } - -.p-1 { - padding: 0.375rem !important; } - -.pt-1, -.py-1 { - padding-top: 0.375rem !important; } - -.pr-1, -.px-1 { - padding-right: 0.375rem !important; } - -.pb-1, -.py-1 { - padding-bottom: 0.375rem !important; } - -.pl-1, -.px-1 { - padding-left: 0.375rem !important; } - -.p-2 { - padding: 0.75rem !important; } - -.pt-2, -.py-2 { - padding-top: 0.75rem !important; } - -.pr-2, -.px-2 { - padding-right: 0.75rem !important; } - -.pb-2, -.py-2 { - padding-bottom: 0.75rem !important; } - -.pl-2, -.px-2 { - padding-left: 0.75rem !important; } - -.p-3 { - padding: 1.5rem !important; } - -.pt-3, -.py-3 { - padding-top: 1.5rem !important; } - -.pr-3, -.px-3 { - padding-right: 1.5rem !important; } - -.pb-3, -.py-3 { - padding-bottom: 1.5rem !important; } - -.pl-3, -.px-3 { - padding-left: 1.5rem !important; } - -.p-4 { - padding: 2.25rem !important; } - -.pt-4, -.py-4 { - padding-top: 2.25rem !important; } - -.pr-4, -.px-4 { - padding-right: 2.25rem !important; } - -.pb-4, -.py-4 { - padding-bottom: 2.25rem !important; } - -.pl-4, -.px-4 { - padding-left: 2.25rem !important; } - -.p-5 { - padding: 4.5rem !important; } - -.pt-5, -.py-5 { - padding-top: 4.5rem !important; } - -.pr-5, -.px-5 { - padding-right: 4.5rem !important; } - -.pb-5, -.py-5 { - padding-bottom: 4.5rem !important; } - -.pl-5, -.px-5 { - padding-left: 4.5rem !important; } - -.m-n1 { - margin: -0.375rem !important; } - -.mt-n1, -.my-n1 { - margin-top: -0.375rem !important; } - -.mr-n1, -.mx-n1 { - margin-right: -0.375rem !important; } - -.mb-n1, -.my-n1 { - margin-bottom: -0.375rem !important; } - -.ml-n1, -.mx-n1 { - margin-left: -0.375rem !important; } - -.m-n2 { - margin: -0.75rem !important; } - -.mt-n2, -.my-n2 { - margin-top: -0.75rem !important; } - -.mr-n2, -.mx-n2 { - margin-right: -0.75rem !important; } - -.mb-n2, -.my-n2 { - margin-bottom: -0.75rem !important; } - -.ml-n2, -.mx-n2 { - margin-left: -0.75rem !important; } - -.m-n3 { - margin: -1.5rem !important; } - -.mt-n3, -.my-n3 { - margin-top: -1.5rem !important; } - -.mr-n3, -.mx-n3 { - margin-right: -1.5rem !important; } - -.mb-n3, -.my-n3 { - margin-bottom: -1.5rem !important; } - -.ml-n3, -.mx-n3 { - margin-left: -1.5rem !important; } - -.m-n4 { - margin: -2.25rem !important; } - -.mt-n4, -.my-n4 { - margin-top: -2.25rem !important; } - -.mr-n4, -.mx-n4 { - margin-right: -2.25rem !important; } - -.mb-n4, -.my-n4 { - margin-bottom: -2.25rem !important; } - -.ml-n4, -.mx-n4 { - margin-left: -2.25rem !important; } - -.m-n5 { - margin: -4.5rem !important; } - -.mt-n5, -.my-n5 { - margin-top: -4.5rem !important; } - -.mr-n5, -.mx-n5 { - margin-right: -4.5rem !important; } - -.mb-n5, -.my-n5 { - margin-bottom: -4.5rem !important; } - -.ml-n5, -.mx-n5 { - margin-left: -4.5rem !important; } - -.m-auto { - margin: auto !important; } - -.mt-auto, -.my-auto { - margin-top: auto !important; } - -.mr-auto, -.mx-auto { - margin-right: auto !important; } - -.mb-auto, -.my-auto { - margin-bottom: auto !important; } - -.ml-auto, -.mx-auto { - margin-left: auto !important; } - -@media (min-width: 576px) { - .m-sm-0 { - margin: 0 !important; } - .mt-sm-0, - .my-sm-0 { - margin-top: 0 !important; } - .mr-sm-0, - .mx-sm-0 { - margin-right: 0 !important; } - .mb-sm-0, - .my-sm-0 { - margin-bottom: 0 !important; } - .ml-sm-0, - .mx-sm-0 { - margin-left: 0 !important; } - .m-sm-1 { - margin: 0.375rem !important; } - .mt-sm-1, - .my-sm-1 { - margin-top: 0.375rem !important; } - .mr-sm-1, - .mx-sm-1 { - margin-right: 0.375rem !important; } - .mb-sm-1, - .my-sm-1 { - margin-bottom: 0.375rem !important; } - .ml-sm-1, - .mx-sm-1 { - margin-left: 0.375rem !important; } - .m-sm-2 { - margin: 0.75rem !important; } - .mt-sm-2, - .my-sm-2 { - margin-top: 0.75rem !important; } - .mr-sm-2, - .mx-sm-2 { - margin-right: 0.75rem !important; } - .mb-sm-2, - .my-sm-2 { - margin-bottom: 0.75rem !important; } - .ml-sm-2, - .mx-sm-2 { - margin-left: 0.75rem !important; } - .m-sm-3 { - margin: 1.5rem !important; } - .mt-sm-3, - .my-sm-3 { - margin-top: 1.5rem !important; } - .mr-sm-3, - .mx-sm-3 { - margin-right: 1.5rem !important; } - .mb-sm-3, - .my-sm-3 { - margin-bottom: 1.5rem !important; } - .ml-sm-3, - .mx-sm-3 { - margin-left: 1.5rem !important; } - .m-sm-4 { - margin: 2.25rem !important; } - .mt-sm-4, - .my-sm-4 { - margin-top: 2.25rem !important; } - .mr-sm-4, - .mx-sm-4 { - margin-right: 2.25rem !important; } - .mb-sm-4, - .my-sm-4 { - margin-bottom: 2.25rem !important; } - .ml-sm-4, - .mx-sm-4 { - margin-left: 2.25rem !important; } - .m-sm-5 { - margin: 4.5rem !important; } - .mt-sm-5, - .my-sm-5 { - margin-top: 4.5rem !important; } - .mr-sm-5, - .mx-sm-5 { - margin-right: 4.5rem !important; } - .mb-sm-5, - .my-sm-5 { - margin-bottom: 4.5rem !important; } - .ml-sm-5, - .mx-sm-5 { - margin-left: 4.5rem !important; } - .p-sm-0 { - padding: 0 !important; } - .pt-sm-0, - .py-sm-0 { - padding-top: 0 !important; } - .pr-sm-0, - .px-sm-0 { - padding-right: 0 !important; } - .pb-sm-0, - .py-sm-0 { - padding-bottom: 0 !important; } - .pl-sm-0, - .px-sm-0 { - padding-left: 0 !important; } - .p-sm-1 { - padding: 0.375rem !important; } - .pt-sm-1, - .py-sm-1 { - padding-top: 0.375rem !important; } - .pr-sm-1, - .px-sm-1 { - padding-right: 0.375rem !important; } - .pb-sm-1, - .py-sm-1 { - padding-bottom: 0.375rem !important; } - .pl-sm-1, - .px-sm-1 { - padding-left: 0.375rem !important; } - .p-sm-2 { - padding: 0.75rem !important; } - .pt-sm-2, - .py-sm-2 { - padding-top: 0.75rem !important; } - .pr-sm-2, - .px-sm-2 { - padding-right: 0.75rem !important; } - .pb-sm-2, - .py-sm-2 { - padding-bottom: 0.75rem !important; } - .pl-sm-2, - .px-sm-2 { - padding-left: 0.75rem !important; } - .p-sm-3 { - padding: 1.5rem !important; } - .pt-sm-3, - .py-sm-3 { - padding-top: 1.5rem !important; } - .pr-sm-3, - .px-sm-3 { - padding-right: 1.5rem !important; } - .pb-sm-3, - .py-sm-3 { - padding-bottom: 1.5rem !important; } - .pl-sm-3, - .px-sm-3 { - padding-left: 1.5rem !important; } - .p-sm-4 { - padding: 2.25rem !important; } - .pt-sm-4, - .py-sm-4 { - padding-top: 2.25rem !important; } - .pr-sm-4, - .px-sm-4 { - padding-right: 2.25rem !important; } - .pb-sm-4, - .py-sm-4 { - padding-bottom: 2.25rem !important; } - .pl-sm-4, - .px-sm-4 { - padding-left: 2.25rem !important; } - .p-sm-5 { - padding: 4.5rem !important; } - .pt-sm-5, - .py-sm-5 { - padding-top: 4.5rem !important; } - .pr-sm-5, - .px-sm-5 { - padding-right: 4.5rem !important; } - .pb-sm-5, - .py-sm-5 { - padding-bottom: 4.5rem !important; } - .pl-sm-5, - .px-sm-5 { - padding-left: 4.5rem !important; } - .m-sm-n1 { - margin: -0.375rem !important; } - .mt-sm-n1, - .my-sm-n1 { - margin-top: -0.375rem !important; } - .mr-sm-n1, - .mx-sm-n1 { - margin-right: -0.375rem !important; } - .mb-sm-n1, - .my-sm-n1 { - margin-bottom: -0.375rem !important; } - .ml-sm-n1, - .mx-sm-n1 { - margin-left: -0.375rem !important; } - .m-sm-n2 { - margin: -0.75rem !important; } - .mt-sm-n2, - .my-sm-n2 { - margin-top: -0.75rem !important; } - .mr-sm-n2, - .mx-sm-n2 { - margin-right: -0.75rem !important; } - .mb-sm-n2, - .my-sm-n2 { - margin-bottom: -0.75rem !important; } - .ml-sm-n2, - .mx-sm-n2 { - margin-left: -0.75rem !important; } - .m-sm-n3 { - margin: -1.5rem !important; } - .mt-sm-n3, - .my-sm-n3 { - margin-top: -1.5rem !important; } - .mr-sm-n3, - .mx-sm-n3 { - margin-right: -1.5rem !important; } - .mb-sm-n3, - .my-sm-n3 { - margin-bottom: -1.5rem !important; } - .ml-sm-n3, - .mx-sm-n3 { - margin-left: -1.5rem !important; } - .m-sm-n4 { - margin: -2.25rem !important; } - .mt-sm-n4, - .my-sm-n4 { - margin-top: -2.25rem !important; } - .mr-sm-n4, - .mx-sm-n4 { - margin-right: -2.25rem !important; } - .mb-sm-n4, - .my-sm-n4 { - margin-bottom: -2.25rem !important; } - .ml-sm-n4, - .mx-sm-n4 { - margin-left: -2.25rem !important; } - .m-sm-n5 { - margin: -4.5rem !important; } - .mt-sm-n5, - .my-sm-n5 { - margin-top: -4.5rem !important; } - .mr-sm-n5, - .mx-sm-n5 { - margin-right: -4.5rem !important; } - .mb-sm-n5, - .my-sm-n5 { - margin-bottom: -4.5rem !important; } - .ml-sm-n5, - .mx-sm-n5 { - margin-left: -4.5rem !important; } - .m-sm-auto { - margin: auto !important; } - .mt-sm-auto, - .my-sm-auto { - margin-top: auto !important; } - .mr-sm-auto, - .mx-sm-auto { - margin-right: auto !important; } - .mb-sm-auto, - .my-sm-auto { - margin-bottom: auto !important; } - .ml-sm-auto, - .mx-sm-auto { - margin-left: auto !important; } } - -@media (min-width: 768px) { - .m-md-0 { - margin: 0 !important; } - .mt-md-0, - .my-md-0 { - margin-top: 0 !important; } - .mr-md-0, - .mx-md-0 { - margin-right: 0 !important; } - .mb-md-0, - .my-md-0 { - margin-bottom: 0 !important; } - .ml-md-0, - .mx-md-0 { - margin-left: 0 !important; } - .m-md-1 { - margin: 0.375rem !important; } - .mt-md-1, - .my-md-1 { - margin-top: 0.375rem !important; } - .mr-md-1, - .mx-md-1 { - margin-right: 0.375rem !important; } - .mb-md-1, - .my-md-1 { - margin-bottom: 0.375rem !important; } - .ml-md-1, - .mx-md-1 { - margin-left: 0.375rem !important; } - .m-md-2 { - margin: 0.75rem !important; } - .mt-md-2, - .my-md-2 { - margin-top: 0.75rem !important; } - .mr-md-2, - .mx-md-2 { - margin-right: 0.75rem !important; } - .mb-md-2, - .my-md-2 { - margin-bottom: 0.75rem !important; } - .ml-md-2, - .mx-md-2 { - margin-left: 0.75rem !important; } - .m-md-3 { - margin: 1.5rem !important; } - .mt-md-3, - .my-md-3 { - margin-top: 1.5rem !important; } - .mr-md-3, - .mx-md-3 { - margin-right: 1.5rem !important; } - .mb-md-3, - .my-md-3 { - margin-bottom: 1.5rem !important; } - .ml-md-3, - .mx-md-3 { - margin-left: 1.5rem !important; } - .m-md-4 { - margin: 2.25rem !important; } - .mt-md-4, - .my-md-4 { - margin-top: 2.25rem !important; } - .mr-md-4, - .mx-md-4 { - margin-right: 2.25rem !important; } - .mb-md-4, - .my-md-4 { - margin-bottom: 2.25rem !important; } - .ml-md-4, - .mx-md-4 { - margin-left: 2.25rem !important; } - .m-md-5 { - margin: 4.5rem !important; } - .mt-md-5, - .my-md-5 { - margin-top: 4.5rem !important; } - .mr-md-5, - .mx-md-5 { - margin-right: 4.5rem !important; } - .mb-md-5, - .my-md-5 { - margin-bottom: 4.5rem !important; } - .ml-md-5, - .mx-md-5 { - margin-left: 4.5rem !important; } - .p-md-0 { - padding: 0 !important; } - .pt-md-0, - .py-md-0 { - padding-top: 0 !important; } - .pr-md-0, - .px-md-0 { - padding-right: 0 !important; } - .pb-md-0, - .py-md-0 { - padding-bottom: 0 !important; } - .pl-md-0, - .px-md-0 { - padding-left: 0 !important; } - .p-md-1 { - padding: 0.375rem !important; } - .pt-md-1, - .py-md-1 { - padding-top: 0.375rem !important; } - .pr-md-1, - .px-md-1 { - padding-right: 0.375rem !important; } - .pb-md-1, - .py-md-1 { - padding-bottom: 0.375rem !important; } - .pl-md-1, - .px-md-1 { - padding-left: 0.375rem !important; } - .p-md-2 { - padding: 0.75rem !important; } - .pt-md-2, - .py-md-2 { - padding-top: 0.75rem !important; } - .pr-md-2, - .px-md-2 { - padding-right: 0.75rem !important; } - .pb-md-2, - .py-md-2 { - padding-bottom: 0.75rem !important; } - .pl-md-2, - .px-md-2 { - padding-left: 0.75rem !important; } - .p-md-3 { - padding: 1.5rem !important; } - .pt-md-3, - .py-md-3 { - padding-top: 1.5rem !important; } - .pr-md-3, - .px-md-3 { - padding-right: 1.5rem !important; } - .pb-md-3, - .py-md-3 { - padding-bottom: 1.5rem !important; } - .pl-md-3, - .px-md-3 { - padding-left: 1.5rem !important; } - .p-md-4 { - padding: 2.25rem !important; } - .pt-md-4, - .py-md-4 { - padding-top: 2.25rem !important; } - .pr-md-4, - .px-md-4 { - padding-right: 2.25rem !important; } - .pb-md-4, - .py-md-4 { - padding-bottom: 2.25rem !important; } - .pl-md-4, - .px-md-4 { - padding-left: 2.25rem !important; } - .p-md-5 { - padding: 4.5rem !important; } - .pt-md-5, - .py-md-5 { - padding-top: 4.5rem !important; } - .pr-md-5, - .px-md-5 { - padding-right: 4.5rem !important; } - .pb-md-5, - .py-md-5 { - padding-bottom: 4.5rem !important; } - .pl-md-5, - .px-md-5 { - padding-left: 4.5rem !important; } - .m-md-n1 { - margin: -0.375rem !important; } - .mt-md-n1, - .my-md-n1 { - margin-top: -0.375rem !important; } - .mr-md-n1, - .mx-md-n1 { - margin-right: -0.375rem !important; } - .mb-md-n1, - .my-md-n1 { - margin-bottom: -0.375rem !important; } - .ml-md-n1, - .mx-md-n1 { - margin-left: -0.375rem !important; } - .m-md-n2 { - margin: -0.75rem !important; } - .mt-md-n2, - .my-md-n2 { - margin-top: -0.75rem !important; } - .mr-md-n2, - .mx-md-n2 { - margin-right: -0.75rem !important; } - .mb-md-n2, - .my-md-n2 { - margin-bottom: -0.75rem !important; } - .ml-md-n2, - .mx-md-n2 { - margin-left: -0.75rem !important; } - .m-md-n3 { - margin: -1.5rem !important; } - .mt-md-n3, - .my-md-n3 { - margin-top: -1.5rem !important; } - .mr-md-n3, - .mx-md-n3 { - margin-right: -1.5rem !important; } - .mb-md-n3, - .my-md-n3 { - margin-bottom: -1.5rem !important; } - .ml-md-n3, - .mx-md-n3 { - margin-left: -1.5rem !important; } - .m-md-n4 { - margin: -2.25rem !important; } - .mt-md-n4, - .my-md-n4 { - margin-top: -2.25rem !important; } - .mr-md-n4, - .mx-md-n4 { - margin-right: -2.25rem !important; } - .mb-md-n4, - .my-md-n4 { - margin-bottom: -2.25rem !important; } - .ml-md-n4, - .mx-md-n4 { - margin-left: -2.25rem !important; } - .m-md-n5 { - margin: -4.5rem !important; } - .mt-md-n5, - .my-md-n5 { - margin-top: -4.5rem !important; } - .mr-md-n5, - .mx-md-n5 { - margin-right: -4.5rem !important; } - .mb-md-n5, - .my-md-n5 { - margin-bottom: -4.5rem !important; } - .ml-md-n5, - .mx-md-n5 { - margin-left: -4.5rem !important; } - .m-md-auto { - margin: auto !important; } - .mt-md-auto, - .my-md-auto { - margin-top: auto !important; } - .mr-md-auto, - .mx-md-auto { - margin-right: auto !important; } - .mb-md-auto, - .my-md-auto { - margin-bottom: auto !important; } - .ml-md-auto, - .mx-md-auto { - margin-left: auto !important; } } - -@media (min-width: 992px) { - .m-lg-0 { - margin: 0 !important; } - .mt-lg-0, - .my-lg-0 { - margin-top: 0 !important; } - .mr-lg-0, - .mx-lg-0 { - margin-right: 0 !important; } - .mb-lg-0, - .my-lg-0 { - margin-bottom: 0 !important; } - .ml-lg-0, - .mx-lg-0 { - margin-left: 0 !important; } - .m-lg-1 { - margin: 0.375rem !important; } - .mt-lg-1, - .my-lg-1 { - margin-top: 0.375rem !important; } - .mr-lg-1, - .mx-lg-1 { - margin-right: 0.375rem !important; } - .mb-lg-1, - .my-lg-1 { - margin-bottom: 0.375rem !important; } - .ml-lg-1, - .mx-lg-1 { - margin-left: 0.375rem !important; } - .m-lg-2 { - margin: 0.75rem !important; } - .mt-lg-2, - .my-lg-2 { - margin-top: 0.75rem !important; } - .mr-lg-2, - .mx-lg-2 { - margin-right: 0.75rem !important; } - .mb-lg-2, - .my-lg-2 { - margin-bottom: 0.75rem !important; } - .ml-lg-2, - .mx-lg-2 { - margin-left: 0.75rem !important; } - .m-lg-3 { - margin: 1.5rem !important; } - .mt-lg-3, - .my-lg-3 { - margin-top: 1.5rem !important; } - .mr-lg-3, - .mx-lg-3 { - margin-right: 1.5rem !important; } - .mb-lg-3, - .my-lg-3 { - margin-bottom: 1.5rem !important; } - .ml-lg-3, - .mx-lg-3 { - margin-left: 1.5rem !important; } - .m-lg-4 { - margin: 2.25rem !important; } - .mt-lg-4, - .my-lg-4 { - margin-top: 2.25rem !important; } - .mr-lg-4, - .mx-lg-4 { - margin-right: 2.25rem !important; } - .mb-lg-4, - .my-lg-4 { - margin-bottom: 2.25rem !important; } - .ml-lg-4, - .mx-lg-4 { - margin-left: 2.25rem !important; } - .m-lg-5 { - margin: 4.5rem !important; } - .mt-lg-5, - .my-lg-5 { - margin-top: 4.5rem !important; } - .mr-lg-5, - .mx-lg-5 { - margin-right: 4.5rem !important; } - .mb-lg-5, - .my-lg-5 { - margin-bottom: 4.5rem !important; } - .ml-lg-5, - .mx-lg-5 { - margin-left: 4.5rem !important; } - .p-lg-0 { - padding: 0 !important; } - .pt-lg-0, - .py-lg-0 { - padding-top: 0 !important; } - .pr-lg-0, - .px-lg-0 { - padding-right: 0 !important; } - .pb-lg-0, - .py-lg-0 { - padding-bottom: 0 !important; } - .pl-lg-0, - .px-lg-0 { - padding-left: 0 !important; } - .p-lg-1 { - padding: 0.375rem !important; } - .pt-lg-1, - .py-lg-1 { - padding-top: 0.375rem !important; } - .pr-lg-1, - .px-lg-1 { - padding-right: 0.375rem !important; } - .pb-lg-1, - .py-lg-1 { - padding-bottom: 0.375rem !important; } - .pl-lg-1, - .px-lg-1 { - padding-left: 0.375rem !important; } - .p-lg-2 { - padding: 0.75rem !important; } - .pt-lg-2, - .py-lg-2 { - padding-top: 0.75rem !important; } - .pr-lg-2, - .px-lg-2 { - padding-right: 0.75rem !important; } - .pb-lg-2, - .py-lg-2 { - padding-bottom: 0.75rem !important; } - .pl-lg-2, - .px-lg-2 { - padding-left: 0.75rem !important; } - .p-lg-3 { - padding: 1.5rem !important; } - .pt-lg-3, - .py-lg-3 { - padding-top: 1.5rem !important; } - .pr-lg-3, - .px-lg-3 { - padding-right: 1.5rem !important; } - .pb-lg-3, - .py-lg-3 { - padding-bottom: 1.5rem !important; } - .pl-lg-3, - .px-lg-3 { - padding-left: 1.5rem !important; } - .p-lg-4 { - padding: 2.25rem !important; } - .pt-lg-4, - .py-lg-4 { - padding-top: 2.25rem !important; } - .pr-lg-4, - .px-lg-4 { - padding-right: 2.25rem !important; } - .pb-lg-4, - .py-lg-4 { - padding-bottom: 2.25rem !important; } - .pl-lg-4, - .px-lg-4 { - padding-left: 2.25rem !important; } - .p-lg-5 { - padding: 4.5rem !important; } - .pt-lg-5, - .py-lg-5 { - padding-top: 4.5rem !important; } - .pr-lg-5, - .px-lg-5 { - padding-right: 4.5rem !important; } - .pb-lg-5, - .py-lg-5 { - padding-bottom: 4.5rem !important; } - .pl-lg-5, - .px-lg-5 { - padding-left: 4.5rem !important; } - .m-lg-n1 { - margin: -0.375rem !important; } - .mt-lg-n1, - .my-lg-n1 { - margin-top: -0.375rem !important; } - .mr-lg-n1, - .mx-lg-n1 { - margin-right: -0.375rem !important; } - .mb-lg-n1, - .my-lg-n1 { - margin-bottom: -0.375rem !important; } - .ml-lg-n1, - .mx-lg-n1 { - margin-left: -0.375rem !important; } - .m-lg-n2 { - margin: -0.75rem !important; } - .mt-lg-n2, - .my-lg-n2 { - margin-top: -0.75rem !important; } - .mr-lg-n2, - .mx-lg-n2 { - margin-right: -0.75rem !important; } - .mb-lg-n2, - .my-lg-n2 { - margin-bottom: -0.75rem !important; } - .ml-lg-n2, - .mx-lg-n2 { - margin-left: -0.75rem !important; } - .m-lg-n3 { - margin: -1.5rem !important; } - .mt-lg-n3, - .my-lg-n3 { - margin-top: -1.5rem !important; } - .mr-lg-n3, - .mx-lg-n3 { - margin-right: -1.5rem !important; } - .mb-lg-n3, - .my-lg-n3 { - margin-bottom: -1.5rem !important; } - .ml-lg-n3, - .mx-lg-n3 { - margin-left: -1.5rem !important; } - .m-lg-n4 { - margin: -2.25rem !important; } - .mt-lg-n4, - .my-lg-n4 { - margin-top: -2.25rem !important; } - .mr-lg-n4, - .mx-lg-n4 { - margin-right: -2.25rem !important; } - .mb-lg-n4, - .my-lg-n4 { - margin-bottom: -2.25rem !important; } - .ml-lg-n4, - .mx-lg-n4 { - margin-left: -2.25rem !important; } - .m-lg-n5 { - margin: -4.5rem !important; } - .mt-lg-n5, - .my-lg-n5 { - margin-top: -4.5rem !important; } - .mr-lg-n5, - .mx-lg-n5 { - margin-right: -4.5rem !important; } - .mb-lg-n5, - .my-lg-n5 { - margin-bottom: -4.5rem !important; } - .ml-lg-n5, - .mx-lg-n5 { - margin-left: -4.5rem !important; } - .m-lg-auto { - margin: auto !important; } - .mt-lg-auto, - .my-lg-auto { - margin-top: auto !important; } - .mr-lg-auto, - .mx-lg-auto { - margin-right: auto !important; } - .mb-lg-auto, - .my-lg-auto { - margin-bottom: auto !important; } - .ml-lg-auto, - .mx-lg-auto { - margin-left: auto !important; } } - -@media (min-width: 1200px) { - .m-xl-0 { - margin: 0 !important; } - .mt-xl-0, - .my-xl-0 { - margin-top: 0 !important; } - .mr-xl-0, - .mx-xl-0 { - margin-right: 0 !important; } - .mb-xl-0, - .my-xl-0 { - margin-bottom: 0 !important; } - .ml-xl-0, - .mx-xl-0 { - margin-left: 0 !important; } - .m-xl-1 { - margin: 0.375rem !important; } - .mt-xl-1, - .my-xl-1 { - margin-top: 0.375rem !important; } - .mr-xl-1, - .mx-xl-1 { - margin-right: 0.375rem !important; } - .mb-xl-1, - .my-xl-1 { - margin-bottom: 0.375rem !important; } - .ml-xl-1, - .mx-xl-1 { - margin-left: 0.375rem !important; } - .m-xl-2 { - margin: 0.75rem !important; } - .mt-xl-2, - .my-xl-2 { - margin-top: 0.75rem !important; } - .mr-xl-2, - .mx-xl-2 { - margin-right: 0.75rem !important; } - .mb-xl-2, - .my-xl-2 { - margin-bottom: 0.75rem !important; } - .ml-xl-2, - .mx-xl-2 { - margin-left: 0.75rem !important; } - .m-xl-3 { - margin: 1.5rem !important; } - .mt-xl-3, - .my-xl-3 { - margin-top: 1.5rem !important; } - .mr-xl-3, - .mx-xl-3 { - margin-right: 1.5rem !important; } - .mb-xl-3, - .my-xl-3 { - margin-bottom: 1.5rem !important; } - .ml-xl-3, - .mx-xl-3 { - margin-left: 1.5rem !important; } - .m-xl-4 { - margin: 2.25rem !important; } - .mt-xl-4, - .my-xl-4 { - margin-top: 2.25rem !important; } - .mr-xl-4, - .mx-xl-4 { - margin-right: 2.25rem !important; } - .mb-xl-4, - .my-xl-4 { - margin-bottom: 2.25rem !important; } - .ml-xl-4, - .mx-xl-4 { - margin-left: 2.25rem !important; } - .m-xl-5 { - margin: 4.5rem !important; } - .mt-xl-5, - .my-xl-5 { - margin-top: 4.5rem !important; } - .mr-xl-5, - .mx-xl-5 { - margin-right: 4.5rem !important; } - .mb-xl-5, - .my-xl-5 { - margin-bottom: 4.5rem !important; } - .ml-xl-5, - .mx-xl-5 { - margin-left: 4.5rem !important; } - .p-xl-0 { - padding: 0 !important; } - .pt-xl-0, - .py-xl-0 { - padding-top: 0 !important; } - .pr-xl-0, - .px-xl-0 { - padding-right: 0 !important; } - .pb-xl-0, - .py-xl-0 { - padding-bottom: 0 !important; } - .pl-xl-0, - .px-xl-0 { - padding-left: 0 !important; } - .p-xl-1 { - padding: 0.375rem !important; } - .pt-xl-1, - .py-xl-1 { - padding-top: 0.375rem !important; } - .pr-xl-1, - .px-xl-1 { - padding-right: 0.375rem !important; } - .pb-xl-1, - .py-xl-1 { - padding-bottom: 0.375rem !important; } - .pl-xl-1, - .px-xl-1 { - padding-left: 0.375rem !important; } - .p-xl-2 { - padding: 0.75rem !important; } - .pt-xl-2, - .py-xl-2 { - padding-top: 0.75rem !important; } - .pr-xl-2, - .px-xl-2 { - padding-right: 0.75rem !important; } - .pb-xl-2, - .py-xl-2 { - padding-bottom: 0.75rem !important; } - .pl-xl-2, - .px-xl-2 { - padding-left: 0.75rem !important; } - .p-xl-3 { - padding: 1.5rem !important; } - .pt-xl-3, - .py-xl-3 { - padding-top: 1.5rem !important; } - .pr-xl-3, - .px-xl-3 { - padding-right: 1.5rem !important; } - .pb-xl-3, - .py-xl-3 { - padding-bottom: 1.5rem !important; } - .pl-xl-3, - .px-xl-3 { - padding-left: 1.5rem !important; } - .p-xl-4 { - padding: 2.25rem !important; } - .pt-xl-4, - .py-xl-4 { - padding-top: 2.25rem !important; } - .pr-xl-4, - .px-xl-4 { - padding-right: 2.25rem !important; } - .pb-xl-4, - .py-xl-4 { - padding-bottom: 2.25rem !important; } - .pl-xl-4, - .px-xl-4 { - padding-left: 2.25rem !important; } - .p-xl-5 { - padding: 4.5rem !important; } - .pt-xl-5, - .py-xl-5 { - padding-top: 4.5rem !important; } - .pr-xl-5, - .px-xl-5 { - padding-right: 4.5rem !important; } - .pb-xl-5, - .py-xl-5 { - padding-bottom: 4.5rem !important; } - .pl-xl-5, - .px-xl-5 { - padding-left: 4.5rem !important; } - .m-xl-n1 { - margin: -0.375rem !important; } - .mt-xl-n1, - .my-xl-n1 { - margin-top: -0.375rem !important; } - .mr-xl-n1, - .mx-xl-n1 { - margin-right: -0.375rem !important; } - .mb-xl-n1, - .my-xl-n1 { - margin-bottom: -0.375rem !important; } - .ml-xl-n1, - .mx-xl-n1 { - margin-left: -0.375rem !important; } - .m-xl-n2 { - margin: -0.75rem !important; } - .mt-xl-n2, - .my-xl-n2 { - margin-top: -0.75rem !important; } - .mr-xl-n2, - .mx-xl-n2 { - margin-right: -0.75rem !important; } - .mb-xl-n2, - .my-xl-n2 { - margin-bottom: -0.75rem !important; } - .ml-xl-n2, - .mx-xl-n2 { - margin-left: -0.75rem !important; } - .m-xl-n3 { - margin: -1.5rem !important; } - .mt-xl-n3, - .my-xl-n3 { - margin-top: -1.5rem !important; } - .mr-xl-n3, - .mx-xl-n3 { - margin-right: -1.5rem !important; } - .mb-xl-n3, - .my-xl-n3 { - margin-bottom: -1.5rem !important; } - .ml-xl-n3, - .mx-xl-n3 { - margin-left: -1.5rem !important; } - .m-xl-n4 { - margin: -2.25rem !important; } - .mt-xl-n4, - .my-xl-n4 { - margin-top: -2.25rem !important; } - .mr-xl-n4, - .mx-xl-n4 { - margin-right: -2.25rem !important; } - .mb-xl-n4, - .my-xl-n4 { - margin-bottom: -2.25rem !important; } - .ml-xl-n4, - .mx-xl-n4 { - margin-left: -2.25rem !important; } - .m-xl-n5 { - margin: -4.5rem !important; } - .mt-xl-n5, - .my-xl-n5 { - margin-top: -4.5rem !important; } - .mr-xl-n5, - .mx-xl-n5 { - margin-right: -4.5rem !important; } - .mb-xl-n5, - .my-xl-n5 { - margin-bottom: -4.5rem !important; } - .ml-xl-n5, - .mx-xl-n5 { - margin-left: -4.5rem !important; } - .m-xl-auto { - margin: auto !important; } - .mt-xl-auto, - .my-xl-auto { - margin-top: auto !important; } - .mr-xl-auto, - .mx-xl-auto { - margin-right: auto !important; } - .mb-xl-auto, - .my-xl-auto { - margin-bottom: auto !important; } - .ml-xl-auto, - .mx-xl-auto { - margin-left: auto !important; } } - -.text-monospace { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; } - -.text-justify { - text-align: justify !important; } - -.text-wrap { - white-space: normal !important; } - -.text-nowrap { - white-space: nowrap !important; } - -.text-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; } - -.text-left { - text-align: left !important; } - -.text-right { - text-align: right !important; } - -.text-center { - text-align: center !important; } - -@media (min-width: 576px) { - .text-sm-left { - text-align: left !important; } - .text-sm-right { - text-align: right !important; } - .text-sm-center { - text-align: center !important; } } - -@media (min-width: 768px) { - .text-md-left { - text-align: left !important; } - .text-md-right { - text-align: right !important; } - .text-md-center { - text-align: center !important; } } - -@media (min-width: 992px) { - .text-lg-left { - text-align: left !important; } - .text-lg-right { - text-align: right !important; } - .text-lg-center { - text-align: center !important; } } - -@media (min-width: 1200px) { - .text-xl-left { - text-align: left !important; } - .text-xl-right { - text-align: right !important; } - .text-xl-center { - text-align: center !important; } } - -.text-lowercase { - text-transform: lowercase !important; } - -.text-uppercase { - text-transform: uppercase !important; } - -.text-capitalize { - text-transform: capitalize !important; } - -.font-weight-light { - font-weight: 300 !important; } - -.font-weight-lighter { - font-weight: lighter !important; } - -.font-weight-normal { - font-weight: 200 !important; } - -.font-weight-bold { - font-weight: 700 !important; } - -.font-weight-bolder { - font-weight: bolder !important; } - -.font-italic { - font-style: italic !important; } - -.text-white { - color: #fff !important; } - -.text-primary { - color: #12bbad !important; } - -a.text-primary:hover, a.text-primary:focus { - color: #0b756c !important; } - -.text-secondary { - color: #4f70ce !important; } - -a.text-secondary:hover, a.text-secondary:focus { - color: #2d4ca3 !important; } - -.text-success { - color: #28a745 !important; } - -a.text-success:hover, a.text-success:focus { - color: #19692c !important; } - -.text-info { - color: #ccc !important; } - -a.text-info:hover, a.text-info:focus { - color: #a6a6a6 !important; } - -.text-warning { - color: #ffc107 !important; } - -a.text-warning:hover, a.text-warning:focus { - color: #ba8b00 !important; } - -.text-danger { - color: #dc3545 !important; } - -a.text-danger:hover, a.text-danger:focus { - color: #a71d2a !important; } - -.text-light { - color: #f3f3f3 !important; } - -a.text-light:hover, a.text-light:focus { - color: #cdcdcd !important; } - -.text-dark { - color: #151515 !important; } - -a.text-dark:hover, a.text-dark:focus { - color: black !important; } - -.text-body { - color: #333 !important; } - -.text-muted { - color: #6c757d !important; } - -.text-black-50 { - color: rgba(0, 0, 0, 0.5) !important; } - -.text-white-50 { - color: rgba(255, 255, 255, 0.5) !important; } - -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; } - -.text-decoration-none { - text-decoration: none !important; } - -.text-break { - word-break: break-word !important; - overflow-wrap: break-word !important; } - -.text-reset { - color: inherit !important; } - -.visible { - visibility: visible !important; } - -.invisible { - visibility: hidden !important; } - -@media print { - *, - *::before, - *::after { - text-shadow: none !important; - box-shadow: none !important; } - a:not(.btn) { - text-decoration: underline; } - abbr[title]::after { - content: " (" attr(title) ")"; } - pre { - white-space: pre-wrap !important; } - pre, - blockquote { - border: 1px solid #adb5bd; - page-break-inside: avoid; } - thead { - display: table-header-group; } - tr, - img { - page-break-inside: avoid; } - p, - h2, - h3 { - orphans: 3; - widows: 3; } - h2, - h3 { - page-break-after: avoid; } - @page { - size: a3; } - body { - min-width: 992px !important; } - .container { - min-width: 992px !important; } - .navbar { - display: none; } - .badge { - border: 1px solid #000; } - .table { - border-collapse: collapse !important; } - .table td, - .table th { - background-color: #fff !important; } - .table-bordered th, - .table-bordered td { - border: 1px solid #dee2e6 !important; } - .table-dark { - color: inherit; } - .table-dark th, - .table-dark td, - .table-dark thead th, - .table-dark tbody + tbody { - border-color: #dee2e6; } - .table .thead-dark th { - color: inherit; - border-color: #dee2e6; } } diff --git a/idm/static/css/theme.scss b/idm/static/css/theme.scss deleted file mode 100644 index 3f12c3d..0000000 --- a/idm/static/css/theme.scss +++ /dev/null @@ -1,44 +0,0 @@ -// Options -// -// Quickly modify global styling by enabling or disabling optional features. - -$enable-rounded: true !default; -$enable-shadows: true; -$enable-transitions: true; -$enable-hover-media-query: false; -$enable-grid-classes: true; -$enable-print-styles: true; - -// Variables -// -// Colors - -$theme-colors: ( - primary: #12bbad, - secondary: #4f70ce, - light: #f3f3f3, - dark: #151515, - info: #ccc, - success: #28a745, - warning: #ffc107, - danger: #dc3545 -); - -$body-bg: white; -$body-color: #333; - - -$body-color-inverse: invert($body-color) !default; -$link-color: #12bbad; - -// Fonts -$font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; -$headings-font-family: $font-family-base; -$display-font-family: $font-family-base; -$font-weight-normal: 200; -$headings-font-weight: 200; -$lead-font-size: 1.30rem; - -$spacer: 1.5rem; - -@import 'bootstrap-4.3.1'; diff --git a/idm/static/img/socials/github.png b/idm/static/img/socials/github.png deleted file mode 100644 index 9502f55..0000000 Binary files a/idm/static/img/socials/github.png and /dev/null differ diff --git a/idm/static/img/socials/vkblue.png b/idm/static/img/socials/vkblue.png deleted file mode 100644 index d766851..0000000 Binary files a/idm/static/img/socials/vkblue.png and /dev/null differ diff --git a/idm/static/img/socials/vkmonochrome.png b/idm/static/img/socials/vkmonochrome.png deleted file mode 100644 index 1436e0b..0000000 Binary files a/idm/static/img/socials/vkmonochrome.png and /dev/null differ diff --git a/idm/templates/layout.html b/idm/templates/layout.html deleted file mode 100644 index 3272a88..0000000 --- a/idm/templates/layout.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Iris duty manager - - - - - -
- - -
-
-
-
-

Для работы сайта требуется cookies, пожалуйста включите их.

- -
-
-
-
-
- -
- {% block pagecontent %} - {% endblock pagecontent %} -
- - -
-
-
-
-
- Copyright © , Юрий Юшманов. -
- -
-
- -
- - - \ No newline at end of file diff --git a/idm/templates/pages/admin.html b/idm/templates/pages/admin.html deleted file mode 100644 index 19a032a..0000000 --- a/idm/templates/pages/admin.html +++ /dev/null @@ -1,83 +0,0 @@ -{% extends 'layout.html' %} -{% block pagecontent %} - -
-
-
-
-

Настройки

-
-
-
- -
- - - - Секретный код дежурного будет отправляться при каждом сигнале от Ириса. Её смысл в проверке достоверности запроса. Никому не говорите секретный код дежурного. - -
- -
- - - - Как вариант получить токен от Kate Mobile - тут. - -
- -
- - - - Как вариант получить токен - тут. - -
- - - - - - - - - -
- -
-
-
-
-
-

Фраза, которую надо отправить в ЛС Iris:

-

+api {{db.secret}} https://{{db.host}}/callback

-
- -
-
-
-
- -{% endblock pagecontent %} \ No newline at end of file diff --git a/idm/templates/pages/index.html b/idm/templates/pages/index.html deleted file mode 100644 index 40651fe..0000000 --- a/idm/templates/pages/index.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'layout.html' %} -{% block pagecontent %} -{% if installed %} - -{% else %} -
-
-
-
-

IDM установлен, но не настроен. Прейдите на страницу настройки.

-
-
-
-
- -{% endif %} -{% endblock pagecontent %} \ No newline at end of file diff --git a/idm/templates/pages/install.html b/idm/templates/pages/install.html deleted file mode 100644 index 424dd6a..0000000 --- a/idm/templates/pages/install.html +++ /dev/null @@ -1,138 +0,0 @@ -{% extends 'layout.html' %} -{% block pagecontent %} - -{% if installed %} - -
-
-
-
-

Упс, кажется IDM уже установлен. Если Вы ошиблись в данных, то можете сбросить дежурного.

-
-
-
-
- - -
- -
-
-
-
-
- -
-
- -
-
- -{% else %} - -
-
-
-
-
-
- - - - Можно узнать тут. - -
- -
- - - - Секретный код дежурного будет отправляться при каждом сигнале от Ириса. Её смысл в проверке достоверности запроса. Никому не говорите секретный код дежурного. - -
- -
- - - - Как вариант получить токен от Kate Mobile - тут. - -
-
- - - - Как вариант получить токен - тут. - -
- - - - -
- - - - Получить можно при создании приложения. - Страница создания - -
- -
- - - - Получить можно при создании приложения. - Страница создания - -
- - - -
- -
-
-
-
-
-
- - - -{% endif %} -{% endblock pagecontent %} \ No newline at end of file diff --git a/idm/templates/pages/login.html b/idm/templates/pages/login.html deleted file mode 100644 index e50ee61..0000000 --- a/idm/templates/pages/login.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends 'layout.html' %} -{% block pagecontent %} - -
-
-
-
- -
- -
-
-
-
- - -{% endblock pagecontent %} \ No newline at end of file diff --git a/idm/utils.py b/idm/utils.py deleted file mode 100644 index 5803828..0000000 --- a/idm/utils.py +++ /dev/null @@ -1,70 +0,0 @@ -from .objects import DB -from vkapi import VkApi, VkApiResponseException -import json -from flask import render_template -import typing -import time -import re - -def get_all_history_gen(vk: VkApi, chat_id: int) -> typing.Generator[dict, None, None]: - __offset = 0 - chat = vk("messages.getHistory", count=1, peer_id=chat_id, offset=__offset) - count = chat['count'] - while __offset < count: - chat = {} - - try: - - chat = vk("messages.getHistory", count=200, - peer_id=chat_id, offset=__offset) - time.sleep(1) - except: - time.sleep(3) - continue - - __offset += 200 - for item in chat['items']: - yield item - -def get_msg_id(vk: VkApi, chat_id: int, local_id: int) -> typing.Union[int, None]: - try: - data = vk("messages.getByConversationMessageId", peer_id=chat_id, conversation_message_ids=local_id) - return data['items'][0]['id'] - except: - return None - -def get_msg(vk: VkApi, chat_id: int, local_id: int)-> typing.Union[dict, None]: - try: - data = vk("messages.getByConversationMessageId", peer_id=chat_id, conversation_message_ids=local_id) - if len(data['items']) != 0: - return data['items'][0] - return None - except: - return None - -def get_msg_ids(vk: VkApi, chat_id: int, local_ids: list) -> typing.Generator[int, None, list]: - try: - local_ids = [str(li) for li in local_ids] - data = vk("messages.getByConversationMessageId", peer_id=chat_id, conversation_message_ids=",".join(local_ids)) - for item in data['items']: - yield item['id'] - except: - return [] - -def search_user_id(s: str) -> typing.Union[int, None]: - regexp = r"id([\d]+)" - data = re.findall(regexp, s) - if len(data) == 0:return None - else:return int(data[0]) - -def search_group_id(s: str) -> typing.Union[int, None]: - regexp = r"club([\d]+)" - data = re.findall(regexp, s) - if len(data) == 0:return None - else:return int(data[0]) - -def edit_message(api: VkApi, chat_id: int, msg_id: int, **kwargs) -> int: - return api("messages.edit", peer_id=chat_id, message_id=msg_id, **kwargs) - -def new_message(api: VkApi, chat_id: int, **kwargs) -> int: - return api("messages.send", random_id=0, peer_id=chat_id, **kwargs) \ No newline at end of file diff --git a/logger.py b/logger.py new file mode 100644 index 0000000..21c2b14 --- /dev/null +++ b/logger.py @@ -0,0 +1,61 @@ +import os +from datetime import datetime, timezone, timedelta + + +_DEBUG: bool = (os.environ.get('FLASK_ENV') == 'development') +_LOG_PATH = os.path.join( + os.path.dirname(os.path.abspath(__file__)), 'duty.log' +) + + +class NamedWriter: + def __init__(self, name): + self.name = name + + def __call__(self, text): + return self.info(text) + + def _write(self, text, level): + date = datetime.now(timezone(timedelta(hours=3))).strftime( + '%Y-%m-%d %H-%M-%S' + ) + line = f"{date} | {level} ({self.name}) {text}" + with open(_LOG_PATH, 'a', encoding='utf-8') as log: + log.write(line + '\n') + if _DEBUG: + print(line) + + def trace(self, text): + if not _DEBUG: + return + self._write(text, 'TRACE') + + def debug(self, text): + if not _DEBUG: + return + self._write(text, 'DEBUG') + + def info(self, text): + self._write(text, 'INFO') + + def warning(self, text): + self._write(text, 'WARNING') + + def error(self, text): + self._write(text, 'ERROR') + + def critical(self, text): + self._write(text, 'CRITICAL') + + +def get_writer(name: str): + return NamedWriter(name) + + +with open(_LOG_PATH + '.backup', 'w', encoding='utf-8') as backup: + try: + backup.write(open(_LOG_PATH, 'r', encoding='utf-8').read()) + except Exception: + pass + +open(_LOG_PATH, 'w').close() diff --git a/microvk/__init__.py b/microvk/__init__.py new file mode 100644 index 0000000..8bcb5b8 --- /dev/null +++ b/microvk/__init__.py @@ -0,0 +1,2 @@ +from .api import VkApi, VkApiResponseException +from .user_longpoll import LP diff --git a/microvk/api.py b/microvk/api.py new file mode 100644 index 0000000..b14a22b --- /dev/null +++ b/microvk/api.py @@ -0,0 +1,83 @@ +from typing import Any + +import requests + +from logger import get_writer + +from .methods import Messages + +logger = get_writer('VK API') + + +class VkApiResponseException(Exception): + def __init__(self, *args, **kwargs): + self.error_code = kwargs.get('error_code', None) + self.error_msg = kwargs.get('error_msg', None) + self.request_params = kwargs.get('request_params', None) + + self.args = args + self.kwargs = kwargs + + def __str__(self): + return 'Ошибка #%s: "%s"' % (self.error_code, self.error_msg) + + +class VkApi: + url: str = 'https://api.vk.com/method/' + query: str + raise_excepts: bool + + messages = Messages + + def __init__(self, access_token: str, raise_excepts: bool = False, version: str = "5.110"): + 'raise_excepts - если True, ошибки ВК будут вызывать исключения' + self.query = f'?v={version}&access_token={access_token}&lang=ru' + self.raise_excepts = raise_excepts + + def __call__(self, method, **kwargs) -> Any: + logger.debug(f'URL = "{self.url}{method}{self.query}" Data = {kwargs}') + r = requests.post(f'{self.url}{method}{self.query}', data=kwargs) + if r.status_code == 200: + r = r.json() + if 'response' in r.keys(): + logger.info(f"Запрос {method} выполнен") + return r['response'] + elif 'error' in r.keys(): + logger.warning(f"Запрос {method} не выполнен: {r['error']}") + if self.raise_excepts: + raise VkApiResponseException(**r["error"]) + return r + elif self.raise_excepts: + raise Exception('networkerror') + + def method(self, method, **kwargs): + return self.__call__(method, **kwargs) + + def message_send(self, message: str, peer_id: int, **kwargs): + return self.msg_op(1, peer_id, message, **kwargs) + + def msg_op(self, mode: int, peer_id: int = 0, message = '', msg_id = '', **kwargs): + '''mode: 1 - отправка, 2 - редактирование, 3 - удаление, 4 - удаление только для себя''' + + if mode == 4: + mode = 3 + dfa = 0 + else: + dfa = 1 + + method = ['messages.send', 'messages.edit', 'messages.delete'][mode - 1] + + return self( + method, + peer_id=peer_id, + message=message, + message_id=msg_id, + delete_for_all=dfa, + random_id=0, + **kwargs + ) + + def exe(self, code, token: 'str | None' = None): + if token: + return VkApi(token)('execute', code = code) + return self('execute', code = code) diff --git a/microvk/methods.py b/microvk/methods.py new file mode 100644 index 0000000..36eda65 --- /dev/null +++ b/microvk/methods.py @@ -0,0 +1,42 @@ +# да, я сделал эту фигню только чтобы IDE подсвечивала методы +# и че? + +class Messages: + addChatUser = 'messages.addChatUser' + allowMessagesFromGroup = 'messages.allowMessagesFromGroup' + createChat = 'messages.createChat' + delete = 'messages.delete' + deleteChatPhoto = 'messages.deleteChatPhoto' + deleteConversation = 'messages.deleteConversation' + denyMessagesFromGroup = 'messages.denyMessagesFromGroup' + edit = 'messages.edit' + editChat = 'messages.editChat' + getByConversationMessageId = 'messages.getByConversationMessageId' + getById = 'messages.getById' + getChat = 'messages.getChat' + getChatPreview = 'messages.getChatPreview' + getConversationMembers = 'messages.getConversationMembers' + getConversations = 'messages.getConversations' + getConversationsById = 'messages.getConversationsById' + getHistory = 'messages.getHistory' + getHistoryAttachments = 'messages.getHistoryAttachments' + getImportantMessages = 'messages.getImportantMessages' + getInviteLink = 'messages.getInviteLink' + getLastActivity = 'messages.getLastActivity' + getLongPollHistory = 'messages.getLongPollHistory' + getLongPollServer = 'messages.getLongPollServer' + isMessagesFromGroupAllowed = 'messages.isMessagesFromGroupAllowed' + joinChatByInviteLink = 'messages.joinChatByInviteLink' + markAsAnsweredConversation = 'messages.markAsAnsweredConversation' + markAsImportant = 'messages.markAsImportant' + markAsImportantConversation = 'messages.markAsImportantConversation' + markAsRead = 'messages.markAsRead' + pin = 'messages.pin' + removeChatUser = 'messages.removeChatUser' + restore = 'messages.restore' + search = 'messages.search' + searchConversations = 'messages.searchConversations' + send = 'messages.send' + setActivity = 'messages.setActivity' + setChatPhoto = 'messages.setChatPhoto' + unpin = 'messages.unpin' \ No newline at end of file diff --git a/microvk/user_longpoll.py b/microvk/user_longpoll.py new file mode 100644 index 0000000..9449ebc --- /dev/null +++ b/microvk/user_longpoll.py @@ -0,0 +1,51 @@ +import requests +from . import VkApi +from datetime import datetime + +from logger import get_writer +logger = get_writer('VK LongPoll') + +class LP(): + key: str + server:str + ts: int + time: float + vk: VkApi + wait: int + + def __init__(self, vk, wait = 25): + 'vk - экземпляр VkApi' + self.vk = vk + data = vk('messages.getLongPollServer') + if data.get('error'): + if data['error']['error_code'] == 5: + raise Exception('tokenfail') + self.server = data['server'] + self.key = data['key'] + self.ts = data['ts'] + self.wait = wait + + @property + def check(self): + 'Возвращает список событий (updates)' + response = requests.get(f"http://{self.server}?act=a_check&key={self.key}&ts={self.ts}&wait={self.wait}&version=3&mode=2") + + if response.status_code != 200: + logger.error('Ошибка сети') + return [] + + self.time = datetime.now().timestamp() + data = response.json() + + if 'failed' in data.keys(): + if data['failed'] == 1: + logger.error('Ошибка истории событий') + self.ts = data['ts'] + elif data['failed'] == 2: + self.key = self.vk('messages.getLongPollServer')['key'] + else: + raise Exception('Информация о пользователе утрачена') + return [] + else: + self.ts = data['ts'] + return data['updates'] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5eaf725 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +flask +requests \ No newline at end of file diff --git a/routes.py b/routes.py deleted file mode 100644 index 5903752..0000000 --- a/routes.py +++ /dev/null @@ -1 +0,0 @@ -from idm import app \ No newline at end of file diff --git a/simpledemotivators/Demotivator.py b/simpledemotivators/Demotivator.py new file mode 100644 index 0000000..2e40e29 --- /dev/null +++ b/simpledemotivators/Demotivator.py @@ -0,0 +1,50 @@ +from PIL import Image, ImageDraw, ImageFont, ImageOps +import os + + +class Demotivator: + def __init__(self, top_text='', bottom_text=''): + self._top_text = top_text + self._bottom_text = bottom_text + + def create(self, file: str) -> bool: + + font_name = (os.path.join(os.getcwd(), 'ICAD', 'simpledemotivators', 'times.ttf')) + top_size = 80 + bottom_size = 60 + font_color = 'white' + fill_color = 'black' + + img = Image.new('RGB', (1280, 1024), color=fill_color) + img_border = Image.new('RGB', (1060, 720), color='#000000') + border = ImageOps.expand(img_border, border=2, fill='#ffffff') + user_img = Image.open(file).convert("RGBA").resize((1050, 710)) + (width, height) = user_img.size + img.paste(border, (111, 96)) + img.paste(user_img, (118, 103)) + drawer = ImageDraw.Draw(img) + + font_1 = ImageFont.truetype(font=font_name, size=top_size, encoding='UTF-8') + text_width = font_1.getsize(self._top_text)[0] + + while text_width >= (width + 250) - 20: + font_1 = ImageFont.truetype(font=font_name, size=top_size, encoding='UTF-8') + text_width = font_1.getsize(self._top_text)[0] + top_size -= 1 + + font_2 = ImageFont.truetype(font=font_name, size=bottom_size, encoding='UTF-8') + text_width = font_2.getsize(self._bottom_text)[0] + + while text_width >= (width + 250) - 20: + font_2 = ImageFont.truetype(font=font_name, size=bottom_size, encoding='UTF-8') + text_width = font_2.getsize(self._bottom_text)[0] + bottom_size -= 1 + + size_1 = drawer.textsize(self._top_text, font=font_1) + size_2 = drawer.textsize(self._bottom_text, font=font_2) + + drawer.text(((1280 - size_1[0]) / 2, 840), self._top_text, fill=font_color, font=font_1) + drawer.text(((1280 - size_2[0]) / 2, 930), self._bottom_text, fill=font_color, font=font_2) + + img.save("output.png") + return True diff --git a/simpledemotivators/Quote.py b/simpledemotivators/Quote.py new file mode 100644 index 0000000..21dcb72 --- /dev/null +++ b/simpledemotivators/Quote.py @@ -0,0 +1,69 @@ +from PIL import Image, ImageDraw, ImageFont +import textwrap +import requests +import os + + +class Quote: + def __init__(self, quote_text, author_name): + self._quote_text = quote_text + self._author_name = author_name + + def create(self, file, result_filename='qresult.png', use_url=False, + headline_text_font='verdana.ttf', headline_text_size=50, + headline_text='Цитаты великих людей', author_name_font='ariali.ttf', + author_name_size=50, quote_text_font='ariali.ttf', quote_text_size=40) \ + -> bool: # Returns True if method executed successfully + + text = '' + lines = textwrap.wrap(self._quote_text, width=40) + + for i in lines: + text = text + i + '\n' + + if len(text.splitlines()) > 5: + lines = text.splitlines()[0:5] + text = '' + for i in lines: + text = text + i + '\n' + + user_img = Image.new('RGBA', (1000, 550), color='#000000') + + drawer = ImageDraw.Draw(user_img) + font_1 = ImageFont.truetype(font=quote_text_font, size=quote_text_size, encoding='UTF-8') + font_2 = ImageFont.truetype(font=headline_text_font, size=headline_text_size, encoding='UTF-8') + font_3 = ImageFont.truetype(font=author_name_font, size=author_name_size, encoding='UTF-8') + + size_headline = drawer.textsize(headline_text, font=font_2) + + drawer.text((50, 120), f"«{text[:-1]}»", fill='white', font=font_1) + drawer.text((230, 410), '© ' + self._author_name, fill='white', font=font_3) + drawer.text(((1000 - size_headline[0]) / 2, 25), headline_text, fill='white', font=font_2) + + if use_url: + p = requests.get(file) + out = open(r'quote_picture.jpg', "wb") + out.write(p.content) + out.close() + + file = 'quote_picture.jpg' + + """ + Сглаживаем в форме круга фотографию автора цитаты + """ + + user_photo = Image.open(file).resize((150, 150)).convert("RGBA") + width, height = user_photo.size + user_photo.crop(((width - height) / 2, 0, (width + height) / 2, height)) + user_photo.resize((150, 150), Image.ANTIALIAS) + mask = Image.new('L', (150 * 2, 150 * 2), 0) + ImageDraw.Draw(mask).ellipse((0, 0) + mask.size, fill=255) + user_photo.putalpha(mask.resize((150, 150), Image.ANTIALIAS)) + user_img.paste(user_photo, (50, 370), mask=user_photo) + + user_img.save(result_filename) + + if use_url: + os.remove('quote_picture.jpg') + + return True diff --git a/simpledemotivators/__init__.py b/simpledemotivators/__init__.py new file mode 100644 index 0000000..3e77caa --- /dev/null +++ b/simpledemotivators/__init__.py @@ -0,0 +1,7 @@ +from .Demotivator import Demotivator +from .Quote import Quote + +__all__ = ( + 'Demotivator', + 'Quote' +) diff --git a/simpledemotivators/times.ttf b/simpledemotivators/times.ttf new file mode 100644 index 0000000..55f734a Binary files /dev/null and b/simpledemotivators/times.ttf differ diff --git a/start.py b/start.py new file mode 100644 index 0000000..5aea552 --- /dev/null +++ b/start.py @@ -0,0 +1,17 @@ +from duty import app + +if __name__ == "__main__": + import sys + port = 5000 + host = "localhost" + for i, arg in enumerate(sys.argv): + if arg == '--port': + port = sys.argv[i+1] + try: + port = int(port) + except ValueError: + raise Exception('Аргумент --port должен быть цифрой в диапазоне от 1 до 65536') # noqa + elif arg == '--host': + host = sys.argv[i+1] + + app.run(host=host, port=port) diff --git a/vkapi/__init__.py b/vkapi/__init__.py deleted file mode 100644 index c953b93..0000000 --- a/vkapi/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .api import VkApi -from .keyboard import Keyboard -from .exceptions import * \ No newline at end of file diff --git a/vkapi/__pycache__/__init__.cpython-38.pyc b/vkapi/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 0244bec..0000000 Binary files a/vkapi/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/vkapi/__pycache__/api.cpython-38.pyc b/vkapi/__pycache__/api.cpython-38.pyc deleted file mode 100644 index f345c86..0000000 Binary files a/vkapi/__pycache__/api.cpython-38.pyc and /dev/null differ diff --git a/vkapi/__pycache__/exceptions.cpython-38.pyc b/vkapi/__pycache__/exceptions.cpython-38.pyc deleted file mode 100644 index 320d700..0000000 Binary files a/vkapi/__pycache__/exceptions.cpython-38.pyc and /dev/null differ diff --git a/vkapi/__pycache__/keyboard.cpython-38.pyc b/vkapi/__pycache__/keyboard.cpython-38.pyc deleted file mode 100644 index 9ff8253..0000000 Binary files a/vkapi/__pycache__/keyboard.cpython-38.pyc and /dev/null differ diff --git a/vkapi/api.py b/vkapi/api.py deleted file mode 100644 index bc01e5b..0000000 --- a/vkapi/api.py +++ /dev/null @@ -1,105 +0,0 @@ - -import requests -import enum -import json -import os - -from .exceptions import * - -import logging - - - -class Mode(enum.Enum): - POST = "POST" - GET = "GET" - - -class VkApi(object): - Mode: Mode - - mode: Mode - access_token: str - version: str - lang: str - raise_excepts: bool - api_url = "https://api.vk.com/method/" - - - - - def __init__(self, access_token: str, version: str = "5.103", mode: Mode = Mode.POST, - lang: str = "ru", raise_excepts: bool = False): - - self.logger = logging.getLogger('vkapi') - self.Mode = Mode - self.access_token = access_token - self.version = version - self.mode = self.Mode(mode) - self.lang = lang - self.raise_excepts = raise_excepts - - def method(self, method, **kwargs): - - def load_methods(): - with open(os.path.join(os.path.dirname(__file__), "schemes", "methods.json")) as file: - return json.loads(file.read()) - - - - mode = self.Mode(kwargs.get('mode', self.mode)) - version = kwargs.get('version', self.version) - access_token = kwargs.get('access_token', self.access_token) - lang = kwargs.get('lang', self.lang) - raise_excepts = kwargs.get('raise_excepts', self.raise_excepts) - - - methods = [method__['name'].lower() for method__ in load_methods()['methods']] - - if method.lower() not in methods: - if raise_excepts: - raise InvalidMethodException(method) - else: - return [err for err in load_methods() if err['name'] == "API_ERROR_METHOD"][0] - - data = {} - for key in kwargs.keys(): - if key.lower() not in ["mode", "version", "access_token", "lang", "raise_excepts"]: - data[key] = kwargs[key] - - request = None - - if mode == self.Mode.GET: - url_ = self.api_url + method + "?" - data_list = [f"{key_}={data[key_]}" for key_ in data.keys()] - data_list.append(f"v={version}") - data_list.append(f"access_token={access_token}") - data_list.append(f"lang={lang}") - - url_ += "&".join(data_list) - request = requests.get(url_) - - else: - url_ = self.api_url + method + f"?v={version}&access_token={access_token}&lang={lang}" - request = requests.post(url_, data=data) - - if 'response' in request.json().keys(): - self.logger.info(f"Запрос {method} выполнен") - return request.json()["response"] - elif 'error' in request.json().keys(): - self.logger.info(f"Запрос {method} не выполнен: {request.json()['error']}") - if raise_excepts: - raise VkApiResponseException(**request.json()["error"]) - else: - return request.json() - else: - raise Exception() - - - - - - - - def __call__(self, method, **kwargs): - return self.method(method, **kwargs) \ No newline at end of file diff --git a/vkapi/exceptions.py b/vkapi/exceptions.py deleted file mode 100644 index 93631b5..0000000 --- a/vkapi/exceptions.py +++ /dev/null @@ -1,16 +0,0 @@ -class VkApiResponseException(Exception): - def __init__(self, *args, **kwargs): - self.error_code = kwargs.get('error_code', None) - self.error_msg = kwargs.get('error_msg', None) - self.request_params = kwargs.get('request_params', None) - - - self.args = args - self.kwargs = kwargs - - -class InvalidMethodException(Exception): - def __init__(self, *args, **kwargs): - self.method = list(args)[0] - self.args = args - self.kwargs = kwargs \ No newline at end of file diff --git a/vkapi/keyboard.py b/vkapi/keyboard.py deleted file mode 100644 index de57796..0000000 --- a/vkapi/keyboard.py +++ /dev/null @@ -1,73 +0,0 @@ -import enum -import json - -class ButtonType(enum.Enum): - TEXT = "text" - LOCATION ="location" - VKPAY = "vkpay" - OPEN_APP = "open_app" - OPEN_LINK = "open_link" - -class ButtonColor(enum.Enum): - PRIMARY = "primary" - SECONDARY = "secondary" - NEGATIVE = "negative" - POSITIVE = "positive" - NONE = None - -class Keyboard(object): - ButtonType: ButtonType - ButtonColor: ButtonColor - - one_time: bool - inline: bool - keyboard: dict - lines: list - - cureit_line: int - - def __init__(self, one_time: bool, inline: bool): - self.ButtonType = ButtonType - self.ButtonColor = ButtonColor - - - self.one_time = one_time - self.inline = inline - self.cureit_line = 0 - self.lines = [[]] - - self.keyboard = { - "one_time": self.one_time, - "inline": self.inline, - "buttons": [] - } - - def add_line(self): - self.lines.append([]) - self.cureit_line += 1 - - def add_button(self, type: ButtonType, color: ButtonColor, label: str = None, - hash: str = None, app_id: int = None, - owber_id: int = None, payload: str = None, link: str = None): - button = {} # action color - action = {} - - if label != None: action["label"] = label - if type != None: action["type"] = type.value - if hash != None: action["hash"] = hash - if app_id != None: action["app_id"] = app_id - if owber_id != None: action["owber_id"] = owber_id - if payload != None: action["payload"] = payload - if link != None: action["link"] = link - - button["action"] = action - if color != ButtonColor.NONE: - button["color"] = color.value - - self.lines[self.cureit_line].append(button) - - def get(self): - self.keyboard["buttons"] = self.lines - return json.dumps(self.keyboard, ensure_ascii=False) - - diff --git a/vkapi/longpoll.py b/vkapi/longpoll.py deleted file mode 100644 index 27fac5d..0000000 --- a/vkapi/longpoll.py +++ /dev/null @@ -1,43 +0,0 @@ - -import requests -from . import VkApi - - - -class Longpoll(object): - - def __init__(self, api: VkApi, group_id: int, wait: int = 25): - self.api = api - self.group_id = group_id - self.wait = 25 - data = self.api("groups.getLongPollServer", group_id=self.group_id) - - self.key = data['key'] - self.server = data['server'] - self.ts = data['ts'] - - def check(self): - data = requests.get(f"{self.server}?act=a_check&key={self.key}&ts={self.ts}&wait={self.wait}") - if data.status_code != 200: - raise Exception("Network error") - - djson = data.json() - - if 'failed' in djson.keys(): - if djson['failed'] == 1: - self.ts = djson['ts'] - else: - data = self.api("groups.getLongPollServer", group_id=self.group_id) - self.key = data['key'] - self.server = data['server'] - self.ts = data['ts'] - return {"ts": self.ts, "updates": []} - - else: - self.ts = djson['ts'] - return djson - - - def listen(self): - while True: - yield self.check() diff --git a/vkapi/schemes/methods.json b/vkapi/schemes/methods.json deleted file mode 100644 index fcfdb5d..0000000 --- a/vkapi/schemes/methods.json +++ /dev/null @@ -1,20520 +0,0 @@ -{ - "errors": [ - { - "name": "API_ERROR_UNKNOWN", - "code": 1, - "description": "Unknown error occurred" - }, - { - "name": "API_ERROR_DISABLED", - "code": 2, - "description": "Application is disabled. Enable your application or use test mode" - }, - { - "name": "API_ERROR_METHOD", - "code": 3, - "description": "Unknown method passed" - }, - { - "name": "API_ERROR_SIGNATURE", - "code": 4, - "description": "Incorrect signature" - }, - { - "name": "API_ERROR_AUTH", - "code": 5, - "description": "User authorization failed" - }, - { - "name": "API_ERROR_TOO_MANY", - "code": 6, - "description": "Too many requests per second" - }, - { - "name": "API_ERROR_PERMISSION", - "code": 7, - "description": "Permission to perform this action is denied" - }, - { - "name": "API_ERROR_REQUEST", - "code": 8, - "description": "Invalid request" - }, - { - "name": "API_ERROR_FLOOD", - "code": 9, - "description": "Flood control" - }, - { - "name": "API_ERROR_SERVER", - "code": 10, - "description": "Internal server error" - }, - { - "name": "API_ERROR_ENABLED_IN_TEST", - "code": 11, - "description": "In test mode application should be disabled or user should be authorized" - }, - { - "name": "API_ERROR_CAPTCHA", - "code": 14, - "description": "Captcha needed" - }, - { - "name": "API_ERROR_ACCESS", - "code": 15, - "description": "Access denied" - }, - { - "name": "API_ERROR_AUTH_HTTPS", - "code": 16, - "description": "HTTP authorization failed" - }, - { - "name": "API_ERROR_AUTH_VALIDATION", - "code": 17, - "description": "Validation required" - }, - { - "name": "API_ERROR_USER_DELETED", - "code": 18, - "description": "User was deleted or banned" - }, - { - "name": "API_ERROR_METHOD_PERMISSION", - "code": 20, - "description": "Permission to perform this action is denied for non-standalone applications" - }, - { - "name": "API_ERROR_METHOD_ADS", - "code": 21, - "description": "Permission to perform this action is allowed only for standalone and OpenAPI applications" - }, - { - "name": "API_ERROR_METHOD_DISABLED", - "code": 23, - "description": "This method was disabled" - }, - { - "name": "API_ERROR_NEED_CONFIRMATION", - "code": 24, - "description": "Confirmation required" - }, - { - "name": "API_ERROR_NEED_TOKEN_CONFIRMATION", - "code": 25, - "description": "Token confirmation required" - }, - { - "name": "API_ERROR_GROUP_AUTH", - "code": 27, - "description": "Group authorization failed" - }, - { - "name": "API_ERROR_APP_AUTH", - "code": 28, - "description": "Application authorization failed" - }, - { - "name": "API_ERROR_RATE_LIMIT", - "code": 29, - "description": "Rate limit reached" - }, - { - "name": "API_ERROR_PRIVATE_PROFILE", - "code": 30, - "description": "This profile is private" - }, - { - "name": "API_ERROR_PARAM", - "code": 100, - "description": "One of the parameters specified was missing or invalid" - }, - { - "name": "API_ERROR_PARAM_API_ID", - "code": 101, - "description": "Invalid application API ID" - }, - { - "name": "API_ERROR_PARAM_USER_ID", - "code": 113, - "description": "Invalid user id" - }, - { - "name": "API_ERROR_PARAM_TIMESTAMP", - "code": 150, - "description": "Invalid timestamp" - }, - { - "name": "API_ERROR_ACCESS_ALBUM", - "code": 200, - "description": "Access denied" - }, - { - "name": "API_ERROR_ACCESS_AUDIO", - "code": 201, - "description": "Access denied" - }, - { - "name": "API_ERROR_ACCESS_GROUP", - "code": 203, - "description": "Access to group denied" - }, - { - "name": "API_ERROR_ALBUM_FULL", - "code": 300, - "description": "This album is full" - }, - { - "name": "API_ERROR_VOTES_PERMISSION", - "code": 500, - "description": "Permission denied. You must enable votes processing in application settings" - }, - { - "name": "API_ERROR_ADS_PERMISSION", - "code": 600, - "description": "Permission denied. You have no access to operations specified with given object(s)" - }, - { - "name": "API_ERROR_ADS_SPECIFIC", - "code": 603, - "description": "Some ads error occured" - } - ], - "methods": [ - { - "name": "account.ban", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.changePassword", - "description": "Changes a user password after access is successfully restored with the [vk.com/dev/auth.restore|auth.restore] method.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "restore_sid", - "description": "Session id received after the [vk.com/dev/auth.restore|auth.restore] method is executed. (If the password is changed right after the access was restored)", - "type": "string" - }, - { - "name": "change_password_hash", - "description": "Hash received after a successful OAuth authorization with a code got by SMS. (If the password is changed right after the access was restored)", - "type": "string" - }, - { - "name": "old_password", - "description": "Current user password.", - "type": "string" - }, - { - "name": "new_password", - "description": "New password that will be set as a current", - "type": "string", - "required": true, - "minLength": 6 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_changePassword_response" - } - } - }, - { - "name": "account.getActiveOffers", - "description": "Returns a list of active ads (offers) which executed by the user will bring him/her respective number of votes to his balance in the application.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 100 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getActiveOffers_response" - } - } - }, - { - "name": "account.getAppPermissions", - "description": "Gets settings of the user in this application.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID whose settings information shall be got. By default: current user.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getAppPermissions_response" - } - } - }, - { - "name": "account.getBanned", - "description": "Returns a user's blacklist.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getBanned_response" - } - } - }, - { - "name": "account.getCounters", - "description": "Returns non-null values of user counters.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "filter", - "description": "Counters to be returned.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "friends", - "messages", - "photos", - "videos", - "notes", - "gifts", - "events", - "groups", - "sdk", - "friends_suggestions" - ] - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getCounters_response" - } - } - }, - { - "name": "account.getInfo", - "description": "Returns current account info.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "fields", - "description": "Fields to return. Possible values: *'country' — user country,, *'https_required' — is \"HTTPS only\" option enabled,, *'own_posts_default' — is \"Show my posts only\" option is enabled,, *'no_wall_replies' — are wall replies disabled or not,, *'intro' — is intro passed by user or not,, *'lang' — user language. By default: all.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "country", - "https_required", - "own_posts_default", - "no_wall_replies", - "intro", - "lang" - ] - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getInfo_response" - } - } - }, - { - "name": "account.getProfileInfo", - "description": "Returns the current account info.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getProfileInfo_response" - } - } - }, - { - "name": "account.getPushSettings", - "description": "Gets settings of push notifications.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "device_id", - "description": "Unique device ID.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_getPushSettings_response" - } - } - }, - { - "name": "account.registerDevice", - "description": "Subscribes an iOS/Android/Windows Phone-based device to receive push notifications", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "token", - "description": "Device token used to send notifications. (for mpns, the token shall be URL for sending of notifications)", - "type": "string", - "required": true - }, - { - "name": "device_model", - "description": "String name of device model.", - "type": "string" - }, - { - "name": "device_year", - "description": "Device year.", - "type": "integer" - }, - { - "name": "device_id", - "description": "Unique device ID.", - "type": "string", - "required": true - }, - { - "name": "system_version", - "description": "String version of device operating system.", - "type": "string" - }, - { - "name": "settings", - "description": "Push settings in a [vk.com/dev/push_settings|special format].", - "type": "string" - }, - { - "name": "sandbox", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.saveProfileInfo", - "description": "Edits current profile info.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "first_name", - "description": "User first name.", - "type": "string" - }, - { - "name": "last_name", - "description": "User last name.", - "type": "string" - }, - { - "name": "maiden_name", - "description": "User maiden name (female only)", - "type": "string" - }, - { - "name": "screen_name", - "description": "User screen name.", - "type": "string" - }, - { - "name": "cancel_request_id", - "description": "ID of the name change request to be canceled. If this parameter is sent, all the others are ignored.", - "type": "integer", - "minimum": 0 - }, - { - "name": "sex", - "description": "User sex. Possible values: , * '1' – female,, * '2' – male.", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "undefined", - "female", - "male" - ] - }, - { - "name": "relation", - "description": "User relationship status. Possible values: , * '1' – single,, * '2' – in a relationship,, * '3' – engaged,, * '4' – married,, * '5' – it's complicated,, * '6' – actively searching,, * '7' – in love,, * '0' – not specified.", - "type": "integer", - "minimum": 0, - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 0 - ], - "enumNames": [ - "single", - "relationship", - "engaged", - "married", - "complicated", - "actively searching", - "in love", - "not specified" - ] - }, - { - "name": "relation_partner_id", - "description": "ID of the relationship partner.", - "type": "integer", - "minimum": 0 - }, - { - "name": "bdate", - "description": "User birth date, format: DD.MM.YYYY.", - "type": "string" - }, - { - "name": "bdate_visibility", - "description": "Birth date visibility. Returned values: , * '1' – show birth date,, * '2' – show only month and day,, * '0' – hide birth date.", - "type": "integer", - "minimum": 0, - "enum": [ - 1, - 2, - 0 - ], - "enumNames": [ - "show", - "hide year", - "hide" - ] - }, - { - "name": "home_town", - "description": "User home town.", - "type": "string" - }, - { - "name": "country_id", - "description": "User country.", - "type": "integer", - "minimum": 0 - }, - { - "name": "city_id", - "description": "User city.", - "type": "integer", - "minimum": 0 - }, - { - "name": "status", - "description": "Status text.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/account_saveProfileInfo_response" - } - }, - "errors": [ - { - "code": 1260, - "name": "API_ERROR_INVALID_ADDRESS", - "description": "Invalid screen name" - } - ] - }, - { - "name": "account.setInfo", - "description": "Allows to edit the current account info.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "name", - "description": "Setting name.", - "type": "string" - }, - { - "name": "value", - "description": "Setting value.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.setNameInMenu", - "description": "Sets an application screen name (up to 17 characters), that is shown to the user in the left menu.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "name", - "description": "Application screen name.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 148, - "name": "API_ERROR_ACCESS_MENU", - "description": "Access to the menu of the user denied" - } - ] - }, - { - "name": "account.setOffline", - "description": "Marks a current user as offline.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.setOnline", - "description": "Marks the current user as online for 15 minutes.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "voip", - "description": "'1' if videocalls are available for current device.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.setPushSettings", - "description": "Change push settings.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "device_id", - "description": "Unique device ID.", - "type": "string", - "required": true - }, - { - "name": "settings", - "description": "Push settings in a [vk.com/dev/push_settings|special format].", - "type": "string" - }, - { - "name": "key", - "description": "Notification key.", - "type": "string" - }, - { - "name": "value", - "description": "New value for the key in a [vk.com/dev/push_settings|special format].", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.setSilenceMode", - "description": "Mutes push notifications for the set period of time.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "device_id", - "description": "Unique device ID.", - "type": "string" - }, - { - "name": "time", - "description": "Time in seconds for what notifications should be disabled. '-1' to disable forever.", - "type": "integer" - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'Chat ID', e.g. '2000000001'. For community: '- Community ID', e.g. '-12345'. \"", - "type": "integer" - }, - { - "name": "sound", - "description": "'1' — to enable sound in this dialog, '0' — to disable sound. Only if 'peer_id' contains user or community ID.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.unban", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "account.unregisterDevice", - "description": "Unsubscribes a device from push notifications.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "device_id", - "description": "Unique device ID.", - "type": "string" - }, - { - "name": "sandbox", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "ads.addOfficeUsers", - "description": "Adds managers and/or supervisors to advertising account.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_addOfficeUsers_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.checkLink", - "description": "Allows to check the ad link.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "link_type", - "description": "Object type: *'community' — community,, *'post' — community post,, *'application' — VK application,, *'video' — video,, *'site' — external site.", - "type": "string", - "required": true, - "enum": [ - "community", - "post", - "application", - "video", - "site" - ] - }, - { - "name": "link_url", - "description": "Object URL.", - "type": "string", - "required": true - }, - { - "name": "campaign_id", - "description": "Campaign ID", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_checkLink_response" - } - } - }, - { - "name": "ads.createAds", - "description": "Creates ads.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe created ads. Description of 'ad_specification' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_createAds_response" - } - }, - "errors": [ - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.createCampaigns", - "description": "Creates advertising campaigns.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe created campaigns. Description of 'campaign_specification' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_createCampaigns_response" - } - }, - "errors": [ - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.createClients", - "description": "Creates clients of an advertising agency.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe created campaigns. Description of 'client_specification' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_createClients_response" - } - }, - "errors": [ - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.createTargetGroup", - "description": "Creates a group to re-target ads for users who visited advertiser's site (viewed information about the product, registered, etc.).", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "description": "'Only for advertising agencies.', ID of the client with the advertising account where the group will be created.", - "type": "integer" - }, - { - "name": "name", - "description": "Name of the target group — a string up to 64 characters long.", - "type": "string", - "required": true - }, - { - "name": "lifetime", - "description": "'For groups with auditory created with pixel code only.', , Number of days after that users will be automatically removed from the group.", - "type": "integer", - "default": 720, - "minimum": 0, - "maximum": 720 - }, - { - "name": "target_pixel_id", - "type": "integer" - }, - { - "name": "target_pixel_rules", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_createTargetGroup_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.deleteAds", - "description": "Archives ads.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids", - "description": "Serialized JSON array with ad IDs.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_deleteAds_response" - } - }, - "errors": [ - { - "code": 629, - "name": "API_ERROR_ADS_OBJECT_DELETED", - "description": "Object deleted" - }, - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.deleteCampaigns", - "description": "Archives advertising campaigns.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids", - "description": "Serialized JSON array with IDs of deleted campaigns.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_deleteCampaigns_response" - } - }, - "errors": [ - { - "code": 629, - "name": "API_ERROR_ADS_OBJECT_DELETED", - "description": "Object deleted" - }, - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.deleteClients", - "description": "Archives clients of an advertising agency.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids", - "description": "Serialized JSON array with IDs of deleted clients.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_deleteClients_response" - } - }, - "errors": [ - { - "code": 629, - "name": "API_ERROR_ADS_OBJECT_DELETED", - "description": "Object deleted" - }, - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.deleteTargetGroup", - "description": "Deletes a retarget group.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "description": "'Only for advertising agencies.' , ID of the client with the advertising account where the group will be created.", - "type": "integer" - }, - { - "name": "target_group_id", - "description": "Group ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getAccounts", - "description": "Returns a list of advertising accounts.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getAccounts_response" - } - } - }, - { - "name": "ads.getAds", - "description": "Returns number of ads.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "required": true, - "type": "integer" - }, - { - "name": "ad_ids", - "description": "Filter by ads. Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.", - "type": "string" - }, - { - "name": "campaign_ids", - "description": "Filter by advertising campaigns. Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.", - "type": "string" - }, - { - "name": "client_id", - "description": "'Available and required for advertising agencies.' ID of the client ads are retrieved from.", - "type": "integer" - }, - { - "name": "include_deleted", - "description": "Flag that specifies whether archived ads shall be shown: *0 — show only active ads,, *1 — show all ads.", - "type": "boolean" - }, - { - "name": "limit", - "description": "Limit of number of returned ads. Used only if ad_ids parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.", - "type": "integer" - }, - { - "name": "offset", - "description": "Offset. Used in the same cases as 'limit' parameter.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getAds_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getAdsLayout", - "description": "Returns descriptions of ad layouts.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "required": true, - "type": "integer" - }, - { - "name": "ad_ids", - "description": "Filter by ads. Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.", - "type": "string" - }, - { - "name": "campaign_ids", - "description": "Filter by advertising campaigns. Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.", - "type": "string" - }, - { - "name": "client_id", - "description": "'For advertising agencies.' ID of the client ads are retrieved from.", - "type": "integer" - }, - { - "name": "include_deleted", - "description": "Flag that specifies whether archived ads shall be shown. *0 — show only active ads,, *1 — show all ads.", - "type": "boolean" - }, - { - "name": "limit", - "description": "Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.", - "type": "integer" - }, - { - "name": "offset", - "description": "Offset. Used in the same cases as 'limit' parameter.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getAdsLayout_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getAdsTargeting", - "description": "Returns ad targeting parameters.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "required": true, - "type": "integer" - }, - { - "name": "ad_ids", - "description": "Filter by ads. Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.", - "type": "string" - }, - { - "name": "campaign_ids", - "description": "Filter by advertising campaigns. Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.", - "type": "string" - }, - { - "name": "client_id", - "description": "'For advertising agencies.' ID of the client ads are retrieved from.", - "type": "integer" - }, - { - "name": "include_deleted", - "description": "flag that specifies whether archived ads shall be shown: *0 — show only active ads,, *1 — show all ads.", - "type": "boolean" - }, - { - "name": "limit", - "description": "Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.", - "type": "integer" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getAdsTargeting_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getBudget", - "description": "Returns current budget of the advertising account.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getBudget_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getCampaigns", - "description": "Returns a list of campaigns in an advertising account.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "description": "'For advertising agencies'. ID of the client advertising campaigns are retrieved from.", - "type": "integer" - }, - { - "name": "include_deleted", - "description": "Flag that specifies whether archived ads shall be shown. *0 — show only active campaigns,, *1 — show all campaigns.", - "type": "boolean" - }, - { - "name": "campaign_ids", - "description": "Filter of advertising campaigns to show. Serialized JSON array with campaign IDs. Only campaigns that exist in 'campaign_ids' and belong to the specified advertising account will be shown. If the parameter is null, all campaigns will be shown.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getCampaigns_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getCategories", - "description": "Returns a list of possible ad categories.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "lang", - "description": "Language. The full list of supported languages is [vk.com/dev/api_requests|here].", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getCategories_response" - } - } - }, - { - "name": "ads.getClients", - "description": "Returns a list of advertising agency's clients.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getClients_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getDemographics", - "description": "Returns demographics for ads or campaigns.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids_type", - "description": "Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns.", - "type": "string", - "required": true, - "enum": [ - "ad", - "campaign" - ] - }, - { - "name": "ids", - "description": "IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.", - "type": "string", - "required": true - }, - { - "name": "period", - "description": "Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics. 'date_from' and 'date_to' parameters set temporary limits.", - "type": "string", - "required": true, - "enum": [ - "day", - "month", - "overall" - ] - }, - { - "name": "date_from", - "description": "Date to show statistics from. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — day it was created on,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — month it was created in,, *overall: 0.", - "type": "string", - "required": true - }, - { - "name": "date_to", - "description": "Date to show statistics to. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — current day,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — current month,, *overall: 0.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getDemographics_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getFloodStats", - "description": "Returns information about current state of a counter — number of remaining runs of methods and time to the next counter nulling in seconds.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getFloodStats_response" - } - } - }, - { - "name": "ads.getOfficeUsers", - "description": "Returns a list of managers and supervisors of advertising account.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getOfficeUsers_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getPostsReach", - "description": "Returns detailed statistics of promoted posts reach from campaigns and ads.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids_type", - "description": "Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns.", - "type": "string", - "required": true, - "enum": [ - "ad", - "campaign" - ] - }, - { - "name": "ids", - "description": "IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'. Maximum 100 objects.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getPostsReach_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getRejectionReason", - "description": "Returns a reason of ad rejection for pre-moderation.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ad_id", - "description": "Ad ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getRejectionReason_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getStatistics", - "description": "Returns statistics of performance indicators for ads, campaigns, clients or the whole account.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids_type", - "description": "Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns,, *client — clients,, *office — account.", - "type": "string", - "required": true, - "enum": [ - "ad", - "campaign", - "client", - "office" - ] - }, - { - "name": "ids", - "description": "IDs requested ads, campaigns, clients or account, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.", - "type": "string", - "required": true - }, - { - "name": "period", - "description": "Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics. 'date_from' and 'date_to' parameters set temporary limits.", - "type": "string", - "required": true, - "enum": [ - "day", - "month", - "overall" - ] - }, - { - "name": "date_from", - "description": "Date to show statistics from. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — day it was created on,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — month it was created in,, *overall: 0.", - "type": "string", - "required": true - }, - { - "name": "date_to", - "description": "Date to show statistics to. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — current day,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — current month,, *overall: 0.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getStatistics_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getSuggestions", - "description": "Returns a set of auto-suggestions for various targeting parameters.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "section", - "description": "Section, suggestions are retrieved in. Available values: *countries — request of a list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full list of countries is shown. *regions — requested list of regions. 'country' parameter is required. *cities — requested list of cities. 'country' parameter is required. *districts — requested list of districts. 'cities' parameter is required. *stations — requested list of subway stations. 'cities' parameter is required. *streets — requested list of streets. 'cities' parameter is required. *schools — requested list of educational organizations. 'cities' parameter is required. *interests — requested list of interests. *positions — requested list of positions (professions). *group_types — requested list of group types. *religions — requested list of religious commitments. *browsers — requested list of browsers and mobile devices.", - "type": "string", - "required": true, - "enum": [ - "countries", - "regions", - "cities", - "districts", - "stations", - "streets", - "schools", - "interests", - "positions", - "group_types", - "religions", - "browsers" - ] - }, - { - "name": "ids", - "description": "Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' should not be passed.", - "type": "string" - }, - { - "name": "q", - "description": "Filter-line of the request (for countries, regions, cities, streets, schools, interests, positions).", - "type": "string" - }, - { - "name": "country", - "description": "ID of the country objects are searched in.", - "type": "integer" - }, - { - "name": "cities", - "description": "IDs of cities where objects are searched in, separated with a comma.", - "type": "string" - }, - { - "name": "lang", - "description": "Language of the returned string values. Supported languages: *ru — Russian,, *ua — Ukrainian,, *en — English.", - "type": "string", - "enum": [ - "ru", - "ua", - "en" - ], - "enumNames": [ - "russian", - "ukrainian", - "english" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getSuggestions_response" - }, - "regionsResponse": { - "$ref": "responses.json#/definitions/ads_getSuggestions_regions_response" - }, - "citiesResponse": { - "$ref": "responses.json#/definitions/ads_getSuggestions_cities_response" - }, - "schoolsResponse": { - "$ref": "responses.json#/definitions/ads_getSuggestions_schools_response" - } - } - }, - { - "name": "ads.getTargetGroups", - "description": "Returns a list of target groups.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "description": "'Only for advertising agencies.', ID of the client with the advertising account where the group will be created.", - "type": "integer" - }, - { - "name": "extended", - "description": "'1' — to return pixel code.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getTargetGroups_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getTargetingStats", - "description": "Returns the size of targeting audience, and also recommended values for CPC and CPM.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "type": "integer" - }, - { - "name": "criteria", - "description": "Serialized JSON object that describes targeting parameters. Description of 'criteria' object see below.", - "type": "string" - }, - { - "name": "ad_id", - "description": "ID of an ad which targeting parameters shall be analyzed.", - "type": "integer" - }, - { - "name": "ad_format", - "description": "Ad format. Possible values: *'1' — image and text,, *'2' — big image,, *'3' — exclusive format,, *'4' — community, square image,, *'7' — special app format,, *'8' — special community format,, *'9' — post in community,, *'10' — app board.", - "type": "integer", - "enum": [ - 1, - 2, - 3, - 4, - 7, - 8, - 9, - 10 - ], - "enumNames": [ - "image and text", - "big image", - "exclusive format", - "community square image", - "special app format", - "special community format", - "post in community", - "app board" - ] - }, - { - "name": "ad_platform", - "description": "Platforms to use for ad showing. Possible values: (for 'ad_format' = '1'), *'0' — VK and partner sites,, *'1' — VK only. (for 'ad_format' = '9'), *'all' — all platforms,, *'desktop' — desktop version,, *'mobile' — mobile version and apps.", - "type": "string" - }, - { - "name": "ad_platform_no_wall", - "type": "string" - }, - { - "name": "ad_platform_no_ad_network", - "type": "string" - }, - { - "name": "link_url", - "description": "URL for the advertised object.", - "type": "string", - "required": true - }, - { - "name": "link_domain", - "description": "Domain of the advertised object.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getTargetingStats_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.getUploadURL", - "description": "Returns URL to upload an ad photo to.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "ad_format", - "description": "Ad format: *1 — image and text,, *2 — big image,, *3 — exclusive format,, *4 — community, square image,, *7 — special app format.", - "type": "integer", - "required": true, - "enum": [ - 1, - 2, - 3, - 4, - 7 - ], - "enumNames": [ - "image and text", - "big image", - "exclusive format", - "community, square image", - "special app format" - ] - }, - { - "name": "icon", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getUploadURL_response" - } - } - }, - { - "name": "ads.getVideoUploadURL", - "description": "Returns URL to upload an ad video to.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_getVideoUploadURL_response" - } - } - }, - { - "name": "ads.importTargetContacts", - "description": "Imports a list of advertiser's contacts to count VK registered users against the target group.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "description": "'Only for advertising agencies.' , ID of the client with the advertising account where the group will be created.", - "type": "integer" - }, - { - "name": "target_group_id", - "description": "Target group ID.", - "type": "integer", - "required": true - }, - { - "name": "contacts", - "description": "List of phone numbers, emails or user IDs separated with a comma.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_importTargetContacts_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.removeOfficeUsers", - "description": "Removes managers and/or supervisors from advertising account.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "ids", - "description": "Serialized JSON array with IDs of deleted managers.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_removeOfficeUsers_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.updateAds", - "description": "Edits ads.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe changes in ads. Description of 'ad_edit_specification' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_updateAds_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.updateCampaigns", - "description": "Edits advertising campaigns.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe changes in campaigns. Description of 'campaign_mod' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_updateCampaigns_response" - } - }, - "errors": [ - { - "code": 602, - "name": "API_ERROR_ADS_PARTIAL_SUCCESS", - "description": "Some part of the request has not been completed" - }, - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.updateClients", - "description": "Edits clients of an advertising agency.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "data", - "description": "Serialized JSON array of objects that describe changes in clients. Description of 'client_mod' objects see below.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ads_updateClients_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "ads.updateTargetGroup", - "description": "Edits a retarget group.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "account_id", - "description": "Advertising account ID.", - "type": "integer", - "required": true - }, - { - "name": "client_id", - "description": "'Only for advertising agencies.' , ID of the client with the advertising account where the group will be created.", - "type": "integer" - }, - { - "name": "target_group_id", - "description": "Group ID.", - "type": "integer", - "required": true - }, - { - "name": "name", - "description": "New name of the target group — a string up to 64 characters long.", - "type": "string", - "required": true - }, - { - "name": "domain", - "description": "Domain of the site where user accounting code will be placed.", - "type": "string" - }, - { - "name": "lifetime", - "description": "'Only for the groups that get audience from sites with user accounting code.', Time in days when users added to a retarget group will be automatically excluded from it. '0' – automatic exclusion is off.", - "type": "integer", - "default": 720, - "minimum": 0, - "maximum": 720 - }, - { - "name": "target_pixel_id", - "type": "integer" - }, - { - "name": "target_pixel_rules", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 601, - "name": "API_ERROR_WEIGHTED_FLOOD", - "description": "Permission denied. You have requested too many actions this day. Try later." - } - ] - }, - { - "name": "appWidgets.update", - "description": "Allows to update community app widget", - "access_token_type": [ - "group" - ], - "parameters": [ - { - "name": "code", - "type": "string", - "required": true, - "maxLength": 100000 - }, - { - "name": "type", - "type": "string", - "required": true, - "enum": [ - "compact_list", - "cover_list", - "donation", - "list", - "match", - "matches", - "table", - "text", - "tiles" - ] - } - ], - "responses": { - "response": { - "$ref": "objects.json#/definitions/base_ok_response" - } - }, - "errors": [ - { - "code": 12, - "name": "API_ERROR_COMPILE", - "description": "Unable to compile code" - }, - { - "code": 13, - "name": "API_ERROR_RUNTIME", - "description": "Runtime error occurred during code invocation" - }, - { - "code": 19, - "name": "API_ERROR_BLOCKED", - "description": "Content blocked" - }, - { - "code": 210, - "name": "API_ERROR_WALL_ACCESS_POST", - "description": "Access to wall's post denied" - }, - { - "code": 212, - "name": "API_ERROR_WALL_ACCESS_REPLIES", - "description": "Access to post comments denied" - }, - { - "code": 125, - "name": "API_ERROR_PARAM_GROUP_ID", - "description": "Invalid group id" - } - ] - }, - { - "name": "apps.deleteAppRequests", - "description": "Deletes all request notifications from the current app.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "apps.get", - "description": "Returns applications data.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "app_id", - "description": "Application ID", - "type": "integer", - "minimum": 0 - }, - { - "name": "app_ids", - "description": "List of application ID", - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 100 - }, - { - "name": "platform", - "description": "platform. Possible values: *'ios' — iOS,, *'android' — Android,, *'winphone' — Windows Phone,, *'web' — приложения на vk.com. By default: 'web'.", - "type": "string", - "default": "web", - "enum": [ - "android", - "ios", - "web", - "winphone" - ] - }, - { - "name": "extended", - "type": "boolean", - "default": 0 - }, - { - "name": "return_friends", - "type": "boolean", - "default": 0 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'contacts', 'education', 'online', 'counters', 'relation', 'last_seen', 'activity', 'can_write_private_message', 'can_see_all_posts', 'can_post', 'universities', (only if return_friends - 1)", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: 'nom' — nominative (default),, 'gen' — genitive,, 'dat' — dative,, 'acc' — accusative,, 'ins' — instrumental,, 'abl' — prepositional. (only if 'return_friends' = '1')", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_get_response" - } - } - }, - { - "name": "apps.getCatalog", - "description": "Returns a list of applications (apps) available to users in the App Catalog.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "sort", - "description": "Sort order: 'popular_today' — popular for one day (default), 'visitors' — by visitors number , 'create_date' — by creation date, 'growth_rate' — by growth rate, 'popular_week' — popular for one week", - "type": "string", - "enum": [ - "popular_today", - "visitors", - "create_date", - "growth_rate", - "popular_week" - ] - }, - { - "name": "offset", - "description": "Offset required to return a specific subset of apps.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of apps to return.", - "type": "integer", - "required": true, - "default": 100, - "minimum": 0 - }, - { - "name": "platform", - "type": "string" - }, - { - "name": "extended", - "description": "'1' — to return additional fields 'screenshots', 'MAU', 'catalog_position', and 'international'. If set, 'count' must be less than or equal to '100'. '0' — not to return additional fields (default).", - "type": "boolean" - }, - { - "name": "return_friends", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "type": "string" - }, - { - "name": "q", - "description": "Search query string.", - "type": "string" - }, - { - "name": "genre_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "filter", - "description": "'installed' — to return list of installed apps (only for mobile platform).", - "type": "string", - "enum": [ - "favorite", - "featured", - "installed", - "new" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_getCatalog_response" - } - } - }, - { - "name": "apps.getFriendsList", - "description": "Creates friends list for requests and invites in current app.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "extended", - "type": "boolean", - "default": 0 - }, - { - "name": "count", - "description": "List size.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 5000 - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "type", - "description": "List type. Possible values: * 'invite' — available for invites (don't play the game),, * 'request' — available for request (play the game). By default: 'invite'.", - "type": "string", - "default": "invite", - "enum": [ - "invite", - "request" - ] - }, - { - "name": "fields", - "description": "Additional profile fields, see [vk.com/dev/fields|description].", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_getFriendsList_response" - } - } - }, - { - "name": "apps.getLeaderboard", - "description": "Returns players rating in the game.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "description": "Leaderboard type. Possible values: *'level' — by level,, *'points' — by mission points,, *'score' — by score ().", - "type": "string", - "required": true, - "enum": [ - "level", - "points", - "score" - ] - }, - { - "name": "global", - "description": "Rating type. Possible values: *'1' — global rating among all players,, *'0' — rating among user friends.", - "type": "boolean", - "default": 1 - }, - { - "name": "extended", - "description": "1 — to return additional info about users", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_getLeaderboard_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/apps_getLeaderboard_extended_response" - } - } - }, - { - "name": "apps.getScopes", - "description": "Returns scopes for auth", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "type": "string", - "default": "user", - "enum": [ - "group", - "user" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_getScopes_response" - } - } - }, - { - "name": "apps.getScore", - "description": "Returns user score in app", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_getScore_response" - } - } - }, - { - "name": "apps.sendRequest", - "description": "Sends a request to another user in an app that uses VK authorization.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "id of the user to send a request", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "text", - "description": "request text", - "type": "string" - }, - { - "name": "type", - "description": "request type. Values: 'invite' – if the request is sent to a user who does not have the app installed,, 'request' – if a user has already installed the app", - "type": "string", - "default": "request", - "enum": [ - "invite", - "request" - ] - }, - { - "name": "name", - "type": "string", - "maxLength": 128 - }, - { - "name": "key", - "description": "special string key to be sent with the request", - "type": "string" - }, - { - "name": "separate", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/apps_sendRequest_response" - } - }, - "errors": [ - { - "name": "API_ERROR_FLOOD", - "code": 9, - "description": "Flood control" - } - ] - }, - { - "name": "auth.checkPhone", - "description": "Checks a user's phone number for correctness.", - "access_token_type": [ - "user", - "open" - ], - "parameters": [ - { - "name": "phone", - "description": "Phone number.", - "type": "string", - "required": true - }, - { - "name": "client_id", - "description": "User ID.", - "type": "integer" - }, - { - "name": "client_secret", - "type": "string" - }, - { - "name": "auth_by_phone", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1004, - "name": "API_ERROR_PHONE_ALREADY_USED", - "description": "This phone number is used by another user" - }, - { - "code": 1112, - "name": "API_ERROR_AUTH_DELAY", - "description": "Processing.. Try later" - }, - { - "code": 1000, - "name": "API_ERROR_PARAM_PHONE", - "description": "Invalid phone number" - } - ] - }, - { - "name": "auth.restore", - "description": "Allows to restore account access using a code received via SMS. \" This method is only available for apps with [vk.com/dev/auth_direct|Direct authorization] access. \"", - "access_token_type": [ - "user", - "open" - ], - "parameters": [ - { - "name": "phone", - "description": "User phone number.", - "type": "string", - "required": true - }, - { - "name": "last_name", - "description": "User last name.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/auth_restore_response" - } - }, - "errors": [ - { - "code": 1105, - "name": "API_ERROR_AUTH_FLOOD_ERROR", - "description": "Too many auth attempts, try again later" - } - ] - }, - { - "name": "board.addTopic", - "description": "Creates a new topic on a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "Topic title.", - "type": "string", - "required": true - }, - { - "name": "text", - "description": "Text of the topic.", - "type": "string" - }, - { - "name": "from_group", - "description": "For a community: '1' — to post the topic as by the community, '0' — to post the topic as by the user (default)", - "type": "boolean" - }, - { - "name": "attachments", - "description": "List of media objects attached to the topic, in the following format: \"_,_\", '' — Type of media object: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media owner. '' — Media ID. Example: \"photo100172_166443618,photo66748_265827614\", , \"NOTE: If you try to attach more than one reference, an error will be thrown.\",", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/board_addTopic_response" - } - } - }, - { - "name": "board.closeTopic", - "description": "Closes a topic on a community's discussion board so that comments cannot be posted.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "minimum": 0, - "required": true - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "minimum": 0, - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.createComment", - "description": "Adds a comment on a topic on a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "ID of the topic to be commented on.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the comment.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'text' is not set.) List of media objects attached to the comment, in the following format: \"_,_\", '' — Type of media object: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media owner. '' — Media ID.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "from_group", - "description": "'1' — to post the comment as by the community, '0' — to post the comment as by the user (default)", - "type": "boolean" - }, - { - "name": "sticker_id", - "description": "Sticker ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "guid", - "description": "Unique identifier to avoid repeated comments.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/board_createComment_response" - } - } - }, - { - "name": "board.deleteComment", - "description": "Deletes a comment on a topic on a community's discussion board.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.deleteTopic", - "description": "Deletes a topic from a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.editComment", - "description": "Edits a comment on a topic on a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "comment_id", - "description": "ID of the comment on the topic.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set). New comment text.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of media objects attached to the comment, in the following format: \"_,_\", '' — Type of media object: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media owner. '' — Media ID. Example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.editTopic", - "description": "Edits the title of a topic on a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "New title of the topic.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.fixTopic", - "description": "Pins a topic (fixes its place) to the top of a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "minimum": 0, - "required": true - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "minimum": 0, - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.getComments", - "description": "Returns a list of comments on a topic on a community's discussion board.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "need_likes", - "description": "'1' — to return the 'likes' field, '0' — not to return the 'likes' field (default)", - "type": "boolean" - }, - { - "name": "start_comment_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of comments.", - "type": "integer" - }, - { - "name": "count", - "description": "Number of comments to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - }, - { - "name": "extended", - "description": "'1' — to return information about users who posted comments, '0' — to return no additional fields (default)", - "type": "boolean" - }, - { - "name": "sort", - "description": "Sort order: 'asc' — by creation date in chronological order, 'desc' — by creation date in reverse chronological order,", - "type": "string", - "enum": [ - "asc", - "desc" - ], - "enumNames": [ - "chronological", - "reverse chronological" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/board_getComments_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/board_getComments_extended_response" - } - } - }, - { - "name": "board.getTopics", - "description": "Returns a list of topics on a community's discussion board.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_ids", - "description": "IDs of topics to be returned (100 maximum). By default, all topics are returned. If this parameter is set, the 'order', 'offset', and 'count' parameters are ignored.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "order", - "description": "Sort order: '1' — by date updated in reverse chronological order. '2' — by date created in reverse chronological order. '-1' — by date updated in chronological order. '-2' — by date created in chronological order. If no sort order is specified, topics are returned in the order specified by the group administrator. Pinned topics are returned first, regardless of the sorting.", - "type": "integer", - "enum": [ - 1, - 2, - -1, - -2, - 0 - ], - "enumNames": [ - "updated desc", - "created desc", - "updated asc", - "created asc", - "as by administrator" - ] - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of topics.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of topics to return.", - "type": "integer", - "default": 40, - "minimum": 0, - "maximum": 100 - }, - { - "name": "extended", - "description": "'1' — to return information about users who created topics or who posted there last, '0' — to return no additional fields (default)", - "type": "boolean" - }, - { - "name": "preview", - "description": "'1' — to return the first comment in each topic,, '2' — to return the last comment in each topic,, '0' — to return no comments. By default: '0'.", - "type": "integer", - "enum": [ - 1, - 2, - 0 - ], - "enumNames": [ - "first", - "last", - "none" - ] - }, - { - "name": "preview_length", - "description": "Number of characters after which to truncate the previewed comment. To preview the full comment, specify '0'.", - "type": "integer", - "default": 90, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/board_getTopics_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/board_getTopics_extended_response" - } - } - }, - { - "name": "board.openTopic", - "description": "Re-opens a previously closed topic on a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "minimum": 0, - "required": true - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "minimum": 0, - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.restoreComment", - "description": "Restores a comment deleted from a topic on a community's discussion board.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "board.unfixTopic", - "description": "Unpins a pinned topic from the top of a community's discussion board.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the discussion board.", - "type": "integer", - "minimum": 0, - "required": true - }, - { - "name": "topic_id", - "description": "Topic ID.", - "type": "integer", - "minimum": 0, - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "database.getChairs", - "description": "Returns list of chairs on a specified faculty.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "faculty_id", - "description": "id of the faculty to get chairs from", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "description": "offset required to get a certain subset of chairs", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "amount of chairs to get", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 10000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getChairs_response" - } - } - }, - { - "name": "database.getCities", - "description": "Returns a list of cities.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "country_id", - "description": "Country ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "region_id", - "description": "Region ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "q", - "description": "Search query.", - "type": "string" - }, - { - "name": "need_all", - "description": "'1' — to return all cities in the country, '0' — to return major cities in the country (default),", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of cities.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of cities to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getCities_response" - } - } - }, - { - "name": "database.getCitiesById", - "description": "Returns information about cities by their IDs.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "city_ids", - "description": "City IDs.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getCitiesById_response" - } - } - }, - { - "name": "database.getCountries", - "description": "Returns a list of countries.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "need_all", - "description": "'1' — to return a full list of all countries, '0' — to return a list of countries near the current user's country (default).", - "type": "boolean" - }, - { - "name": "code", - "description": "Country codes in [vk.com/dev/country_codes|ISO 3166-1 alpha-2] standard.", - "type": "string" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of countries.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of countries to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getCountries_response" - } - } - }, - { - "name": "database.getCountriesById", - "description": "Returns information about countries by their IDs.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "country_ids", - "description": "Country IDs.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getCountriesById_response" - } - } - }, - { - "name": "database.getFaculties", - "description": "Returns a list of faculties (i.e., university departments).", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "university_id", - "description": "University ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of faculties.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of faculties to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 10000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getFaculties_response" - } - } - }, - { - "name": "database.getMetroStations", - "description": "Get metro stations by city", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "city_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 500 - }, - { - "name": "extended", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getMetroStations_response" - } - } - }, - { - "name": "database.getMetroStationsById", - "description": "Get metro station by his id", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "station_ids", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 30 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getMetroStationsById_response" - } - } - }, - { - "name": "database.getRegions", - "description": "Returns a list of regions.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "country_id", - "description": "Country ID, received in [vk.com/dev/database.getCountries|database.getCountries] method.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "q", - "description": "Search query.", - "type": "string" - }, - { - "name": "offset", - "description": "Offset needed to return specific subset of regions.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of regions to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getRegions_response" - } - } - }, - { - "name": "database.getSchoolClasses", - "description": "Returns a list of school classes specified for the country.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "country_id", - "description": "Country ID.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getSchoolClasses_response" - } - } - }, - { - "name": "database.getSchools", - "description": "Returns a list of schools.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "q", - "description": "Search query.", - "type": "string" - }, - { - "name": "city_id", - "description": "City ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of schools.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of schools to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 10000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getSchools_response" - } - } - }, - { - "name": "database.getUniversities", - "description": "Returns a list of higher education institutions.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "q", - "description": "Search query.", - "type": "string" - }, - { - "name": "country_id", - "description": "Country ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "city_id", - "description": "City ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of universities.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of universities to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 10000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/database_getUniversities_response" - } - } - }, - { - "name": "docs.add", - "description": "Copies a document to a user's or community's document list.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the document. Use a negative value to designate a community ID.", - "type": "integer", - "required": true - }, - { - "name": "doc_id", - "description": "Document ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "access_key", - "description": "Access key. This parameter is required if 'access_key' was returned with the document's data.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_add_response" - } - } - }, - { - "name": "docs.delete", - "description": "Deletes a user or community document.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the document. Use a negative value to designate a community ID.", - "type": "integer", - "required": true - }, - { - "name": "doc_id", - "description": "Document ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1151, - "name": "API_ERROR_PARAM_DOC_DELETE_ACCESS", - "description": "Access to document deleting is denied" - }, - { - "code": 1150, - "name": "API_ERROR_PARAM_DOC_ID", - "description": "Invalid document id" - } - ] - }, - { - "name": "docs.edit", - "description": "Edits a document.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer", - "required": true - }, - { - "name": "doc_id", - "description": "Document ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "Document title.", - "type": "string", - "maxLength": 128 - }, - { - "name": "tags", - "description": "Document tags.", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1153, - "name": "API_ERROR_PARAM_DOC_ACCESS", - "description": "Access to document is denied" - }, - { - "code": 1150, - "name": "API_ERROR_PARAM_DOC_ID", - "description": "Invalid document id" - }, - { - "code": 1152, - "name": "API_ERROR_PARAM_DOC_TITLE", - "description": "Invalid document title" - } - ] - }, - { - "name": "docs.get", - "description": "Returns detailed information about user or community documents.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "count", - "description": "Number of documents to return. By default, all documents.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of documents.", - "type": "integer", - "minimum": 0 - }, - { - "name": "type", - "type": "integer", - "default": 0, - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8 - ] - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the documents. Use a negative value to designate a community ID.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_get_response" - } - } - }, - { - "name": "docs.getById", - "description": "Returns information about documents by their IDs.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "docs", - "description": "Document IDs. Example: , \"66748_91488,66748_91455\",", - "type": "array", - "required": true, - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_getById_response" - } - } - }, - { - "name": "docs.getMessagesUploadServer", - "description": "Returns the server address for document upload.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "type", - "description": "Document type.", - "type": "string", - "default": "doc", - "enum": [ - "audio_message", - "doc", - "graffiti" - ] - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'Chat ID', e.g. '2000000001'. For community: '- Community ID', e.g. '-12345'. \"", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_getUploadServer_response" - } - }, - "errors": [ - { - "code": 901, - "name": "API_ERROR_MESSAGES_DENY_SEND", - "description": "Can't send messages for users without permission" - } - ] - }, - { - "name": "docs.getTypes", - "description": "Returns documents types available for current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the documents. Use a negative value to designate a community ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_getTypes_response" - } - } - }, - { - "name": "docs.getUploadServer", - "description": "Returns the server address for document upload.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID (if the document will be uploaded to the community).", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_getUploadServer" - } - } - }, - { - "name": "docs.getWallUploadServer", - "description": "Returns the server address for document upload onto a user's or community's wall.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID (if the document will be uploaded to the community).", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_getUploadServer_response" - } - } - }, - { - "name": "docs.save", - "description": "Saves a document after [vk.com/dev/upload_files_2|uploading it to a server].", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "file", - "description": "This parameter is returned when the file is [vk.com/dev/upload_files_2|uploaded to the server].", - "type": "string", - "required": true - }, - { - "name": "title", - "description": "Document title.", - "type": "string" - }, - { - "name": "tags", - "description": "Document tags.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_save_response" - } - }, - "errors": [ - { - "code": 105, - "name": "API_ERROR_SAVE_FILE", - "description": "Couldn't save file" - } - ] - }, - { - "name": "docs.search", - "description": "Returns a list of documents matching the search criteria.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string.", - "type": "string", - "required": true, - "maxLength": 512 - }, - { - "name": "search_own", - "type": "boolean" - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/docs_search_response" - } - } - }, - { - "name": "fave.addArticle", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "url", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_bool_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "fave.addLink", - "description": "Adds a link to user faves.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "link", - "description": "Link URL.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.addPage", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.addPost", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "id", - "type": "integer", - "required": true - }, - { - "name": "access_key", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.addProduct", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "id", - "type": "integer", - "required": true - }, - { - "name": "access_key", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.addTag", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "name", - "type": "string", - "maxLength": 50 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/fave_addTag_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "fave.addVideo", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "id", - "type": "integer", - "required": true - }, - { - "name": "access_key", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.editTag", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "id", - "type": "integer", - "required": true - }, - { - "name": "name", - "type": "string", - "required": true, - "maxLength": 50 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.get", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "extended", - "description": "'1' — to return additional 'wall', 'profiles', and 'groups' fields. By default: '0'.", - "type": "boolean", - "default": false - }, - { - "name": "item_type", - "type": "string", - "enum": [ - "article", - "link", - "narrative", - "page", - "podcast", - "post", - "product", - "video" - ] - }, - { - "name": "tag_id", - "description": "Tag ID.", - "type": "integer" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of users.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of users to return.", - "type": "integer", - "default": 50, - "minimum": 1, - "maximum": 100 - }, - { - "name": "fields", - "type": "string", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "is_from_snackbar", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/fave_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/fave_get_extended_response" - } - } - }, - { - "name": "fave.getPages", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "type": "integer", - "minimum": 0, - "maximum": 10000 - }, - { - "name": "count", - "type": "integer", - "default": 50, - "minimum": 1, - "maximum": 500 - }, - { - "name": "type", - "type": "string", - "enum": [ - "groups", - "hints", - "users" - ] - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - }, - { - "name": "tag_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/fave_getPages_response" - } - } - }, - { - "name": "fave.getTags", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/fave_getTags_response" - } - } - }, - { - "name": "fave.markSeen", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_bool_response" - } - } - }, - { - "name": "fave.removeArticle", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "article_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_bool_response" - } - } - }, - { - "name": "fave.removeLink", - "description": "Removes link from the user's faves.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "link_id", - "description": "Link ID (can be obtained by [vk.com/dev/faves.getLinks|faves.getLinks] method).", - "type": "string" - }, - { - "name": "link", - "description": "Link URL", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.removePage", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer" - }, - { - "name": "group_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.removePost", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "id", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.removeProduct", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "id", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.removeTag", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "id", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.reorderTags", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "ids", - "type": "array", - "required": true, - "items": { - "type": "integer" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "fave.setPageTags", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "tag_ids", - "type": "array", - "items": { - "type": "integer" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "fave.setTags", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "item_type", - "type": "string", - "enum": [ - "article", - "link", - "narrative", - "page", - "podcast", - "post", - "product", - "video" - ] - }, - { - "name": "item_owner_id", - "type": "integer" - }, - { - "name": "item_id", - "type": "integer" - }, - { - "name": "tag_ids", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "link_id", - "type": "string" - }, - { - "name": "link_url", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "fave.trackPageInteraction", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "friends.add", - "description": "Approves or creates a friend request.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of the user whose friend request will be approved or to whom a friend request will be sent.", - "type": "integer", - "minimum": 0 - }, - { - "name": "text", - "description": "Text of the message (up to 500 characters) for the friend request, if any.", - "type": "string" - }, - { - "name": "follow", - "description": "'1' to pass an incoming request to followers list.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_add_response" - } - }, - "errors": [ - { - "code": 175, - "name": "API_ERROR_FRIENDS_ADD_IN_ENEMY", - "description": "Cannot add this user to friends as they have put you on their blacklist" - }, - { - "code": 176, - "name": "API_ERROR_FRIENDS_ADD_ENEMY", - "description": "Cannot add this user to friends as you put him on blacklist" - }, - { - "code": 174, - "name": "API_ERROR_FRIENDS_ADD_YOURSELF", - "description": "Cannot add user himself as friend" - }, - { - "code": 177, - "name": "API_ERROR_FRIENDS_ADD_NOT_FOUND", - "description": "Cannot add this user to friends as user not found" - } - ] - }, - { - "name": "friends.addList", - "description": "Creates a new friend list for the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "name", - "description": "Name of the friend list.", - "type": "string", - "required": true - }, - { - "name": "user_ids", - "description": "IDs of users to be added to the friend list.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_addList_response" - } - }, - "errors": [ - { - "code": 173, - "name": "API_ERROR_FRIENDS_LIST_LIMIT", - "description": "Reached the maximum number of lists" - } - ] - }, - { - "name": "friends.areFriends", - "description": "Checks the current user's friendship status with other specified users.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_ids", - "description": "IDs of the users whose friendship status to check.", - "type": "array", - "required": true, - "items": { - "type": "integer" - } - }, - { - "name": "need_sign", - "description": "'1' — to return 'sign' field. 'sign' is md5(\"{id}_{user_id}_{friends_status}_{application_secret}\"), where id is current user ID. This field allows to check that data has not been modified by the client. By default: '0'.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_areFriends_response" - } - } - }, - { - "name": "friends.delete", - "description": "Declines a friend request or deletes a user from the current user's friend list.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of the user whose friend request is to be declined or who is to be deleted from the current user's friend list.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_delete_response" - } - } - }, - { - "name": "friends.deleteAllRequests", - "description": "Marks all incoming friend requests as viewed.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "friends.deleteList", - "description": "Deletes a friend list of the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "list_id", - "description": "ID of the friend list to delete.", - "type": "integer", - "required": true, - "minimum": 0, - "maximum": 24 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 171, - "name": "API_ERROR_FRIENDS_LIST_ID", - "description": "Invalid list id" - } - ] - }, - { - "name": "friends.edit", - "description": "Edits the friend lists of the selected user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of the user whose friend list is to be edited.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "list_ids", - "description": "IDs of the friend lists to which to add the user.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "friends.editList", - "description": "Edits a friend list of the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "name", - "description": "Name of the friend list.", - "type": "string" - }, - { - "name": "list_id", - "description": "Friend list ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_ids", - "description": "IDs of users in the friend list.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "add_user_ids", - "description": "(Applies if 'user_ids' parameter is not set.), User IDs to add to the friend list.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "delete_user_ids", - "description": "(Applies if 'user_ids' parameter is not set.), User IDs to delete from the friend list.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 171, - "name": "API_ERROR_FRIENDS_LIST_ID", - "description": "Invalid list id" - } - ] - }, - { - "name": "friends.get", - "description": "Returns a list of user IDs or detailed information about a user's friends.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID. By default, the current user ID.", - "type": "integer" - }, - { - "name": "order", - "description": "Sort order: , 'name' — by name (enabled only if the 'fields' parameter is used), 'hints' — by rating, similar to how friends are sorted in My friends section, , This parameter is available only for [vk.com/dev/standalone|desktop applications].", - "type": "string", - "enum": [ - "name", - "hints" - ] - }, - { - "name": "list_id", - "description": "ID of the friend list returned by the [vk.com/dev/friends.getLists|friends.getLists] method to be used as the source. This parameter is taken into account only when the uid parameter is set to the current user ID. This parameter is available only for [vk.com/dev/standalone|desktop applications].", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of friends to return.", - "type": "integer", - "default": 5000, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of friends.", - "type": "integer", - "minimum": 0 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'uid', 'first_name', 'last_name', 'nickname', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'domain', 'has_mobile', 'rate', 'contacts', 'education'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: , 'nom' — nominative (default) , 'gen' — genitive , 'dat' — dative , 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - }, - { - "name": "ref", - "type": "string", - "maxLength": 255 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_get_response" - }, - "fieldsResponse": { - "$ref": "responses.json#/definitions/friends_get_fields_response" - } - } - }, - { - "name": "friends.getAppUsers", - "description": "Returns a list of IDs of the current user's friends who installed the application.", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getAppUsers_response" - } - } - }, - { - "name": "friends.getByPhones", - "description": "Returns a list of the current user's friends whose phone numbers, validated or specified in a profile, are in a given list.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "phones", - "description": "List of phone numbers in MSISDN format (maximum 1000). Example: \"+79219876543,+79111234567\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online, counters'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getByPhones_response" - } - } - }, - { - "name": "friends.getLists", - "description": "Returns a list of the user's friend lists.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "return_system", - "description": "'1' — to return system friend lists. By default: '0'.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getLists_response" - } - } - }, - { - "name": "friends.getMutual", - "description": "Returns a list of user IDs of the mutual friends of two users.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "source_uid", - "description": "ID of the user whose friends will be checked against the friends of the user specified in 'target_uid'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "target_uid", - "description": "ID of the user whose friends will be checked against the friends of the user specified in 'source_uid'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "target_uids", - "description": "IDs of the users whose friends will be checked against the friends of the user specified in 'source_uid'.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 100 - }, - { - "name": "order", - "description": "Sort order: 'random' — random order", - "type": "string" - }, - { - "name": "count", - "description": "Number of mutual friends to return.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of mutual friends.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getMutual_response" - }, - "targetUidsResponse": { - "$ref": "responses.json#/definitions/friends_getMutual_target_uids_response" - } - } - }, - { - "name": "friends.getOnline", - "description": "Returns a list of user IDs of a user's friends who are online.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "list_id", - "description": "Friend list ID. If this parameter is not set, information about all online friends is returned.", - "type": "integer", - "minimum": 0 - }, - { - "name": "online_mobile", - "description": "'1' — to return an additional 'online_mobile' field, '0' — (default),", - "type": "boolean" - }, - { - "name": "order", - "description": "Sort order: 'random' — random order", - "type": "string" - }, - { - "name": "count", - "description": "Number of friends to return.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of friends.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getOnline_response" - }, - "onlineMobileResponse": { - "$ref": "responses.json#/definitions/friends_getOnline_online_mobile_response" - } - } - }, - { - "name": "friends.getRecent", - "description": "Returns a list of user IDs of the current user's recently added friends.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "count", - "description": "Number of recently added friends to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getRecent_response" - } - } - }, - { - "name": "friends.getRequests", - "description": "Returns information about the current user's incoming and outgoing friend requests.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "description": "Offset needed to return a specific subset of friend requests.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of friend requests to return (default 100, maximum 1000).", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "extended", - "description": "'1' — to return response messages from users who have sent a friend request or, if 'suggested' is set to '1', to return a list of suggested friends", - "type": "boolean" - }, - { - "name": "need_mutual", - "description": "'1' — to return a list of mutual friends (up to 20), if any", - "type": "boolean" - }, - { - "name": "out", - "description": "'1' — to return outgoing requests, '0' — to return incoming requests (default)", - "type": "boolean" - }, - { - "name": "sort", - "description": "Sort order: '1' — by number of mutual friends, '0' — by date", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1 - ], - "enumNames": [ - "date", - "mutual" - ] - }, - { - "name": "need_viewed", - "type": "boolean", - "default": 0 - }, - { - "name": "suggested", - "description": "'1' — to return a list of suggested friends, '0' — to return friend requests (default)", - "type": "boolean" - }, - { - "name": "ref", - "type": "string", - "maxLength": 255 - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getRequests_response" - }, - "needMutualResponse": { - "$ref": "responses.json#/definitions/friends_getRequests_need_mutual_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/friends_getRequests_extended_response" - } - } - }, - { - "name": "friends.getSuggestions", - "description": "Returns a list of profiles of users whom the current user may know.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "filter", - "description": "Types of potential friends to return: 'mutual' — users with many mutual friends , 'contacts' — users found with the [vk.com/dev/account.importContacts|account.importContacts] method , 'mutual_contacts' — users who imported the same contacts as the current user with the [vk.com/dev/account.importContacts|account.importContacts] method", - "type": "array", - "items": { - "type": "string", - "enum": [ - "mutual", - "contacts", - "mutual_contacts" - ] - } - }, - { - "name": "count", - "description": "Number of suggestions to return.", - "type": "integer", - "default": 500, - "minimum": 0, - "maximum": 500 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of suggestions.", - "type": "integer", - "minimum": 0 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online', 'counters'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: , 'nom' — nominative (default) , 'gen' — genitive , 'dat' — dative , 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_getSuggestions_response" - } - } - }, - { - "name": "friends.search", - "description": "Returns a list of friends matching the search criteria.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "q", - "description": "Search query string (e.g., 'Vasya Babich').", - "type": "string" - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online',", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: 'nom' — nominative (default), 'gen' — genitive , 'dat' — dative, 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "default": "Nom", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of friends.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of friends to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/friends_search_response" - } - } - }, - { - "name": "gifts.get", - "description": "Returns a list of user gifts.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of gifts to return.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/gifts_get_response" - } - } - }, - { - "name": "groups.addAddress", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "type": "string", - "required": true, - "maxLength": 255 - }, - { - "name": "address", - "type": "string", - "required": true, - "maxLength": 255 - }, - { - "name": "additional_address", - "type": "string", - "maxLength": 400 - }, - { - "name": "country_id", - "type": "integer", - "required": true, - "minimum": 1 - }, - { - "name": "city_id", - "type": "integer", - "required": true, - "minimum": 1 - }, - { - "name": "metro_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "latitude", - "type": "number", - "required": true, - "minimum": -90, - "maximum": 90 - }, - { - "name": "longitude", - "type": "number", - "required": true, - "minimum": -180, - "maximum": 180 - }, - { - "name": "phone", - "type": "string" - }, - { - "name": "work_info_status", - "type": "string", - "default": "no_information", - "enum": [ - "always_opened", - "forever_closed", - "no_information", - "temporarily_closed", - "timetable" - ], - "$ref": "objects.json#/definitions/groups_address_work_info_status" - }, - { - "name": "timetable", - "type": "string" - }, - { - "name": "is_main_address", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_add_address_response" - } - }, - "errors": [ - { - "code": 260, - "name": "API_ERROR_ACCESS_GROUPS", - "description": "Access to the groups list is denied due to the user's privacy settings" - }, - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - }, - { - "code": 706, - "name": "API_ERROR_GROUP_TOO_MANY_ADDRESSES", - "description": "Too many addresses in club" - } - ] - }, - { - "name": "groups.addCallbackServer", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "url", - "type": "string", - "required": true - }, - { - "name": "title", - "type": "string", - "required": true, - "maxLength": 14 - }, - { - "name": "secret_key", - "type": "string", - "maxLength": 50 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_addCallbackServer_response" - } - }, - "errors": [ - { - "code": 2000, - "name": "API_ERROR_CALLBACK_API_SERVERS_LIMIT", - "description": "Servers number limit is reached" - } - ], - "emptyResponse": true - }, - { - "name": "groups.addLink", - "description": "Allows to add a link to the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "link", - "description": "Link URL.", - "type": "string", - "required": true - }, - { - "name": "text", - "description": "Description text for the link.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_addLink_response" - } - } - }, - { - "name": "groups.approveRequest", - "description": "Allows to approve join request to the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "groups.ban", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "type": "integer" - }, - { - "name": "end_date", - "type": "integer", - "minimum": 0 - }, - { - "name": "reason", - "type": "integer", - "minimum": 0 - }, - { - "name": "comment", - "type": "string" - }, - { - "name": "comment_visible", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.create", - "description": "Creates a new community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "title", - "description": "Community title.", - "type": "string", - "required": true - }, - { - "name": "description", - "description": "Community description (ignored for 'type' = 'public').", - "type": "string" - }, - { - "name": "type", - "description": "Community type. Possible values: *'group' – group,, *'event' – event,, *'public' – public page", - "type": "string", - "default": "group", - "enum": [ - "event", - "group", - "public" - ] - }, - { - "name": "public_category", - "description": "Category ID (for 'type' = 'public' only).", - "type": "integer", - "minimum": 0 - }, - { - "name": "subtype", - "description": "Public page subtype. Possible values: *'1' – place or small business,, *'2' – company, organization or website,, *'3' – famous person or group of people,, *'4' – product or work of art.", - "type": "integer", - "minimum": 0, - "enum": [ - 1, - 2, - 3, - 4 - ], - "enumNames": [ - "place or business", - "company or website", - "person or group", - "product or art" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_create_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "groups.deleteCallbackServer", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "server_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "groups.deleteLink", - "description": "Allows to delete a link from the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "link_id", - "description": "Link ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.disableOnline", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.edit", - "description": "Edits a community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "Community title.", - "type": "string" - }, - { - "name": "description", - "description": "Community description.", - "type": "string" - }, - { - "name": "screen_name", - "description": "Community screen name.", - "type": "string" - }, - { - "name": "access", - "description": "Community type. Possible values: *'0' – open,, *'1' – closed,, *'2' – private.", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_access" - }, - { - "name": "website", - "description": "Website that will be displayed in the community information field.", - "type": "string" - }, - { - "name": "subject", - "description": "Community subject. Possible values: , *'1' – auto/moto,, *'2' – activity holidays,, *'3' – business,, *'4' – pets,, *'5' – health,, *'6' – dating and communication, , *'7' – games,, *'8' – IT (computers and software),, *'9' – cinema,, *'10' – beauty and fashion,, *'11' – cooking,, *'12' – art and culture,, *'13' – literature,, *'14' – mobile services and internet,, *'15' – music,, *'16' – science and technology,, *'17' – real estate,, *'18' – news and media,, *'19' – security,, *'20' – education,, *'21' – home and renovations,, *'22' – politics,, *'23' – food,, *'24' – industry,, *'25' – travel,, *'26' – work,, *'27' – entertainment,, *'28' – religion,, *'29' – family,, *'30' – sports,, *'31' – insurance,, *'32' – television,, *'33' – goods and services,, *'34' – hobbies,, *'35' – finance,, *'36' – photo,, *'37' – esoterics,, *'38' – electronics and appliances,, *'39' – erotic,, *'40' – humor,, *'41' – society, humanities,, *'42' – design and graphics.", - "type": "string", - "$ref": "objects.json#/definitions/groups_group_subject" - }, - { - "name": "email", - "description": "Organizer email (for events).", - "type": "string" - }, - { - "name": "phone", - "description": "Organizer phone number (for events).", - "type": "string" - }, - { - "name": "rss", - "description": "RSS feed address for import (available only to communities with special permission. Contact vk.com/support to get it.", - "type": "string" - }, - { - "name": "event_start_date", - "description": "Event start date in Unixtime format.", - "type": "integer", - "minimum": 0 - }, - { - "name": "event_finish_date", - "description": "Event finish date in Unixtime format.", - "type": "integer", - "minimum": 0 - }, - { - "name": "event_group_id", - "description": "Organizer community ID (for events only).", - "type": "integer", - "minimum": 0 - }, - { - "name": "public_category", - "description": "Public page category ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "public_subcategory", - "description": "Public page subcategory ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "public_date", - "description": "Founding date of a company or organization owning the community in \"dd.mm.YYYY\" format.", - "type": "string" - }, - { - "name": "wall", - "description": "Wall settings. Possible values: *'0' – disabled,, *'1' – open,, *'2' – limited (groups and events only),, *'3' – closed (groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_wall" - }, - { - "name": "topics", - "description": "Board topics settings. Possbile values: , *'0' – disabled,, *'1' – open,, *'2' – limited (for groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_topics" - }, - { - "name": "photos", - "description": "Photos settings. Possible values: *'0' – disabled,, *'1' – open,, *'2' – limited (for groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_photos" - }, - { - "name": "video", - "description": "Video settings. Possible values: *'0' – disabled,, *'1' – open,, *'2' – limited (for groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_video" - }, - { - "name": "audio", - "description": "Audio settings. Possible values: *'0' – disabled,, *'1' – open,, *'2' – limited (for groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_audio" - }, - { - "name": "links", - "description": "Links settings (for public pages only). Possible values: *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "events", - "description": "Events settings (for public pages only). Possible values: *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "places", - "description": "Places settings (for public pages only). Possible values: *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "contacts", - "description": "Contacts settings (for public pages only). Possible values: *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "docs", - "description": "Documents settings. Possible values: *'0' – disabled,, *'1' – open,, *'2' – limited (for groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_docs" - }, - { - "name": "wiki", - "description": "Wiki pages settings. Possible values: *'0' – disabled,, *'1' – open,, *'2' – limited (for groups and events only).", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_wiki" - }, - { - "name": "messages", - "description": "Community messages. Possible values: *'0' — disabled,, *'1' — enabled.", - "type": "boolean" - }, - { - "name": "articles", - "type": "boolean" - }, - { - "name": "addresses", - "type": "boolean" - }, - { - "name": "age_limits", - "description": "Community age limits. Possible values: *'1' — no limits,, *'2' — 16+,, *'3' — 18+.", - "type": "integer", - "default": 1, - "minimum": 0, - "enum": [ - 1, - 2, - 3 - ], - "$ref": "objects.json#/definitions/groups_group_age_limits" - }, - { - "name": "market", - "description": "Market settings. Possible values: *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "market_comments", - "description": "market comments settings. Possible values: *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "market_country", - "description": "Market delivery countries.", - "type": "array", - "items": { - "type": "integer" - }, - "maxItems": 10 - }, - { - "name": "market_city", - "description": "Market delivery cities (if only one country is specified).", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 10 - }, - { - "name": "market_currency", - "description": "Market currency settings. Possbile values: , *'643' – Russian rubles,, *'980' – Ukrainian hryvnia,, *'398' – Kazakh tenge,, *'978' – Euro,, *'840' – US dollars", - "type": "integer", - "minimum": 0, - "$ref": "objects.json#/definitions/groups_group_market_currency" - }, - { - "name": "market_contact", - "description": "Seller contact for market. Set '0' for community messages.", - "type": "integer", - "minimum": 0 - }, - { - "name": "market_wiki", - "description": "ID of a wiki page with market description.", - "type": "integer", - "minimum": 0 - }, - { - "name": "obscene_filter", - "description": "Obscene expressions filter in comments. Possible values: , *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "obscene_stopwords", - "description": "Stopwords filter in comments. Possible values: , *'0' – disabled,, *'1' – enabled.", - "type": "boolean" - }, - { - "name": "obscene_words", - "description": "Keywords for stopwords filter.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "main_section", - "type": "integer", - "minimum": 0 - }, - { - "name": "secondary_section", - "type": "integer", - "minimum": 0 - }, - { - "name": "country", - "description": "Country of the community.", - "type": "integer", - "minimum": 0 - }, - { - "name": "city", - "description": "City of the community.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1260, - "name": "API_ERROR_INVALID_ADDRESS", - "description": "Invalid screen name" - } - ] - }, - { - "name": "groups.editAddress", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "address_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "type": "string", - "maxLength": 255 - }, - { - "name": "address", - "type": "string", - "maxLength": 255 - }, - { - "name": "additional_address", - "type": "string", - "maxLength": 400 - }, - { - "name": "country_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "city_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "metro_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "latitude", - "type": "number", - "minimum": -90, - "maximum": 90 - }, - { - "name": "longitude", - "type": "number", - "minimum": -180, - "maximum": 180 - }, - { - "name": "phone", - "type": "string" - }, - { - "name": "work_info_status", - "type": "string", - "enum": [ - "always_opened", - "forever_closed", - "no_information", - "temporarily_closed", - "timetable" - ], - "$ref": "objects.json#/definitions/groups_address_work_info_status" - }, - { - "name": "timetable", - "type": "string" - }, - { - "name": "is_main_address", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_editAddress_response" - } - }, - "errors": [ - { - "code": 260, - "name": "API_ERROR_ACCESS_GROUPS", - "description": "Access to the groups list is denied due to the user's privacy settings" - }, - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - }, - { - "code": 706, - "name": "API_ERROR_GROUP_TOO_MANY_ADDRESSES", - "description": "Too many addresses in club" - } - ] - }, - { - "name": "groups.editCallbackServer", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "server_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "url", - "type": "string", - "required": true - }, - { - "name": "title", - "type": "string", - "required": true, - "maxLength": 14 - }, - { - "name": "secret_key", - "type": "string", - "maxLength": 50 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "groups.editLink", - "description": "Allows to edit a link in the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "link_id", - "description": "Link ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "text", - "description": "New description text for the link.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.editManager", - "description": "Allows to add, remove or edit the community manager.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "role", - "description": "Manager role. Possible values: *'moderator',, *'editor',, *'administrator'.", - "type": "string", - "$ref": "objects.json#/definitions/groups_group_role" - }, - { - "name": "is_contact", - "description": "'1' — to show the manager in Contacts block of the community.", - "type": "boolean" - }, - { - "name": "contact_position", - "description": "Position to show in Contacts block.", - "type": "string" - }, - { - "name": "contact_phone", - "description": "Contact phone.", - "type": "string" - }, - { - "name": "contact_email", - "description": "Contact e-mail.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 700, - "name": "API_ERROR_GROUP_CHANGE_CREATOR", - "description": "Cannot edit creator role" - }, - { - "code": 701, - "name": "API_ERROR_GROUP_NOT_IN_CLUB", - "description": "User should be in club" - }, - { - "code": 702, - "name": "API_ERROR_GROUP_TOO_MANY_OFFICERS", - "description": "Too many officers in club" - }, - { - "code": 703, - "name": "API_ERROR_GROUP_NEED_2FA", - "description": "You need to enable 2FA for this action" - }, - { - "code": 704, - "name": "API_ERROR_GROUP_HOST_NEED_2FA", - "description": "User needs to enable 2FA for this action" - } - ] - }, - { - "name": "groups.enableOnline", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.get", - "description": "Returns a list of the communities to which a user belongs.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' — to return complete information about a user's communities, '0' — to return a list of community IDs without any additional fields (default),", - "type": "boolean" - }, - { - "name": "filter", - "description": "Types of communities to return: 'admin' — to return communities administered by the user , 'editor' — to return communities where the user is an administrator or editor, 'moder' — to return communities where the user is an administrator, editor, or moderator, 'groups' — to return only groups, 'publics' — to return only public pages, 'events' — to return only events", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_filter" - } - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_fields" - } - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of communities.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of communities to return.", - "type": "integer", - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/groups_get_extended_response" - } - }, - "errors": [ - { - "code": 260, - "name": "API_ERROR_ACCESS_GROUPS", - "description": "Access to the groups list is denied due to the user's privacy settings" - } - ] - }, - { - "name": "groups.getAddresses", - "description": "Returns a list of community addresses.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID or screen name of the community.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "address_ids", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "minItems": 0, - "maxItems": 100 - }, - { - "name": "latitude", - "description": "Latitude of the user geo position.", - "type": "number", - "minimum": -90, - "maximum": 90 - }, - { - "name": "longitude", - "description": "Longitude of the user geo position.", - "type": "number", - "minimum": -180, - "maximum": 180 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of community addresses.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of community addresses to return.", - "type": "integer", - "default": 10, - "minimum": 0 - }, - { - "name": "fields", - "description": "Address fields", - "type": "array", - "default": [ - "id", - "title", - "address", - "additional_address", - "country_id", - "city_id", - "metro_station_id", - "latitude", - "longitude", - "distance", - "work_info_status", - "timetable", - "phone", - "time_offset" - ], - "items": { - "$ref": "objects.json#/definitions/addresses_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getAddresses_response" - } - }, - "errors": [ - { - "code": 125, - "name": "API_ERROR_PARAM_GROUP_ID", - "description": "Invalid group id" - } - ] - }, - { - "name": "groups.getBanned", - "description": "Returns a list of users on a community blacklist.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of users.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of users to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - }, - { - "name": "owner_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getBanned_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "groups.getById", - "description": "Returns information about communities by their IDs.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "group_ids", - "description": "IDs or screen names of communities.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "group_id", - "description": "ID or screen name of the community.", - "type": "string" - }, - { - "name": "fields", - "description": "Group fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getById_response" - } - } - }, - { - "name": "groups.getCallbackConfirmationCode", - "description": "Returns Callback API confirmation code for the community.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getCallbackConfirmationCode_response" - } - } - }, - { - "name": "groups.getCallbackServers", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "server_ids", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getCallbackServers_response" - } - } - }, - { - "name": "groups.getCallbackSettings", - "description": "Returns [vk.com/dev/callback_api|Callback API] notifications settings.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "server_id", - "description": "Server ID.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getCallbackSettings_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "groups.getCatalog", - "description": "Returns communities list for a catalog category.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "category_id", - "description": "Category id received from [vk.com/dev/groups.getCatalogInfo|groups.getCatalogInfo].", - "type": "integer", - "minimum": 0 - }, - { - "name": "subcategory_id", - "description": "Subcategory id received from [vk.com/dev/groups.getCatalogInfo|groups.getCatalogInfo].", - "type": "integer", - "minimum": 0, - "maximum": 99 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getCatalog_response" - } - }, - "errors": [ - { - "code": 1310, - "name": "API_ERROR_COMMUNITIES_CATALOG_DISABLED", - "description": "Catalog is not available for this user" - }, - { - "code": 1311, - "name": "API_ERROR_COMMUNITIES_CATEGORIES_DISABLED", - "description": "Catalog categories are not available for this user" - } - ] - }, - { - "name": "groups.getCatalogInfo", - "description": "Returns categories list for communities catalog", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "extended", - "description": "1 – to return communities count and three communities for preview. By default: 0.", - "type": "boolean", - "default": 0 - }, - { - "name": "subcategories", - "description": "1 – to return subcategories info. By default: 0.", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getCatalogInfo_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/groups_getCatalogInfo_extended_response" - } - } - }, - { - "name": "groups.getInvitedUsers", - "description": "Returns invited users list of a community", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Group ID to return invited users for.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 20, - "minimum": 0 - }, - { - "name": "fields", - "description": "List of additional fields to be returned. Available values: 'sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname. Possible values: *'nom' — nominative (default),, *'gen' — genitive,, *'dat' — dative,, *'acc' — accusative, , *'ins' — instrumental,, *'abl' — prepositional.", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getInvitedUsers_response" - } - } - }, - { - "name": "groups.getInvites", - "description": "Returns a list of invitations to join communities and events.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "description": "Offset needed to return a specific subset of invitations.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of invitations to return.", - "type": "integer", - "default": 20, - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' — to return additional [vk.com/dev/fields_groups|fields] for communities..", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getInvites_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/groups_getInvites_extended_response" - } - } - }, - { - "name": "groups.getLongPollServer", - "description": "Returns the data needed to query a Long Poll server for events", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getLongPollServer_response" - } - } - }, - { - "name": "groups.getLongPollSettings", - "description": "Returns Long Poll notification settings", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getLongPollSettings_response" - } - } - }, - { - "name": "groups.getMembers", - "description": "Returns a list of community members.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID or screen name of the community.", - "type": "string" - }, - { - "name": "sort", - "description": "Sort order. Available values: 'id_asc', 'id_desc', 'time_asc', 'time_desc'. 'time_asc' and 'time_desc' are availavle only if the method is called by the group's 'moderator'.", - "type": "string", - "default": "id_asc", - "enum": [ - "id_asc", - "id_desc", - "time_asc", - "time_desc" - ] - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of community members.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of community members to return.", - "type": "integer", - "default": 1000, - "minimum": 0 - }, - { - "name": "fields", - "description": "List of additional fields to be returned. Available values: 'sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "filter", - "description": "*'friends' – only friends in this community will be returned,, *'unsure' – only those who pressed 'I may attend' will be returned (if it's an event).", - "type": "string", - "enum": [ - "friends", - "unsure" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getMembers_response" - }, - "fieldsResponse": { - "$ref": "responses.json#/definitions/groups_getMembers_fields_response" - }, - "filterResponse": { - "$ref": "responses.json#/definitions/groups_getMembers_filter_response" - } - }, - "errors": [ - { - "code": 125, - "name": "API_ERROR_PARAM_GROUP_ID", - "description": "Invalid group id" - } - ] - }, - { - "name": "groups.getRequests", - "description": "Returns a list of requests to the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getRequests_response" - }, - "fieldsResponse": { - "$ref": "responses.json#/definitions/groups_getRequests_fields_response" - } - } - }, - { - "name": "groups.getSettings", - "description": "Returns community settings.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getSettings_response" - } - } - }, - { - "name": "groups.getTokenPermissions", - "access_token_type": [ - "group" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_getTokenPermissions_response" - } - } - }, - { - "name": "groups.invite", - "description": "Allows to invite friends to the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "groups.isMember", - "description": "Returns information specifying whether a user is a member of a community.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID or screen name of the community.", - "type": "string", - "required": true - }, - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "user_ids", - "description": "User IDs.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "extended", - "description": "'1' — to return an extended response with additional fields. By default: '0'.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_isMember_response" - }, - "userIdsResponse": { - "$ref": "responses.json#/definitions/groups_isMember_user_ids_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/groups_isMember_extended_response" - }, - "userIds_Extended_Response": { - "$ref": "responses.json#/definitions/groups_isMember_user_ids_extended_response" - } - } - }, - { - "name": "groups.join", - "description": "With this method you can join the group or public page, and also confirm your participation in an event.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID or screen name of the community.", - "type": "integer", - "minimum": 0 - }, - { - "name": "not_sure", - "description": "Optional parameter which is taken into account when 'gid' belongs to the event: '1' — Perhaps I will attend, '0' — I will be there for sure (default), ,", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "groups.leave", - "description": "With this method you can leave a group, public page, or event.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID or screen name of the community.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.removeUser", - "description": "Removes a user from the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.reorderLink", - "description": "Allows to reorder links in the community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "link_id", - "description": "Link ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "after", - "description": "ID of the link after which to place the link with 'link_id'.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.search", - "description": "Returns a list of communities matching the search criteria.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string.", - "type": "string", - "required": true - }, - { - "name": "type", - "description": "Community type. Possible values: 'group, page, event.'", - "type": "string", - "enum": [ - "group", - "page", - "event" - ] - }, - { - "name": "country_id", - "description": "Country ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "city_id", - "description": "City ID. If this parameter is transmitted, country_id is ignored.", - "type": "integer", - "minimum": 0 - }, - { - "name": "future", - "description": "'1' — to return only upcoming events. Works with the 'type' = 'event' only.", - "type": "boolean" - }, - { - "name": "market", - "description": "'1' — to return communities with enabled market only.", - "type": "boolean" - }, - { - "name": "sort", - "description": "Sort order. Possible values: *'0' — default sorting (similar the full version of the site),, *'1' — by growth speed,, *'2'— by the \"day attendance/members number\" ratio,, *'3' — by the \"Likes number/members number\" ratio,, *'4' — by the \"comments number/members number\" ratio,, *'5' — by the \"boards entries number/members number\" ratio.", - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "enumNames": [ - "default", - "growth", - "attendance", - "likes", - "comments", - "entries" - ] - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of communities to return. \"Note that you can not receive more than first thousand of results, regardless of 'count' and 'offset' values.\"", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/groups_search_response" - } - } - }, - { - "name": "groups.setCallbackSettings", - "description": "Allow to set notifications settings for group.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "server_id", - "description": "Server ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "api_version", - "type": "string" - }, - { - "name": "message_new", - "description": "A new incoming message has been received ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_reply", - "description": "A new outcoming message has been received ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_allow", - "description": "Allowed messages notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_edit", - "type": "boolean" - }, - { - "name": "message_deny", - "description": "Denied messages notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_typing_state", - "type": "boolean" - }, - { - "name": "photo_new", - "description": "New photos notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "audio_new", - "description": "New audios notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_new", - "description": "New videos notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_new", - "description": "New wall replies notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_edit", - "description": "Wall replies edited notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_delete", - "description": "A wall comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_restore", - "description": "A wall comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_post_new", - "description": "New wall posts notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_repost", - "description": "New wall posts notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_new", - "description": "New board posts notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_edit", - "description": "Board posts edited notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_restore", - "description": "Board posts restored notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_delete", - "description": "Board posts deleted notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_new", - "description": "New comment to photo notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_edit", - "description": "A photo comment has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_delete", - "description": "A photo comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_restore", - "description": "A photo comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_new", - "description": "New comment to video notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_edit", - "description": "A video comment has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_delete", - "description": "A video comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_restore", - "description": "A video comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_new", - "description": "New comment to market item notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_edit", - "description": "A market comment has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_delete", - "description": "A market comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_restore", - "description": "A market comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "poll_vote_new", - "description": "A vote in a public poll has been added ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "group_join", - "description": "Joined community notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "group_leave", - "description": "Left community notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "group_change_settings", - "type": "boolean" - }, - { - "name": "group_change_photo", - "type": "boolean" - }, - { - "name": "group_officers_edit", - "type": "boolean" - }, - { - "name": "user_block", - "description": "User added to community blacklist", - "type": "boolean" - }, - { - "name": "user_unblock", - "description": "User removed from community blacklist", - "type": "boolean" - }, - { - "name": "lead_forms_new", - "description": "New form in lead forms", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "groups.setLongPollSettings", - "description": "Sets Long Poll notification settings", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "enabled", - "description": "Sets whether Long Poll is enabled ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "api_version", - "type": "string" - }, - { - "name": "message_new", - "description": "A new incoming message has been received ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_reply", - "description": "A new outcoming message has been received ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_allow", - "description": "Allowed messages notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_deny", - "description": "Denied messages notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_edit", - "description": "A message has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "message_typing_state", - "type": "boolean" - }, - { - "name": "photo_new", - "description": "New photos notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "audio_new", - "description": "New audios notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_new", - "description": "New videos notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_new", - "description": "New wall replies notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_edit", - "description": "Wall replies edited notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_delete", - "description": "A wall comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_reply_restore", - "description": "A wall comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_post_new", - "description": "New wall posts notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "wall_repost", - "description": "New wall posts notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_new", - "description": "New board posts notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_edit", - "description": "Board posts edited notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_restore", - "description": "Board posts restored notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "board_post_delete", - "description": "Board posts deleted notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_new", - "description": "New comment to photo notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_edit", - "description": "A photo comment has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_delete", - "description": "A photo comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "photo_comment_restore", - "description": "A photo comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_new", - "description": "New comment to video notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_edit", - "description": "A video comment has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_delete", - "description": "A video comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "video_comment_restore", - "description": "A video comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_new", - "description": "New comment to market item notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_edit", - "description": "A market comment has been edited ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_delete", - "description": "A market comment has been deleted ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "market_comment_restore", - "description": "A market comment has been restored ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "poll_vote_new", - "description": "A vote in a public poll has been added ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "group_join", - "description": "Joined community notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "group_leave", - "description": "Left community notifications ('0' — disabled, '1' — enabled).", - "type": "boolean" - }, - { - "name": "group_change_settings", - "type": "boolean" - }, - { - "name": "group_change_photo", - "type": "boolean" - }, - { - "name": "group_officers_edit", - "type": "boolean" - }, - { - "name": "user_block", - "description": "User added to community blacklist", - "type": "boolean" - }, - { - "name": "user_unblock", - "description": "User removed from community blacklist", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "groups.unban", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "leads.checkUser", - "description": "Checks if the user can start the lead.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "lead_id", - "description": "Lead ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "test_result", - "description": "Value to be return in 'result' field when test mode is used.", - "type": "integer", - "minimum": 0 - }, - { - "name": "test_mode", - "type": "boolean", - "default": 0 - }, - { - "name": "auto_start", - "type": "boolean", - "default": 0 - }, - { - "name": "age", - "description": "User age.", - "type": "integer", - "minimum": 0 - }, - { - "name": "country", - "description": "User country code.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/leads_checkUser_response" - } - }, - "errors": [ - { - "code": 106, - "name": "API_ERROR_ACTION_FAILED", - "description": "Unable to process action" - } - ] - }, - { - "name": "leads.complete", - "description": "Completes the lead started by user.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "vk_sid", - "description": "Session obtained as GET parameter when session started.", - "type": "string", - "required": true - }, - { - "name": "secret", - "description": "Secret key from the lead testing interface.", - "type": "string", - "required": true - }, - { - "name": "comment", - "description": "Comment text.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/leads_complete_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - }, - { - "code": 503, - "name": "API_ERROR_VOTES", - "description": "Not enough votes" - } - ] - }, - { - "name": "leads.getStats", - "description": "Returns lead stats data.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "lead_id", - "description": "Lead ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "secret", - "description": "Secret key obtained from the lead testing interface.", - "type": "string" - }, - { - "name": "date_start", - "description": "Day to start stats from (YYYY_MM_DD, e.g.2011-09-17).", - "type": "string" - }, - { - "name": "date_end", - "description": "Day to finish stats (YYYY_MM_DD, e.g.2011-09-17).", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/leads_getStats_response" - } - } - }, - { - "name": "leads.getUsers", - "description": "Returns a list of last user actions for the offer.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "offer_id", - "description": "Offer ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "secret", - "description": "Secret key obtained in the lead testing interface.", - "type": "string", - "required": true - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "status", - "description": "Action type. Possible values: *'0' — start,, *'1' — finish,, *'2' — blocking users,, *'3' — start in a test mode,, *'4' — finish in a test mode.", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4 - ], - "enumNames": [ - "start", - "finish", - "blocking users", - "start in test mode", - "finish in test mode" - ] - }, - { - "name": "reverse", - "description": "Sort order. Possible values: *'1' — chronological,, *'0' — reverse chronological.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/leads_getUsers_response" - } - } - }, - { - "name": "leads.metricHit", - "description": "Counts the metric event.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "data", - "description": "Metric data obtained in the lead interface.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/leads_metricHit_response" - } - } - }, - { - "name": "leads.start", - "description": "Creates new session for the user passing the offer.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "lead_id", - "description": "Lead ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "secret", - "description": "Secret key from the lead testing interface.", - "type": "string", - "required": true - }, - { - "name": "uid", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "aid", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "test_mode", - "type": "boolean", - "default": 0 - }, - { - "name": "force", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/leads_start_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "likes.add", - "description": "Adds the specified object to the 'Likes' list of the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "description": "Object type: 'post' — post on user or community wall, 'comment' — comment on a wall post, 'photo' — photo, 'audio' — audio, 'video' — video, 'note' — note, 'photo_comment' — comment on the photo, 'video_comment' — comment on the video, 'topic_comment' — comment in the discussion, 'sitepage' — page of the site where the [vk.com/dev/Like|Like widget] is installed", - "type": "string", - "required": true, - "$ref": "objects.json#/definitions/likes_type" - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the object.", - "type": "integer" - }, - { - "name": "item_id", - "description": "Object ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "access_key", - "description": "Access key required for an object owned by a private entity.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/likes_add_response" - } - } - }, - { - "name": "likes.delete", - "description": "Deletes the specified object from the 'Likes' list of the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "description": "Object type: 'post' — post on user or community wall, 'comment' — comment on a wall post, 'photo' — photo, 'audio' — audio, 'video' — video, 'note' — note, 'photo_comment' — comment on the photo, 'video_comment' — comment on the video, 'topic_comment' — comment in the discussion, 'sitepage' — page of the site where the [vk.com/dev/Like|Like widget] is installed", - "type": "string", - "required": true, - "$ref": "objects.json#/definitions/likes_type" - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the object.", - "type": "integer" - }, - { - "name": "item_id", - "description": "Object ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/likes_delete_response" - } - } - }, - { - "name": "likes.getList", - "description": "Returns a list of IDs of users who added the specified object to their 'Likes' list.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "type", - "description": ", Object type: 'post' — post on user or community wall, 'comment' — comment on a wall post, 'photo' — photo, 'audio' — audio, 'video' — video, 'note' — note, 'photo_comment' — comment on the photo, 'video_comment' — comment on the video, 'topic_comment' — comment in the discussion, 'sitepage' — page of the site where the [vk.com/dev/Like|Like widget] is installed", - "type": "string", - "required": true, - "$ref": "objects.json#/definitions/likes_type" - }, - { - "name": "owner_id", - "description": "ID of the user, community, or application that owns the object. If the 'type' parameter is set as 'sitepage', the application ID is passed as 'owner_id'. Use negative value for a community id. If the 'type' parameter is not set, the 'owner_id' is assumed to be either the current user or the same application ID as if the 'type' parameter was set to 'sitepage'.", - "type": "integer" - }, - { - "name": "item_id", - "description": "Object ID. If 'type' is set as 'sitepage', 'item_id' can include the 'page_id' parameter value used during initialization of the [vk.com/dev/Like|Like widget].", - "type": "integer" - }, - { - "name": "page_url", - "description": "URL of the page where the [vk.com/dev/Like|Like widget] is installed. Used instead of the 'item_id' parameter.", - "type": "string" - }, - { - "name": "filter", - "description": "Filters to apply: 'likes' — returns information about all users who liked the object (default), 'copies' — returns information only about users who told their friends about the object", - "type": "string", - "enum": [ - "likes", - "copies" - ] - }, - { - "name": "friends_only", - "description": "Specifies which users are returned: '1' — to return only the current user's friends, '0' — to return all users (default)", - "type": "integer", - "default": 0, - "enum": [ - 0, - 1, - 2, - 3 - ] - }, - { - "name": "extended", - "description": "Specifies whether extended information will be returned. '1' — to return extended information about users and communities from the 'Likes' list, '0' — to return no additional information (default)", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to select a specific subset of users.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of user IDs to return (maximum '1000'). Default is '100' if 'friends_only' is set to '0', otherwise, the default is '10' if 'friends_only' is set to '1'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "skip_own", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/likes_getList_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/likes_getList_extended_response" - } - } - }, - { - "name": "likes.isLiked", - "description": "Checks for the object in the 'Likes' list of the specified user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "type", - "description": "Object type: 'post' — post on user or community wall, 'comment' — comment on a wall post, 'photo' — photo, 'audio' — audio, 'video' — video, 'note' — note, 'photo_comment' — comment on the photo, 'video_comment' — comment on the video, 'topic_comment' — comment in the discussion", - "type": "string", - "required": true, - "$ref": "objects.json#/definitions/likes_type" - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the object.", - "type": "integer" - }, - { - "name": "item_id", - "description": "Object ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/likes_isLiked_response" - } - } - }, - { - "name": "market.add", - "description": "Ads a new item to the market.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "name", - "description": "Item name.", - "type": "string", - "required": true, - "minLength": 4, - "maxLength": 100 - }, - { - "name": "description", - "description": "Item description.", - "type": "string", - "required": true, - "minLength": 10 - }, - { - "name": "category_id", - "description": "Item category ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "price", - "description": "Item price.", - "type": "number", - "minimum": 0.01 - }, - { - "name": "old_price", - "type": "number", - "minimum": 0.01 - }, - { - "name": "deleted", - "description": "Item status ('1' — deleted, '0' — not deleted).", - "type": "boolean" - }, - { - "name": "main_photo_id", - "description": "Cover photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "photo_ids", - "description": "IDs of additional photos.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 4 - }, - { - "name": "url", - "description": "Url for button in market item.", - "type": "string", - "minLength": 0, - "maxLength": 320 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_add_response" - } - }, - "errors": [ - { - "code": 205, - "name": "API_ERROR_ACCESS_MARKET", - "description": "Access denied" - }, - { - "code": 1405, - "name": "API_ERROR_MARKET_TOO_MANY_ITEMS", - "description": "Too many items" - }, - { - "code": 1408, - "name": "API_ERROR_MARKET_ITEM_HAS_BAD_LINKS", - "description": "Item has bad links in description" - } - ] - }, - { - "name": "market.addAlbum", - "description": "Creates new collection of items", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "title", - "description": "Collection title.", - "type": "string", - "required": true, - "maxLength": 128 - }, - { - "name": "photo_id", - "description": "Cover photo ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "main_album", - "description": "Set as main ('1' – set, '0' – no).", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_addAlbum_response" - } - }, - "errors": [ - { - "code": 1407, - "name": "API_ERROR_MARKET_TOO_MANY_ALBUMS", - "description": "Too many albums" - } - ] - }, - { - "name": "market.addToAlbum", - "description": "Adds an item to one or multiple collections.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "album_ids", - "description": "Collections IDs to add item to.", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1402, - "name": "API_ERROR_MARKET_ALBUM_NOT_FOUND", - "description": "Album not found" - }, - { - "code": 1403, - "name": "API_ERROR_MARKET_ITEM_NOT_FOUND", - "description": "Item not found" - }, - { - "code": 1406, - "name": "API_ERROR_MARKET_TOO_MANY_ITEMS_IN_ALBUM", - "description": "Too many items in album" - }, - { - "code": 1404, - "name": "API_ERROR_MARKET_ITEM_ALREADY_ADDED", - "description": "Item already added to album" - } - ] - }, - { - "name": "market.createComment", - "description": "Creates a new comment for an item.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "Comment text (required if 'attachments' parameter is not specified)", - "type": "string" - }, - { - "name": "attachments", - "description": "Comma-separated list of objects attached to a comment. The field is submitted the following way: , \"'_,_'\", , '' - media attachment type: \"'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document\", , '' - media owner id, '' - media attachment id, , For example: \"photo100172_166443618,photo66748_265827614\",", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "from_group", - "description": "'1' - comment will be published on behalf of a community, '0' - on behalf of a user (by default).", - "type": "boolean" - }, - { - "name": "reply_to_comment", - "description": "ID of a comment to reply with current comment to.", - "type": "integer", - "minimum": 0 - }, - { - "name": "sticker_id", - "description": "Sticker ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "guid", - "description": "Random value to avoid resending one comment.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_createComment_response" - } - } - }, - { - "name": "market.delete", - "description": "Deletes an item.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 205, - "name": "API_ERROR_ACCESS_MARKET", - "description": "Access denied" - } - ] - }, - { - "name": "market.deleteAlbum", - "description": "Deletes a collection of items.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an collection owner community.", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "description": "Collection ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1402, - "name": "API_ERROR_MARKET_ALBUM_NOT_FOUND", - "description": "Album not found" - } - ] - }, - { - "name": "market.deleteComment", - "description": "Deletes an item's comment", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "identifier of an item owner community, \"Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community \"", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "comment id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_deleteComment_response" - } - } - }, - { - "name": "market.edit", - "description": "Edits an item.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "name", - "description": "Item name.", - "type": "string", - "required": true, - "minLength": 4, - "maxLength": 100 - }, - { - "name": "description", - "description": "Item description.", - "type": "string", - "required": true, - "minLength": 10 - }, - { - "name": "category_id", - "description": "Item category ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "price", - "description": "Item price.", - "type": "number", - "required": true, - "minimum": 0.01 - }, - { - "name": "deleted", - "description": "Item status ('1' — deleted, '0' — not deleted).", - "type": "boolean" - }, - { - "name": "main_photo_id", - "description": "Cover photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "photo_ids", - "description": "IDs of additional photos.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 4 - }, - { - "name": "url", - "description": "Url for button in market item.", - "type": "string", - "minLength": 0, - "maxLength": 320 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 205, - "name": "API_ERROR_ACCESS_MARKET", - "description": "Access denied" - }, - { - "code": 1403, - "name": "API_ERROR_MARKET_ITEM_NOT_FOUND", - "description": "Item not found" - }, - { - "code": 1408, - "name": "API_ERROR_MARKET_ITEM_HAS_BAD_LINKS", - "description": "Item has bad links in description" - } - ] - }, - { - "name": "market.editAlbum", - "description": "Edits a collection of items", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an collection owner community.", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "description": "Collection ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "Collection title.", - "type": "string", - "required": true, - "maxLength": 128 - }, - { - "name": "photo_id", - "description": "Cover photo id", - "type": "integer", - "minimum": 0 - }, - { - "name": "main_album", - "description": "Set as main ('1' – set, '0' – no).", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1402, - "name": "API_ERROR_MARKET_ALBUM_NOT_FOUND", - "description": "Album not found" - } - ] - }, - { - "name": "market.editComment", - "description": "Chages item comment's text", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "New comment text (required if 'attachments' are not specified), , 2048 symbols maximum.", - "type": "string" - }, - { - "name": "attachments", - "description": "Comma-separated list of objects attached to a comment. The field is submitted the following way: , \"'_,_'\", , '' - media attachment type: \"'photo' - photo, 'video' - video, 'audio' - audio, 'doc' - document\", , '' - media owner id, '' - media attachment id, , For example: \"photo100172_166443618,photo66748_265827614\",", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "market.get", - "description": "Returns items list for a community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community, \"Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community \"", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of items to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 200 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' – method will return additional fields: 'likes, can_comment, car_repost, photos'. These parameters are not returned by default.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/market_get_extended_response" - } - } - }, - { - "name": "market.getAlbumById", - "description": "Returns items album's data", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "identifier of an album owner community, \"Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community \"", - "type": "integer", - "required": true - }, - { - "name": "album_ids", - "description": "collections identifiers to obtain data from", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_getAlbumById_response" - } - } - }, - { - "name": "market.getAlbums", - "description": "Returns community's collections list.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an items owner community.", - "type": "integer", - "required": true - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of items to return.", - "type": "integer", - "default": 50, - "minimum": 0, - "maximum": 100 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_getAlbums_response" - } - } - }, - { - "name": "market.getById", - "description": "Returns information about market items by their ids.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "item_ids", - "description": "Comma-separated ids list: {user id}_{item id}. If an item belongs to a community -{community id} is used. \" 'Videos' value example: , '-4363_136089719,13245770_137352259'\"", - "type": "array", - "required": true, - "items": { - "type": "string" - }, - "maxItems": 100 - }, - { - "name": "extended", - "description": "'1' – to return additional fields: 'likes, can_comment, car_repost, photos'. By default: '0'.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_getById_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/market_getById_extended_response" - } - } - }, - { - "name": "market.getCategories", - "description": "Returns a list of market categories.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 10, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_getCategories_response" - } - } - }, - { - "name": "market.getComments", - "description": "Returns comments list for an item.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "need_likes", - "description": "'1' — to return likes info.", - "type": "boolean" - }, - { - "name": "start_comment_id", - "description": "ID of a comment to start a list from (details below).", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of results to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - }, - { - "name": "sort", - "description": "Sort order ('asc' — from old to new, 'desc' — from new to old)", - "type": "string", - "default": "asc", - "enum": [ - "asc", - "desc" - ], - "enumNames": [ - "old to new", - "new to old" - ] - }, - { - "name": "extended", - "description": "'1' — comments will be returned as numbered objects, in addition lists of 'profiles' and 'groups' objects will be returned.", - "type": "boolean" - }, - { - "name": "fields", - "description": "List of additional profile fields to return. See the [vk.com/dev/fields|details]", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_getComments_response" - } - }, - "errors": [ - { - "code": 1401, - "name": "API_ERROR_MARKET_COMMENTS_CLOSED", - "description": "Comments for this market are closed" - } - ] - }, - { - "name": "market.removeFromAlbum", - "description": "Removes an item from one or multiple collections.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "album_ids", - "description": "Collections IDs to remove item from.", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1402, - "name": "API_ERROR_MARKET_ALBUM_NOT_FOUND", - "description": "Album not found" - }, - { - "code": 1403, - "name": "API_ERROR_MARKET_ITEM_NOT_FOUND", - "description": "Item not found" - } - ] - }, - { - "name": "market.reorderAlbums", - "description": "Reorders the collections list.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "description": "Collection ID.", - "type": "integer", - "required": true - }, - { - "name": "before", - "description": "ID of a collection to place current collection before it.", - "type": "integer", - "minimum": 0 - }, - { - "name": "after", - "description": "ID of a collection to place current collection after it.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 205, - "name": "API_ERROR_ACCESS_MARKET", - "description": "Access denied" - }, - { - "code": 1402, - "name": "API_ERROR_MARKET_ALBUM_NOT_FOUND", - "description": "Album not found" - } - ] - }, - { - "name": "market.reorderItems", - "description": "Changes item place in a collection.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "description": "ID of a collection to reorder items in. Set 0 to reorder full items list.", - "type": "integer" - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "before", - "description": "ID of an item to place current item before it.", - "type": "integer", - "minimum": 0 - }, - { - "name": "after", - "description": "ID of an item to place current item after it.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 205, - "name": "API_ERROR_ACCESS_MARKET", - "description": "Access denied" - }, - { - "code": 1402, - "name": "API_ERROR_MARKET_ALBUM_NOT_FOUND", - "description": "Album not found" - }, - { - "code": 1403, - "name": "API_ERROR_MARKET_ITEM_NOT_FOUND", - "description": "Item not found" - } - ] - }, - { - "name": "market.report", - "description": "Sends a complaint to the item.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Complaint reason. Possible values: *'0' — spam,, *'1' — child porn,, *'2' — extremism,, *'3' — violence,, *'4' — drugs propaganda,, *'5' — adult materials,, *'6' — insult.", - "type": "integer", - "default": 0, - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "market.reportComment", - "description": "Sends a complaint to the item's comment.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Complaint reason. Possible values: *'0' — spam,, *'1' — child porn,, *'2' — extremism,, *'3' — violence,, *'4' — drugs propaganda,, *'5' — adult materials,, *'6' — insult.", - "type": "integer", - "required": true, - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "market.restore", - "description": "Restores recently deleted item", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an item owner community.", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Deleted item ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 205, - "name": "API_ERROR_ACCESS_MARKET", - "description": "Access denied" - }, - { - "code": 1400, - "name": "API_ERROR_MARKET_RESTORE_TOO_LATE", - "description": "Too late for restore" - } - ] - }, - { - "name": "market.restoreComment", - "description": "Restores a recently deleted comment", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "identifier of an item owner community, \"Note that community id in the 'owner_id' parameter should be negative number. For example 'owner_id'=-1 matches the [vk.com/apiclub|VK API] community \"", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "deleted comment id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_restoreComment_response" - } - } - }, - { - "name": "market.search", - "description": "Searches market items in a community's catalog", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of an items owner community.", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "q", - "description": "Search query, for example \"pink slippers\".", - "type": "string" - }, - { - "name": "price_from", - "description": "Minimum item price value.", - "type": "integer", - "minimum": 0 - }, - { - "name": "price_to", - "description": "Maximum item price value.", - "type": "integer", - "minimum": 0 - }, - { - "name": "tags", - "description": "Comma-separated tag IDs list.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "sort", - "type": "integer", - "default": 0, - "enum": [ - 0, - 1, - 2, - 3 - ] - }, - { - "name": "rev", - "description": "'0' — do not use reverse order, '1' — use reverse order", - "type": "integer", - "default": 1, - "minimum": 0, - "enum": [ - 0, - 1 - ], - "enumNames": [ - "normal", - "reverse" - ] - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of items to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "extended", - "description": "'1' – to return additional fields: 'likes, can_comment, car_repost, photos'. By default: '0'.", - "type": "boolean", - "default": "0" - }, - { - "name": "status", - "type": "integer", - "default": 0, - "minimum": 0, - "enum": [ - 0, - 2 - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/market_search_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/market_search_extended_response" - } - } - }, - { - "name": "messages.addChatUser", - "description": "Adds a new user to a chat.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "chat_id", - "description": "Chat ID.", - "type": "integer", - "required": true, - "minimum": 0, - "maximum": 100000000 - }, - { - "name": "user_id", - "description": "ID of the user to be added to the chat.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - }, - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - }, - { - "code": 939, - "name": "API_ERROR_MESSAGES_MESSAGE_REQUEST_ALREADY_SENT", - "description": "Message request already sent" - }, - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.allowMessagesFromGroup", - "description": "Allows sending messages from community to the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Group ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "key", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "messages.createChat", - "description": "Creates a chat with several participants.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_ids", - "description": "IDs of the users to be added to the chat.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "title", - "description": "Chat title.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_createChat_response" - } - }, - "errors": [ - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.delete", - "description": "Deletes one or more messages.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "message_ids", - "description": "Message IDs.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "spam", - "description": "'1' — to mark message as spam.", - "type": "boolean" - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - }, - { - "name": "delete_for_all", - "description": "'1' — delete message for for all.", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_delete_response" - } - }, - "errors": [ - { - "code": 924, - "name": "API_ERROR_MESSAGES_CANT_DELETE_FOR_ALL", - "description": "Can't delete this message for everybody" - } - ] - }, - { - "name": "messages.deleteChatPhoto", - "description": "Deletes a chat's cover picture.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "chat_id", - "description": "Chat ID.", - "type": "integer", - "required": true, - "minimum": 0, - "maximum": 100000000 - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_deleteChatPhoto_response" - } - }, - "errors": [ - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - } - ] - }, - { - "name": "messages.deleteConversation", - "description": "Deletes all private messages in a conversation.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID. To clear a chat history use 'chat_id'", - "type": "integer" - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer" - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_deleteConversation_response" - } - }, - "errors": [ - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.denyMessagesFromGroup", - "description": "Denies sending message from community to the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Group ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "messages.edit", - "description": "Edits the message.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer", - "required": true - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the message.", - "type": "string" - }, - { - "name": "message_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "lat", - "description": "Geographical latitude of a check-in, in degrees (from -90 to 90).", - "type": "number" - }, - { - "name": "long", - "description": "Geographical longitude of a check-in, in degrees (from -180 to 180).", - "type": "number" - }, - { - "name": "attachment", - "description": "(Required if 'message' is not set.) List of objects attached to the message, separated by commas, in the following format: \"_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'wall' — wall post, '' — ID of the media attachment owner. '' — media attachment ID. Example: \"photo100172_166443618\"", - "type": "string" - }, - { - "name": "keep_forward_messages", - "description": "'1' — to keep forwarded, messages.", - "type": "boolean" - }, - { - "name": "keep_snippets", - "description": "'1' — to keep attached snippets.", - "type": "boolean" - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - }, - { - "name": "dont_parse_links", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_edit_response" - } - }, - "errors": [ - { - "code": 901, - "name": "API_ERROR_MESSAGES_DENY_SEND", - "description": "Can't send messages for users without permission" - }, - { - "code": 909, - "name": "API_ERROR_MESSAGES_EDIT_EXPIRED", - "description": "Can't edit this message, because it's too old" - }, - { - "code": 910, - "name": "API_ERROR_MESSAGES_TOO_BIG", - "description": "Can't sent this message, because it's too big" - }, - { - "code": 920, - "name": "API_ERROR_MESSAGES_EDIT_KIND_DISALLOWED", - "description": "Can't edit this kind of message" - }, - { - "code": 914, - "name": "API_ERROR_MESSAGES_TOO_LONG_MESSAGE", - "description": "Message is too long" - }, - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - }, - { - "code": 911, - "name": "API_ERROR_MESSAGES_KEYBOARD_INVALID", - "description": "Keyboard format is invalid" - }, - { - "code": 940, - "name": "API_ERROR_MESSAGES_TOO_MANY_POSTS", - "description": "Too many posts in messages" - } - ] - }, - { - "name": "messages.editChat", - "description": "Edits the title of a chat.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "chat_id", - "description": "Chat ID.", - "type": "integer", - "required": true, - "minimum": 0, - "maximum": 100000000 - }, - { - "name": "title", - "description": "New title of the chat.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - } - ] - }, - { - "name": "messages.getByConversationMessageId", - "description": "Returns messages by their IDs within the conversation.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer", - "required": true - }, - { - "name": "conversation_message_ids", - "description": "Conversation message IDs.", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 100 - }, - { - "name": "extended", - "description": "Information whether the response should be extended", - "type": "boolean" - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getByConversationMessageId_response" - } - } - }, - { - "name": "messages.getById", - "description": "Returns messages by their IDs.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "message_ids", - "description": "Message IDs.", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - }, - "maxItems": 100 - }, - { - "name": "preview_length", - "description": "Number of characters after which to truncate a previewed message. To preview the full message, specify '0'. \"NOTE: Messages are not truncated by default. Messages are truncated by words.\"", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "extended", - "description": "Information whether the response should be extended", - "type": "boolean" - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getById_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/messages_getById_extended_response" - } - } - }, - { - "name": "messages.getChatPreview", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "peer_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "link", - "description": "Invitation link.", - "type": "string" - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getChatPreview_response" - } - }, - "errors": [ - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - } - ] - }, - { - "name": "messages.getConversationMembers", - "description": "Returns a list of IDs of users participating in a chat.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Peer ID.", - "type": "integer", - "required": true - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getConversationMembers_response" - } - }, - "errors": [ - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - } - ] - }, - { - "name": "messages.getConversations", - "description": "Returns a list of the current user's conversations.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "offset", - "description": "Offset needed to return a specific subset of conversations.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of conversations to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "filter", - "description": "Filter to apply: 'all' — all conversations, 'unread' — conversations with unread messages, 'important' — conversations, marked as important (only for community messages), 'unanswered' — conversations, marked as unanswered (only for community messages)", - "type": "string", - "default": "all", - "enum": [ - "all", - "business_notify", - "important", - "message_request", - "unanswered", - "unread" - ] - }, - { - "name": "extended", - "description": "'1' — return extra information about users and communities", - "type": "boolean" - }, - { - "name": "start_message_id", - "description": "ID of the message from what to return dialogs.", - "type": "integer", - "minimum": 0 - }, - { - "name": "fields", - "description": "Profile and communities fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getConversations_response" - } - }, - "errors": [ - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - }, - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - } - ] - }, - { - "name": "messages.getConversationsById", - "description": "Returns conversations by their IDs", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_ids", - "description": "Destination IDs. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "array", - "required": true, - "items": { - "type": "integer" - }, - "maxItems": 100 - }, - { - "name": "extended", - "description": "Return extended properties", - "type": "boolean" - }, - { - "name": "fields", - "description": "Profile and communities fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getConversationsById_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/messages_getConversationsById_extended_response" - } - }, - "errors": [ - { - "code": 927, - "name": "API_ERROR_MESSAGES_CHAT_NOT_EXIST", - "description": "Chat does not exist" - }, - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - }, - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.getHistory", - "description": "Returns message history for the specified user or group chat.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "offset", - "description": "Offset needed to return a specific subset of messages.", - "type": "integer" - }, - { - "name": "count", - "description": "Number of messages to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "user_id", - "description": "ID of the user whose message history you want to return.", - "type": "integer" - }, - { - "name": "peer_id", - "type": "integer" - }, - { - "name": "start_message_id", - "description": "Starting message ID from which to return history.", - "type": "integer", - "minimum": 0 - }, - { - "name": "rev", - "description": "Sort order: '1' — return messages in chronological order. '0' — return messages in reverse chronological order.", - "type": "integer", - "enum": [ - 1, - 0 - ], - "enumNames": [ - "chronological", - "reverse chronological" - ] - }, - { - "name": "extended", - "description": "Information whether the response should be extended", - "type": "boolean" - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getHistory_response" - } - }, - "errors": [ - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.getHistoryAttachments", - "description": "Returns media files from the dialog or group chat.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Peer ID. \", For group chat: '2000000000 + chat ID' , , For community: '-community ID'\"", - "type": "integer", - "required": true - }, - { - "name": "media_type", - "description": "Type of media files to return: *'photo',, *'video',, *'audio',, *'doc',, *'link'.,*'market'.,*'wall'.,*'share'", - "type": "string", - "default": "photo", - "enum": [ - "audio", - "audio_message", - "doc", - "graffiti", - "link", - "market", - "photo", - "share", - "video", - "wall" - ] - }, - { - "name": "start_from", - "description": "Message ID to start return results from.", - "type": "string" - }, - { - "name": "count", - "description": "Number of objects to return.", - "type": "integer", - "default": 30, - "minimum": 0, - "maximum": 200 - }, - { - "name": "photo_sizes", - "description": "'1' — to return photo sizes in a", - "type": "boolean" - }, - { - "name": "fields", - "description": "Additional profile [vk.com/dev/fields|fields] to return. ", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - }, - { - "name": "preserve_order", - "type": "boolean" - }, - { - "name": "max_forwards_level", - "type": "integer", - "default": 45, - "minimum": 0, - "maximum": 45 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getHistoryAttachments_response" - } - } - }, - { - "name": "messages.getInviteLink", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Destination ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reset", - "description": "1 — to generate new link (revoke previous), 0 — to return previous link.", - "type": "boolean", - "default": false - }, - { - "name": "group_id", - "description": "Group ID", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getInviteLink_response" - } - }, - "errors": [ - { - "code": 919, - "name": "API_ERROR_MESSAGES_CANT_SEE_INVITE_LINK", - "description": "You can't see invite link for this chat" - }, - { - "code": 931, - "name": "API_ERROR_MESSAGES_CANT_CHANGE_INVITE_LINK", - "description": "You can't change invite link for this chat" - } - ] - }, - { - "name": "messages.getLastActivity", - "description": "Returns a user's current status and date of last activity.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getLastActivity_response" - } - } - }, - { - "name": "messages.getLongPollHistory", - "description": "Returns updates in user's private messages.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "ts", - "description": "Last value of the 'ts' parameter returned from the Long Poll server or by using [vk.com/dev/messages.getLongPollHistory|messages.getLongPollHistory] method.", - "type": "integer", - "minimum": 0 - }, - { - "name": "pts", - "description": "Lsat value of 'pts' parameter returned from the Long Poll server or by using [vk.com/dev/messages.getLongPollHistory|messages.getLongPollHistory] method.", - "type": "integer", - "minimum": 0 - }, - { - "name": "preview_length", - "description": "Number of characters after which to truncate a previewed message. To preview the full message, specify '0'. \"NOTE: Messages are not truncated by default. Messages are truncated by words.\"", - "type": "integer", - "minimum": 0 - }, - { - "name": "onlines", - "description": "'1' — to return history with online users only.", - "type": "boolean" - }, - { - "name": "fields", - "description": "Additional profile [vk.com/dev/fields|fields] to return.", - "type": "array", - "default": "photo,photo_medium_rec,sex,online,screen_name", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "events_limit", - "description": "Maximum number of events to return.", - "type": "integer", - "default": 1000, - "minimum": 1000 - }, - { - "name": "msgs_limit", - "description": "Maximum number of messages to return.", - "type": "integer", - "default": 200, - "minimum": 200 - }, - { - "name": "max_msg_id", - "description": "Maximum ID of the message among existing ones in the local copy. Both messages received with API methods (for example, , ), and data received from a Long Poll server (events with code 4) are taken into account.", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - }, - { - "name": "lp_version", - "type": "integer", - "minimum": 0 - }, - { - "name": "last_n", - "type": "integer", - "default": 0, - "minimum": 0, - "maximum": 2000 - }, - { - "name": "credentials", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getLongPollHistory_response" - } - }, - "errors": [ - { - "code": 907, - "name": "API_ERROR_MESSAGES_TOO_OLD_PTS", - "description": "Value of ts or pts is too old" - }, - { - "code": 908, - "name": "API_ERROR_MESSAGES_TOO_NEW_PTS", - "description": "Value of ts or pts is too new" - } - ] - }, - { - "name": "messages.getLongPollServer", - "description": "Returns data required for connection to a Long Poll server.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "need_pts", - "description": "'1' — to return the 'pts' field, needed for the [vk.com/dev/messages.getLongPollHistory|messages.getLongPollHistory] method.", - "type": "boolean" - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - }, - { - "name": "lp_version", - "description": "Long poll version", - "type": "integer", - "default": 0, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_getLongPollServer_response" - } - } - }, - { - "name": "messages.isMessagesFromGroupAllowed", - "description": "Returns information whether sending messages from the community to current user is allowed.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "Group ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_isMessagesFromGroupAllowed_response" - } - } - }, - { - "name": "messages.joinChatByInviteLink", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "link", - "description": "Invitation link.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_joinChatByInviteLink_response" - } - }, - "errors": [ - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - }, - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "messages.markAsAnsweredConversation", - "description": "Marks and unmarks conversations as unanswered.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "ID of conversation to mark as important.", - "type": "integer", - "required": true - }, - { - "name": "answered", - "description": "'1' — to mark as answered, '0' — to remove the mark", - "type": "boolean", - "default": 1 - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "messages.markAsImportant", - "description": "Marks and unmarks messages as important (starred).", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "message_ids", - "description": "IDs of messages to mark as important.", - "type": "array", - "default": [], - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "important", - "description": "'1' — to add a star (mark as important), '0' — to remove the star", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_markAsImportant_response" - } - } - }, - { - "name": "messages.markAsImportantConversation", - "description": "Marks and unmarks conversations as important.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "ID of conversation to mark as important.", - "type": "integer", - "required": true - }, - { - "name": "important", - "description": "'1' — to add a star (mark as important), '0' — to remove the star", - "type": "boolean", - "default": 1 - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "messages.markAsRead", - "description": "Marks messages as read.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "message_ids", - "description": "IDs of messages to mark as read.", - "type": "array", - "default": [], - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer" - }, - { - "name": "start_message_id", - "description": "Message ID to start from.", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "messages.pin", - "description": "Pin a message.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'Chat ID', e.g. '2000000001'. For community: '- Community ID', e.g. '-12345'. \"", - "type": "integer", - "required": true - }, - { - "name": "message_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_pin_response" - } - }, - "errors": [ - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - }, - { - "code": 942, - "name": "API_ERROR_MESSAGES_CANT_PIN_ONE_TIME_STORY", - "description": "Cannot pin one-time story" - } - ] - }, - { - "name": "messages.removeChatUser", - "description": "Allows the current user to leave a chat or, if the current user started the chat, allows the user to remove another user from the chat.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "chat_id", - "description": "Chat ID.", - "type": "integer", - "required": true, - "minimum": 0, - "maximum": 100000000 - }, - { - "name": "user_id", - "description": "ID of the user to be removed from the chat.", - "type": "integer" - }, - { - "name": "member_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - }, - { - "code": 935, - "name": "API_ERROR_MESSAGES_CHAT_USER_NOT_IN_CHAT", - "description": "User not found in chat" - }, - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.restore", - "description": "Restores a deleted message.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "message_id", - "description": "ID of a previously-deleted message to restore.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "messages.search", - "description": "Returns a list of the current user's private messages that match search criteria.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string.", - "type": "string" - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer" - }, - { - "name": "date", - "description": "Date to search message before in Unixtime.", - "type": "integer", - "minimum": 0 - }, - { - "name": "preview_length", - "description": "Number of characters after which to truncate a previewed message. To preview the full message, specify '0'. \"NOTE: Messages are not truncated by default. Messages are truncated by words.\"", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of messages.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of messages to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - }, - { - "name": "extended", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_search_response" - } - } - }, - { - "name": "messages.searchConversations", - "description": "Returns a list of the current user's conversations that match search criteria.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string.", - "type": "string" - }, - { - "name": "count", - "description": "Maximum number of results.", - "type": "integer", - "default": 20, - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' — return extra information about users and communities", - "type": "boolean" - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "group_id", - "description": "Group ID (for group messages with user access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_searchConversations_response" - } - } - }, - { - "name": "messages.send", - "description": "Sends a message.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID (by default — current user).", - "type": "integer" - }, - { - "name": "random_id", - "description": "Unique identifier to avoid resending the message.", - "type": "integer" - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer" - }, - { - "name": "domain", - "description": "User's short address (for example, 'illarionov').", - "type": "string" - }, - { - "name": "chat_id", - "description": "ID of conversation the message will relate to.", - "type": "integer", - "minimum": 0, - "maximum": 100000000 - }, - { - "name": "user_ids", - "description": "IDs of message recipients (if new conversation shall be started).", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the message.", - "type": "string" - }, - { - "name": "lat", - "description": "Geographical latitude of a check-in, in degrees (from -90 to 90).", - "type": "number" - }, - { - "name": "long", - "description": "Geographical longitude of a check-in, in degrees (from -180 to 180).", - "type": "number" - }, - { - "name": "attachment", - "description": "(Required if 'message' is not set.) List of objects attached to the message, separated by commas, in the following format: \"_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'wall' — wall post, '' — ID of the media attachment owner. '' — media attachment ID. Example: \"photo100172_166443618\"", - "type": "string" - }, - { - "name": "reply_to", - "type": "integer" - }, - { - "name": "forward_messages", - "description": "ID of forwarded messages, separated with a comma. Listed messages of the sender will be shown in the message body at the recipient's. Example: \"123,431,544\"", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "forward", - "type": "string" - }, - { - "name": "sticker_id", - "description": "Sticker id.", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - }, - { - "name": "keyboard", - "type": "string", - "$ref": "objects.json#/definitions/messages_keyboard" - }, - { - "name": "payload", - "type": "string", - "maxLength": 1000 - }, - { - "name": "dont_parse_links", - "type": "boolean", - "default": false - }, - { - "name": "disable_mentions", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_send_response" - }, - "userIdsResponse": { - "$ref": "responses.json#/definitions/messages_send_user_ids_response" - } - }, - "errors": [ - { - "code": 900, - "name": "API_ERROR_MESSAGES_USER_BLOCKED", - "description": "Can't send messages for users from blacklist" - }, - { - "code": 901, - "name": "API_ERROR_MESSAGES_DENY_SEND", - "description": "Can't send messages for users without permission" - }, - { - "code": 902, - "name": "API_ERROR_MESSAGES_PRIVACY", - "description": "Can't send messages to this user due to their privacy settings" - }, - { - "code": 914, - "name": "API_ERROR_MESSAGES_TOO_LONG_MESSAGE", - "description": "Message is too long" - }, - { - "code": 913, - "name": "API_ERROR_MESSAGES_TOO_LONG_FORWARDS", - "description": "Too many forwarded messages" - }, - { - "code": 921, - "name": "API_ERROR_MESSAGES_CANT_FWD", - "description": "Can't forward these messages" - }, - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - }, - { - "code": 911, - "name": "API_ERROR_MESSAGES_KEYBOARD_INVALID", - "description": "Keyboard format is invalid" - }, - { - "code": 912, - "name": "API_ERROR_MESSAGES_CHAT_BOT_FEATURE", - "description": "This is a chat bot feature, change this status in settings" - }, - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - }, - { - "code": 940, - "name": "API_ERROR_MESSAGES_TOO_MANY_POSTS", - "description": "Too many posts in messages" - } - ] - }, - { - "name": "messages.setActivity", - "description": "Changes the status of a user as typing in a conversation.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer" - }, - { - "name": "type", - "description": "'typing' — user has started to type.", - "type": "string" - }, - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'chat_id', e.g. '2000000001'. For community: '- community ID', e.g. '-12345'. \"", - "type": "integer" - }, - { - "name": "group_id", - "description": "Group ID (for group messages with group access token)", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 932, - "name": "API_ERROR_MESSAGES_GROUP_PEER_ACCESS", - "description": "Your community can't interact with this peer" - }, - { - "code": 917, - "name": "API_ERROR_MESSAGES_CHAT_USER_NO_ACCESS", - "description": "You don't have access to this chat" - }, - { - "code": 936, - "name": "API_ERROR_MESSAGES_CONTACT_NOT_FOUND", - "description": "Contact not found" - } - ] - }, - { - "name": "messages.setChatPhoto", - "description": "Sets a previously-uploaded picture as the cover picture of a chat.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "file", - "description": "Upload URL from the 'response' field returned by the [vk.com/dev/photos.getChatUploadServer|photos.getChatUploadServer] method upon successfully uploading an image.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/messages_setChatPhoto_response" - } - }, - "errors": [ - { - "code": 22, - "name": "API_ERROR_UPLOAD", - "description": "Upload error" - }, - { - "code": 1160, - "name": "API_ERROR_PHOTO_CHANGED", - "description": "Original photo was changed" - }, - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - } - ] - }, - { - "name": "messages.unpin", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "type": "integer", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 925, - "name": "API_ERROR_MESSAGES_CHAT_NOT_ADMIN", - "description": "You are not admin of this chat" - } - ] - }, - { - "name": "newsfeed.addBan", - "description": "Prevents news from specified users and communities from appearing in the current user's newsfeed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_ids", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "group_ids", - "type": "array", - "items": { - "type": "integer" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "newsfeed.deleteBan", - "description": "Allows news from previously banned users and communities to be shown in the current user's newsfeed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_ids", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "group_ids", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "newsfeed.deleteList", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "list_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "newsfeed.get", - "description": "Returns data required to show newsfeed for the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "filters", - "description": "Filters to apply: 'post' — new wall posts, 'photo' — new photos, 'photo_tag' — new photo tags, 'wall_photo' — new wall photos, 'friend' — new friends, 'note' — new notes", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_filters" - } - }, - { - "name": "return_banned", - "description": "'1' — to return news items from banned sources", - "type": "boolean" - }, - { - "name": "start_time", - "description": "Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.", - "type": "integer", - "minimum": 0 - }, - { - "name": "end_time", - "description": "Latest timestamp (in Unix time) of a news item to return. By default, the current time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "max_photos", - "description": "Maximum number of photos to return. By default, '5'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "source_ids", - "description": "Sources to obtain news from, separated by commas. User IDs can be specified in formats '' or 'u' , where '' is the user's friend ID. Community IDs can be specified in formats '-' or 'g' , where '' is the community ID. If the parameter is not set, all of the user's friends and communities are returned, except for banned sources, which can be obtained with the [vk.com/dev/newsfeed.getBanned|newsfeed.getBanned] method.", - "type": "string" - }, - { - "name": "start_from", - "description": "identifier required to get the next page of results. Value for this parameter is returned in 'next_from' field in a reply.", - "type": "string" - }, - { - "name": "count", - "description": "Number of news items to return (default 50, maximum 100). For auto feed, you can use the 'new_offset' parameter returned by this method.", - "type": "integer", - "minimum": 0 - }, - { - "name": "fields", - "description": "Additional fields of [vk.com/dev/fields|profiles] and [vk.com/dev/fields_groups|communities] to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - }, - { - "name": "section", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_get_response" - } - } - }, - { - "name": "newsfeed.getBanned", - "description": "Returns a list of users and communities banned from the current user's newsfeed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "extended", - "description": "'1' — return extra information about users and communities", - "type": "boolean" - }, - { - "name": "fields", - "description": "Profile fields to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: 'nom' — nominative (default), 'gen' — genitive , 'dat' — dative, 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_getBanned_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/newsfeed_getBanned_extended_response" - } - } - }, - { - "name": "newsfeed.getComments", - "description": "Returns a list of comments in the current user's newsfeed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "count", - "description": "Number of comments to return. For auto feed, you can use the 'new_offset' parameter returned by this method.", - "type": "integer", - "default": 30, - "minimum": 0, - "maximum": 100 - }, - { - "name": "filters", - "description": "Filters to apply: 'post' — new comments on wall posts, 'photo' — new comments on photos, 'video' — new comments on videos, 'topic' — new comments on discussions, 'note' — new comments on notes,", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_comments_filters" - } - }, - { - "name": "reposts", - "description": "Object ID, comments on repost of which shall be returned, e.g. 'wall1_45486'. (If the parameter is set, the 'filters' parameter is optional.),", - "type": "string" - }, - { - "name": "start_time", - "description": "Earliest timestamp (in Unix time) of a comment to return. By default, 24 hours ago.", - "type": "integer", - "minimum": 0 - }, - { - "name": "end_time", - "description": "Latest timestamp (in Unix time) of a comment to return. By default, the current time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "last_comments_count", - "type": "integer", - "default": 0, - "minimum": 0, - "maximum": 10 - }, - { - "name": "start_from", - "description": "Identificator needed to return the next page with results. Value for this parameter returns in 'next_from' field.", - "type": "string" - }, - { - "name": "fields", - "description": "Additional fields of [vk.com/dev/fields|profiles] and [vk.com/dev/fields_groups|communities] to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_getComments_response" - } - } - }, - { - "name": "newsfeed.getLists", - "description": "Returns a list of newsfeeds followed by the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "list_ids", - "description": "numeric list identifiers.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "extended", - "description": "Return additional list info", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_getLists_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/newsfeed_getLists_extended_response" - } - } - }, - { - "name": "newsfeed.getMentions", - "description": "Returns a list of posts on user walls in which the current user is mentioned.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Owner ID.", - "type": "integer" - }, - { - "name": "start_time", - "description": "Earliest timestamp (in Unix time) of a post to return. By default, 24 hours ago.", - "type": "integer", - "minimum": 0 - }, - { - "name": "end_time", - "description": "Latest timestamp (in Unix time) of a post to return. By default, the current time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of posts.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of posts to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 50 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_getMentions_response" - } - } - }, - { - "name": "newsfeed.getRecommended", - "description": ", Returns a list of newsfeeds recommended to the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "start_time", - "description": "Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.", - "type": "integer", - "minimum": 0 - }, - { - "name": "end_time", - "description": "Latest timestamp (in Unix time) of a news item to return. By default, the current time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "max_photos", - "description": "Maximum number of photos to return. By default, '5'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "start_from", - "description": "'new_from' value obtained in previous call.", - "type": "string" - }, - { - "name": "count", - "description": "Number of news items to return.", - "type": "integer", - "minimum": 0 - }, - { - "name": "fields", - "description": "Additional fields of [vk.com/dev/fields|profiles] and [vk.com/dev/fields_groups|communities] to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_getRecommended_response" - } - } - }, - { - "name": "newsfeed.getSuggestedSources", - "description": "Returns communities and users that current user is suggested to follow.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "description": "offset required to choose a particular subset of communities or users.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "amount of communities or users to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "shuffle", - "description": "shuffle the returned list or not.", - "type": "boolean" - }, - { - "name": "fields", - "description": "list of extra fields to be returned. See available fields for [vk.com/dev/fields|users] and [vk.com/dev/fields_groups|communities].", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_getSuggestedSources_response" - } - } - }, - { - "name": "newsfeed.ignoreItem", - "description": "Hides an item from the newsfeed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "description": "Item type. Possible values: *'wall' – post on the wall,, *'tag' – tag on a photo,, *'profilephoto' – profile photo,, *'video' – video,, *'audio' – audio.", - "type": "string", - "required": true, - "$ref": "objects.json#/definitions/newsfeed_ignore_item_type" - }, - { - "name": "owner_id", - "description": "Item owner's identifier (user or community), \"Note that community id must be negative. 'owner_id=1' – user , 'owner_id=-1' – community \"", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item identifier", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "newsfeed.saveList", - "description": "Creates and edits user newsfeed lists", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "list_id", - "description": "numeric list identifier (if not sent, will be set automatically).", - "type": "integer", - "minimum": 0 - }, - { - "name": "title", - "description": "list name.", - "type": "string", - "required": true - }, - { - "name": "source_ids", - "description": "users and communities identifiers to be added to the list. Community identifiers must be negative numbers.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "no_reposts", - "description": "reposts display on and off ('1' is for off).", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_saveList_response" - } - }, - "errors": [ - { - "code": 1170, - "name": "API_ERROR_TOO_MANY_LISTS", - "description": "Too many feed lists" - } - ] - }, - { - "name": "newsfeed.search", - "description": "Returns search results by statuses.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string (e.g., 'New Year').", - "type": "string" - }, - { - "name": "extended", - "description": "'1' — to return additional information about the user or community that placed the post.", - "type": "boolean" - }, - { - "name": "count", - "description": "Number of posts to return.", - "type": "integer", - "default": 30, - "minimum": 0, - "maximum": 200 - }, - { - "name": "latitude", - "description": "Geographical latitude point (in degrees, -90 to 90) within which to search.", - "type": "number" - }, - { - "name": "longitude", - "description": "Geographical longitude point (in degrees, -180 to 180) within which to search.", - "type": "number" - }, - { - "name": "start_time", - "description": "Earliest timestamp (in Unix time) of a news item to return. By default, 24 hours ago.", - "type": "integer", - "minimum": 0 - }, - { - "name": "end_time", - "description": "Latest timestamp (in Unix time) of a news item to return. By default, the current time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "start_from", - "type": "string" - }, - { - "name": "fields", - "description": "Additional fields of [vk.com/dev/fields|profiles] and [vk.com/dev/fields_groups|communities] to return.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/newsfeed_search_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/newsfeed_search_extended_response" - } - } - }, - { - "name": "newsfeed.unignoreItem", - "description": "Returns a hidden item to the newsfeed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "description": "Item type. Possible values: *'wall' – post on the wall,, *'tag' – tag on a photo,, *'profilephoto' – profile photo,, *'video' – video,, *'audio' – audio.", - "type": "string", - "required": true, - "$ref": "objects.json#/definitions/newsfeed_ignore_item_type" - }, - { - "name": "owner_id", - "description": "Item owner's identifier (user or community), \"Note that community id must be negative. 'owner_id=1' – user , 'owner_id=-1' – community \"", - "type": "integer", - "required": true - }, - { - "name": "item_id", - "description": "Item identifier", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "newsfeed.unsubscribe", - "description": "Unsubscribes the current user from specified newsfeeds.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "type", - "description": "Type of object from which to unsubscribe: 'note' — note, 'photo' — photo, 'post' — post on user wall or community wall, 'topic' — topic, 'video' — video", - "type": "string", - "required": true, - "enum": [ - "note", - "photo", - "post", - "topic", - "video" - ] - }, - { - "name": "owner_id", - "description": "Object owner ID.", - "type": "integer" - }, - { - "name": "item_id", - "description": "Object ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "notes.add", - "description": "Creates a new note for the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "title", - "description": "Note title.", - "type": "string", - "required": true - }, - { - "name": "text", - "description": "Note text.", - "type": "string", - "required": true - }, - { - "name": "privacy_view", - "type": "array", - "default": "all", - "items": { - "type": "string" - } - }, - { - "name": "privacy_comment", - "type": "array", - "default": "all", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notes_add_response" - } - } - }, - { - "name": "notes.createComment", - "description": "Adds a new comment on a note.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "note_id", - "description": "Note ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "reply_to", - "description": "ID of the user to whom the reply is addressed (if the comment is a reply to another comment).", - "type": "integer", - "minimum": 0 - }, - { - "name": "message", - "description": "Comment text.", - "type": "string", - "required": true - }, - { - "name": "guid", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notes_createComment_response" - } - }, - "errors": [ - { - "code": 181, - "name": "API_ERROR_ACCESS_NOTE", - "description": "Access to note denied" - }, - { - "code": 182, - "name": "API_ERROR_ACCESS_NOTE_COMMENT", - "description": "You can't comment this note" - } - ] - }, - { - "name": "notes.delete", - "description": "Deletes a note of the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "note_id", - "description": "Note ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 180, - "name": "API_ERROR_PARAM_NOTE_ID", - "description": "Note not found" - } - ] - }, - { - "name": "notes.deleteComment", - "description": "Deletes a comment on a note.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 181, - "name": "API_ERROR_ACCESS_NOTE", - "description": "Access to note denied" - }, - { - "code": 183, - "name": "API_ERROR_ACCESS_COMMENT", - "description": "Access to comment denied" - } - ] - }, - { - "name": "notes.edit", - "description": "Edits a note of the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "note_id", - "description": "Note ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "Note title.", - "type": "string", - "required": true - }, - { - "name": "text", - "description": "Note text.", - "type": "string", - "required": true - }, - { - "name": "privacy_view", - "type": "array", - "default": "all", - "items": { - "type": "string" - } - }, - { - "name": "privacy_comment", - "type": "array", - "default": "all", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 180, - "name": "API_ERROR_PARAM_NOTE_ID", - "description": "Note not found" - } - ] - }, - { - "name": "notes.editComment", - "description": "Edits a comment on a note.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "message", - "description": "New comment text.", - "type": "string", - "required": true, - "minLength": 2 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 183, - "name": "API_ERROR_ACCESS_COMMENT", - "description": "Access to comment denied" - } - ] - }, - { - "name": "notes.get", - "description": "Returns a list of notes created by a user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "note_ids", - "description": "Note IDs.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "user_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of notes to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - }, - { - "name": "sort", - "type": "integer", - "default": 0, - "minimum": 0, - "enum": [ - 0, - 1 - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notes_get_response" - } - }, - "errors": [ - { - "code": 180, - "name": "API_ERROR_PARAM_NOTE_ID", - "description": "Note not found" - } - ] - }, - { - "name": "notes.getById", - "description": "Returns a note by its ID.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "note_id", - "description": "Note ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "need_wiki", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notes_getById_response" - } - }, - "errors": [ - { - "code": 181, - "name": "API_ERROR_ACCESS_NOTE", - "description": "Access to note denied" - }, - { - "code": 180, - "name": "API_ERROR_PARAM_NOTE_ID", - "description": "Note not found" - } - ] - }, - { - "name": "notes.getComments", - "description": "Returns a list of comments on a note.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "note_id", - "description": "Note ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "sort", - "type": "integer", - "default": 0, - "minimum": 0, - "enum": [ - 0, - 1 - ] - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "Number of comments to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notes_getComments_response" - } - }, - "errors": [ - { - "code": 181, - "name": "API_ERROR_ACCESS_NOTE", - "description": "Access to note denied" - } - ] - }, - { - "name": "notes.restoreComment", - "description": "Restores a deleted comment on a note.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "Note owner ID.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 183, - "name": "API_ERROR_ACCESS_COMMENT", - "description": "Access to comment denied" - } - ] - }, - { - "name": "notifications.get", - "description": "Returns a list of notifications about other users' feedback to the current user's wall posts.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "count", - "description": "Number of notifications to return.", - "type": "integer", - "default": 30, - "minimum": 1, - "maximum": 100 - }, - { - "name": "start_from", - "type": "string" - }, - { - "name": "filters", - "description": "Type of notifications to return: 'wall' — wall posts, 'mentions' — mentions in wall posts, comments, or topics, 'comments' — comments to wall posts, photos, and videos, 'likes' — likes, 'reposted' — wall posts that are copied from the current user's wall, 'followers' — new followers, 'friends' — accepted friend requests", - "type": "array", - "items": { - "type": "string", - "enum": [ - "wall", - "mentions", - "comments", - "likes", - "reposted", - "followers", - "friends" - ] - } - }, - { - "name": "start_time", - "description": "Earliest timestamp (in Unix time) of a notification to return. By default, 24 hours ago.", - "type": "integer" - }, - { - "name": "end_time", - "description": "Latest timestamp (in Unix time) of a notification to return. By default, the current time.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notifications_get_response" - } - } - }, - { - "name": "notifications.markAsViewed", - "description": "Resets the counter of new notifications about other users' feedback to the current user's wall posts.", - "access_token_type": [ - "user" - ], - "parameters": [], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notifications_markAsViewed_response" - } - } - }, - { - "name": "notifications.sendMessage", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_ids", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - }, - "minItems": 1, - "maxItems": 100 - }, - { - "name": "message", - "type": "string", - "required": true - }, - { - "name": "fragment", - "type": "string", - "maxLength": 2047 - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/notifications_sendMessage_response" - } - }, - "errors": [ - { - "code": 711, - "name": "API_ERROR_GROUP_APP_IS_NOT_INSTALLED_IN_COMMUNITY", - "description": "Application is not installed in community" - } - ] - }, - { - "name": "orders.cancelSubscription", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "subscription_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "pending_cancel", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_cancelSubscription_response" - } - }, - "errors": [ - { - "code": 1256, - "name": "API_ERROR_APPS_SUBSCRIPTION_NOT_FOUND", - "description": "Subscription not found" - }, - { - "code": 1257, - "name": "API_ERROR_APPS_SUBSCRIPTION_INVALID_STATUS", - "description": "Subscription is in invalid status" - } - ], - "emptyResponse": true - }, - { - "name": "orders.changeState", - "description": "Changes order status.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "order_id", - "description": "order ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "action", - "description": "action to be done with the order. Available actions: *cancel — to cancel unconfirmed order. *charge — to confirm unconfirmed order. Applies only if processing of [vk.com/dev/payments_status|order_change_state] notification failed. *refund — to cancel confirmed order.", - "type": "string", - "required": true, - "enum": [ - "cancel", - "charge", - "refund" - ] - }, - { - "name": "app_order_id", - "description": "internal ID of the order in the application.", - "type": "integer", - "minimum": 0 - }, - { - "name": "test_mode", - "description": "if this parameter is set to 1, this method returns a list of test mode orders. By default — 0.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_changeState_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - }, - { - "code": 106, - "name": "API_ERROR_ACTION_FAILED", - "description": "Unable to process action" - } - ] - }, - { - "name": "orders.get", - "description": "Returns a list of orders.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "number of returned orders.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "test_mode", - "description": "if this parameter is set to 1, this method returns a list of test mode orders. By default — 0.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_get_response" - } - } - }, - { - "name": "orders.getAmount", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "votes", - "type": "array", - "required": true, - "items": { - "type": "string" - }, - "maxItems": 100 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_getAmount_response" - } - } - }, - { - "name": "orders.getById", - "description": "Returns information about orders by their IDs.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "order_id", - "description": "order ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "order_ids", - "description": "order IDs (when information about several orders is requested).", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "test_mode", - "description": "if this parameter is set to 1, this method returns a list of test mode orders. By default — 0.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_getById_response" - } - } - }, - { - "name": "orders.getUserSubscriptionById", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "subscription_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_getUserSubscriptionById_response" - } - }, - "errors": [ - { - "code": 1256, - "name": "API_ERROR_APPS_SUBSCRIPTION_NOT_FOUND", - "description": "Subscription not found" - } - ], - "emptyResponse": true - }, - { - "name": "orders.getUserSubscriptions", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_getUserSubscriptions_response" - } - }, - "emptyResponse": true - }, - { - "name": "orders.updateSubscription", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "subscription_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "price", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/orders_updateSubscription_response" - } - }, - "errors": [ - { - "code": 1256, - "name": "API_ERROR_APPS_SUBSCRIPTION_NOT_FOUND", - "description": "Subscription not found" - }, - { - "code": 1257, - "name": "API_ERROR_APPS_SUBSCRIPTION_INVALID_STATUS", - "description": "Subscription is in invalid status" - } - ], - "emptyResponse": true - }, - { - "name": "pages.clearCache", - "description": "Allows to clear the cache of particular 'external' pages which may be attached to VK posts.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "url", - "description": "Address of the page where you need to refesh the cached version", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "pages.get", - "description": "Returns information about a wiki page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Page owner ID.", - "type": "integer" - }, - { - "name": "page_id", - "description": "Wiki page ID.", - "type": "integer" - }, - { - "name": "global", - "description": "'1' — to return information about a global wiki page", - "type": "boolean" - }, - { - "name": "site_preview", - "description": "'1' — resulting wiki page is a preview for the attached link", - "type": "boolean" - }, - { - "name": "title", - "description": "Wiki page title.", - "type": "string" - }, - { - "name": "need_source", - "type": "boolean" - }, - { - "name": "need_html", - "description": "'1' — to return the page as HTML,", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_get_response" - } - } - }, - { - "name": "pages.getHistory", - "description": "Returns a list of all previous versions of a wiki page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "page_id", - "description": "Wiki page ID.", - "type": "integer", - "required": true - }, - { - "name": "group_id", - "description": "ID of the community that owns the wiki page.", - "type": "integer" - }, - { - "name": "user_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_getHistory_response" - } - }, - "errors": [ - { - "code": 141, - "name": "API_ERROR_ACCESS_PAGE", - "description": "Access to page denied" - }, - { - "code": 140, - "name": "API_ERROR_PARAM_PAGE_ID", - "description": "Page not found" - } - ] - }, - { - "name": "pages.getTitles", - "description": "Returns a list of wiki pages in a group.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of the community that owns the wiki page.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_getTitles_response" - } - }, - "errors": [ - { - "code": 141, - "name": "API_ERROR_ACCESS_PAGE", - "description": "Access to page denied" - } - ] - }, - { - "name": "pages.getVersion", - "description": "Returns the text of one of the previous versions of a wiki page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "version_id", - "type": "integer", - "required": true - }, - { - "name": "group_id", - "description": "ID of the community that owns the wiki page.", - "type": "integer" - }, - { - "name": "user_id", - "type": "integer" - }, - { - "name": "need_html", - "description": "'1' — to return the page as HTML", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_getVersion_response" - } - }, - "errors": [ - { - "code": 141, - "name": "API_ERROR_ACCESS_PAGE", - "description": "Access to page denied" - } - ] - }, - { - "name": "pages.parseWiki", - "description": "Returns HTML representation of the wiki markup.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "text", - "description": "Text of the wiki page.", - "type": "string", - "required": true - }, - { - "name": "group_id", - "description": "ID of the group in the context of which this markup is interpreted.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_parseWiki_response" - } - } - }, - { - "name": "pages.save", - "description": "Saves the text of a wiki page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "text", - "description": "Text of the wiki page in wiki-format.", - "type": "string" - }, - { - "name": "page_id", - "description": "Wiki page ID. The 'title' parameter can be passed instead of 'pid'.", - "type": "integer" - }, - { - "name": "group_id", - "description": "ID of the community that owns the wiki page.", - "type": "integer" - }, - { - "name": "user_id", - "description": "User ID", - "type": "integer" - }, - { - "name": "title", - "description": "Wiki page title.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_save_response" - } - }, - "errors": [ - { - "code": 141, - "name": "API_ERROR_ACCESS_PAGE", - "description": "Access to page denied" - }, - { - "code": 140, - "name": "API_ERROR_PARAM_PAGE_ID", - "description": "Page not found" - }, - { - "code": 119, - "name": "API_ERROR_PARAM_TITLE", - "description": "Invalid title" - } - ] - }, - { - "name": "pages.saveAccess", - "description": "Saves modified read and edit access settings for a wiki page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "page_id", - "description": "Wiki page ID.", - "type": "integer", - "required": true - }, - { - "name": "group_id", - "description": "ID of the community that owns the wiki page.", - "type": "integer" - }, - { - "name": "user_id", - "type": "integer" - }, - { - "name": "view", - "description": "Who can view the wiki page: '1' — only community members, '2' — all users can view the page, '0' — only community managers", - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "managers", - "members", - "all" - ] - }, - { - "name": "edit", - "description": "Who can edit the wiki page: '1' — only community members, '2' — all users can edit the page, '0' — only community managers", - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "managers", - "members", - "all" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/pages_saveAccess_response" - } - }, - "errors": [ - { - "code": 141, - "name": "API_ERROR_ACCESS_PAGE", - "description": "Access to page denied" - }, - { - "code": 140, - "name": "API_ERROR_PARAM_PAGE_ID", - "description": "Page not found" - } - ] - }, - { - "name": "photos.confirmTag", - "description": "Confirms a tag on a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "string", - "required": true - }, - { - "name": "tag_id", - "description": "Tag ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.copy", - "description": "Allows to copy a photo to the \"Saved photos\" album", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "photo's owner ID", - "type": "integer", - "required": true - }, - { - "name": "photo_id", - "description": "photo ID", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "access_key", - "description": "for private photos", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_copy_response" - } - } - }, - { - "name": "photos.createAlbum", - "description": "Creates an empty photo album.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "title", - "description": "Album title.", - "type": "string", - "required": true, - "minLength": 2 - }, - { - "name": "group_id", - "description": "ID of the community in which the album will be created.", - "type": "integer" - }, - { - "name": "description", - "description": "Album description.", - "type": "string" - }, - { - "name": "privacy_view", - "type": "array", - "default": "all", - "items": { - "type": "string" - } - }, - { - "name": "privacy_comment", - "type": "array", - "default": "all", - "items": { - "type": "string" - } - }, - { - "name": "upload_by_admins_only", - "type": "boolean" - }, - { - "name": "comments_disabled", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_createAlbum_response" - } - }, - "errors": [ - { - "code": 302, - "name": "API_ERROR_ALBUMS_LIMIT", - "description": "Albums number limit is reached" - } - ] - }, - { - "name": "photos.createComment", - "description": "Adds a new comment on the photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - }, - { - "name": "message", - "description": "Comment text.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of objects attached to the post, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — Media attachment owner ID. '' — Media attachment ID. Example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "from_group", - "description": "'1' — to post a comment from the community", - "type": "boolean" - }, - { - "name": "reply_to_comment", - "type": "integer" - }, - { - "name": "sticker_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "access_key", - "type": "string" - }, - { - "name": "guid", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_createComment_response" - } - } - }, - { - "name": "photos.delete", - "description": "Deletes a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.deleteAlbum", - "description": "Deletes a photo album belonging to the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "album_id", - "description": "Album ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "group_id", - "description": "ID of the community that owns the album.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 114, - "name": "API_ERROR_PARAM_ALBUM_ID", - "description": "Invalid album id" - } - ] - }, - { - "name": "photos.deleteComment", - "description": "Deletes a comment on the photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_deleteComment_response" - } - } - }, - { - "name": "photos.edit", - "description": "Edits the caption of a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "caption", - "description": "New caption for the photo. If this parameter is not set, it is considered to be equal to an empty string.", - "type": "string" - }, - { - "name": "latitude", - "type": "number" - }, - { - "name": "longitude", - "type": "number" - }, - { - "name": "place_str", - "type": "string" - }, - { - "name": "foursquare_id", - "type": "string" - }, - { - "name": "delete_place", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.editAlbum", - "description": "Edits information about a photo album.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "album_id", - "description": "ID of the photo album to be edited.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "New album title.", - "type": "string" - }, - { - "name": "description", - "description": "New album description.", - "type": "string" - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the album.", - "type": "integer" - }, - { - "name": "privacy_view", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "privacy_comment", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "upload_by_admins_only", - "type": "boolean" - }, - { - "name": "comments_disabled", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 114, - "name": "API_ERROR_PARAM_ALBUM_ID", - "description": "Invalid album id" - } - ] - }, - { - "name": "photos.editComment", - "description": "Edits a comment on a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true - }, - { - "name": "message", - "description": "New text of the comment.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of objects attached to the post, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — Media attachment owner ID. '' — Media attachment ID. Example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.get", - "description": "Returns a list of a user's or community's photos.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photos. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "album_id", - "description": "Photo album ID. To return information about photos from service albums, use the following string values: 'profile, wall, saved'.", - "type": "string" - }, - { - "name": "photo_ids", - "description": "Photo IDs.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "rev", - "description": "Sort order: '1' — reverse chronological, '0' — chronological", - "type": "boolean" - }, - { - "name": "extended", - "description": "'1' — to return additional 'likes', 'comments', and 'tags' fields, '0' — (default)", - "type": "boolean" - }, - { - "name": "feed_type", - "description": "Type of feed obtained in 'feed' field of the method.", - "type": "string" - }, - { - "name": "feed", - "description": "unixtime, that can be obtained with [vk.com/dev/newsfeed.get|newsfeed.get] method in date field to get all photos uploaded by the user on a specific day, or photos the user has been tagged on. Also, 'uid' parameter of the user the event happened with shall be specified.", - "type": "integer" - }, - { - "name": "photo_sizes", - "description": "'1' — to return photo sizes in a [vk.com/dev/photo_sizes|special format]", - "type": "boolean" - }, - { - "name": "offset", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "type": "integer", - "default": 50, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/photos_get_extended_response" - } - } - }, - { - "name": "photos.getAlbums", - "description": "Returns a list of a user's or community's photo albums.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the albums.", - "type": "integer" - }, - { - "name": "album_ids", - "description": "Album IDs.", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of albums.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of albums to return.", - "type": "integer", - "minimum": 0 - }, - { - "name": "need_system", - "description": "'1' — to return system albums with negative IDs", - "type": "boolean" - }, - { - "name": "need_covers", - "description": "'1' — to return an additional 'thumb_src' field, '0' — (default)", - "type": "boolean" - }, - { - "name": "photo_sizes", - "description": "'1' — to return photo sizes in a", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getAlbums_response" - } - } - }, - { - "name": "photos.getAlbumsCount", - "description": "Returns the number of photo albums belonging to a user or community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer" - }, - { - "name": "group_id", - "description": "Community ID.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getAlbumsCount_response" - } - } - }, - { - "name": "photos.getAll", - "description": "Returns a list of photos belonging to a user or community, in reverse chronological order.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of a user or community that owns the photos. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "extended", - "description": "'1' — to return detailed information about photos", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of photos. By default, '0'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of photos to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "photo_sizes", - "description": "'1' – to return image sizes in [vk.com/dev/photo_sizes|special format].", - "type": "boolean" - }, - { - "name": "no_service_albums", - "description": "'1' – to return photos only from standard albums, '0' – to return all photos including those in service albums, e.g., 'My wall photos' (default)", - "type": "boolean" - }, - { - "name": "need_hidden", - "description": "'1' – to show information about photos being hidden from the block above the wall.", - "type": "boolean" - }, - { - "name": "skip_hidden", - "description": "'1' – not to return photos being hidden from the block above the wall. Works only with owner_id>0, no_service_albums is ignored.", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getAll_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/photos_getAll_extended_response" - } - }, - "errors": [ - { - "code": 19, - "name": "API_ERROR_BLOCKED", - "description": "Content blocked" - } - ] - }, - { - "name": "photos.getAllComments", - "description": "Returns a list of comments on a specific photo album or all albums of the user sorted in reverse chronological order.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the album(s).", - "type": "integer" - }, - { - "name": "album_id", - "description": "Album ID. If the parameter is not set, comments on all of the user's albums will be returned.", - "type": "integer", - "minimum": 0 - }, - { - "name": "need_likes", - "description": "'1' — to return an additional 'likes' field, '0' — (default)", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of comments. By default, '0'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of comments to return. By default, '20'. Maximum value, '100'.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getAllComments_response" - } - }, - "errors": [ - { - "code": 114, - "name": "API_ERROR_PARAM_ALBUM_ID", - "description": "Invalid album id" - } - ] - }, - { - "name": "photos.getById", - "description": "Returns information about photos by their IDs.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "photos", - "description": "IDs separated with a comma, that are IDs of users who posted photos and IDs of photos themselves with an underscore character between such IDs. To get information about a photo in the group album, you shall specify group ID instead of user ID. Example: \"1_129207899,6492_135055734, , -20629724_271945303\"", - "type": "array", - "required": true, - "items": { - "type": "string" - } - }, - { - "name": "extended", - "description": "'1' — to return additional fields, '0' — (default)", - "type": "boolean" - }, - { - "name": "photo_sizes", - "description": "'1' — to return photo sizes in a", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getById_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/photos_getById_extended_response" - } - } - }, - { - "name": "photos.getChatUploadServer", - "description": "Returns an upload link for chat cover pictures.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "chat_id", - "description": "ID of the chat for which you want to upload a cover photo.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "crop_x", - "type": "integer", - "minimum": 0 - }, - { - "name": "crop_y", - "type": "integer", - "minimum": 0 - }, - { - "name": "crop_width", - "description": "Width (in pixels) of the photo after cropping.", - "type": "integer", - "minimum": 200 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_getUploadServer_response" - } - } - }, - { - "name": "photos.getComments", - "description": "Returns a list of comments on a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - }, - { - "name": "need_likes", - "description": "'1' — to return an additional 'likes' field, '0' — (default)", - "type": "boolean" - }, - { - "name": "start_comment_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of comments. By default, '0'.", - "type": "integer" - }, - { - "name": "count", - "description": "Number of comments to return.", - "type": "integer", - "default": "20", - "minimum": 0, - "maximum": 100 - }, - { - "name": "sort", - "description": "Sort order: 'asc' — old first, 'desc' — new first", - "type": "string", - "enum": [ - "asc", - "desc" - ], - "enumNames": [ - "old first", - "new first" - ] - }, - { - "name": "access_key", - "type": "string" - }, - { - "name": "extended", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getComments_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/photos_getComments_extended_response" - } - } - }, - { - "name": "photos.getMarketAlbumUploadServer", - "description": "Returns the server address for market album photo upload.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_getUploadServer_response" - } - } - }, - { - "name": "photos.getMarketUploadServer", - "description": "Returns the server address for market photo upload.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "main_photo", - "description": "'1' if you want to upload the main item photo.", - "type": "boolean" - }, - { - "name": "crop_x", - "description": "X coordinate of the crop left upper corner.", - "type": "integer", - "minimum": 0 - }, - { - "name": "crop_y", - "description": "Y coordinate of the crop left upper corner.", - "type": "integer", - "minimum": 0 - }, - { - "name": "crop_width", - "description": "Width of the cropped photo in px.", - "type": "integer", - "minimum": 400 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getMarketUploadServer_response" - } - } - }, - { - "name": "photos.getMessagesUploadServer", - "description": "Returns the server address for photo upload in a private message for a user.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "peer_id", - "description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'Chat ID', e.g. '2000000001'. For community: '- Community ID', e.g. '-12345'. \"", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getMessagesUploadServer_response" - } - }, - "errors": [ - { - "code": 901, - "name": "API_ERROR_MESSAGES_DENY_SEND", - "description": "Can't send messages for users without permission" - } - ] - }, - { - "name": "photos.getNewTags", - "description": "Returns a list of photos with tags that have not been viewed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "offset", - "description": "Offset needed to return a specific subset of photos.", - "type": "integer" - }, - { - "name": "count", - "description": "Number of photos to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getNewTags_response" - } - } - }, - { - "name": "photos.getOwnerCoverPhotoUploadServer", - "description": "Returns the server address for owner cover upload.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of community that owns the album (if the photo will be uploaded to a community album).", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "crop_x", - "description": "X coordinate of the left-upper corner", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "crop_y", - "description": "Y coordinate of the left-upper corner", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "crop_x2", - "description": "X coordinate of the right-bottom corner", - "type": "integer", - "default": 795, - "minimum": 0 - }, - { - "name": "crop_y2", - "description": "Y coordinate of the right-bottom corner", - "type": "integer", - "default": 200, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_getUploadServer_response" - } - } - }, - { - "name": "photos.getOwnerPhotoUploadServer", - "description": "Returns an upload server address for a profile or community photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "identifier of a community or current user. \"Note that community id must be negative. 'owner_id=1' – user, 'owner_id=-1' – community, \"", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_getUploadServer_response" - } - } - }, - { - "name": "photos.getTags", - "description": "Returns a list of tags on a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - }, - { - "name": "access_key", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getTags_response" - } - } - }, - { - "name": "photos.getUploadServer", - "description": "Returns the server address for photo upload.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of community that owns the album (if the photo will be uploaded to a community album).", - "type": "integer" - }, - { - "name": "album_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getUploadServer_response" - } - } - }, - { - "name": "photos.getUserPhotos", - "description": "Returns a list of photos in which a user is tagged.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of photos. By default, '0'.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of photos to return. Maximum value is 1000.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "extended", - "description": "'1' — to return an additional 'likes' field, '0' — (default)", - "type": "boolean" - }, - { - "name": "sort", - "description": "Sort order: '1' — by date the tag was added in ascending order, '0' — by date the tag was added in descending order", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getUserPhotos_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/photos_getUserPhotos_extended_response" - } - } - }, - { - "name": "photos.getWallUploadServer", - "description": "Returns the server address for photo upload onto a user's wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "ID of community to whose wall the photo will be uploaded.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_getWallUploadServer_response" - } - } - }, - { - "name": "photos.makeCover", - "description": "Makes a photo into an album cover.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - }, - { - "name": "album_id", - "description": "Album ID.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.move", - "description": "Moves a photo from one album to another.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "target_album_id", - "description": "ID of the album to which the photo will be moved.", - "type": "integer", - "required": true - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.putTag", - "description": "Adds a tag on the photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer", - "minimum": 0 - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "user_id", - "description": "ID of the user to be tagged.", - "type": "integer", - "required": true - }, - { - "name": "x", - "description": "Upper left-corner coordinate of the tagged area (as a percentage of the photo's width).", - "type": "number" - }, - { - "name": "y", - "description": "Upper left-corner coordinate of the tagged area (as a percentage of the photo's height).", - "type": "number" - }, - { - "name": "x2", - "description": "Lower right-corner coordinate of the tagged area (as a percentage of the photo's width).", - "type": "number" - }, - { - "name": "y2", - "description": "Lower right-corner coordinate of the tagged area (as a percentage of the photo's height).", - "type": "number" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_putTag_response" - } - } - }, - { - "name": "photos.removeTag", - "description": "Removes a tag from a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - }, - { - "name": "tag_id", - "description": "Tag ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.reorderAlbums", - "description": "Reorders the album in the list of user albums.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the album.", - "type": "integer" - }, - { - "name": "album_id", - "description": "Album ID.", - "type": "integer", - "required": true - }, - { - "name": "before", - "description": "ID of the album before which the album in question shall be placed.", - "type": "integer" - }, - { - "name": "after", - "description": "ID of the album after which the album in question shall be placed.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.reorderPhotos", - "description": "Reorders the photo in the list of photos of the user album.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true - }, - { - "name": "before", - "description": "ID of the photo before which the photo in question shall be placed.", - "type": "integer" - }, - { - "name": "after", - "description": "ID of the photo after which the photo in question shall be placed.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 122, - "name": "API_ERROR_PARAM_PHOTOS", - "description": "Invalid photos" - } - ] - }, - { - "name": "photos.report", - "description": "Reports (submits a complaint about) a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer", - "required": true - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Reason for the complaint: '0' – spam, '1' – child pornography, '2' – extremism, '3' – violence, '4' – drug propaganda, '5' – adult material, '6' – insult, abuse", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.reportComment", - "description": "Reports (submits a complaint about) a comment on a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "ID of the comment being reported.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Reason for the complaint: '0' – spam, '1' – child pornography, '2' – extremism, '3' – violence, '4' – drug propaganda, '5' – adult material, '6' – insult, abuse", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.restore", - "description": "Restores a deleted photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "photo_id", - "description": "Photo ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "photos.restoreComment", - "description": "Restores a deleted comment on a photo.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the photo.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "ID of the deleted comment.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_restoreComment_response" - } - } - }, - { - "name": "photos.save", - "description": "Saves photos after successful uploading.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "album_id", - "description": "ID of the album to save photos to.", - "type": "integer" - }, - { - "name": "group_id", - "description": "ID of the community to save photos to.", - "type": "integer" - }, - { - "name": "server", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "integer" - }, - { - "name": "photos_list", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string" - }, - { - "name": "hash", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string" - }, - { - "name": "latitude", - "description": "Geographical latitude, in degrees (from '-90' to '90').", - "type": "number" - }, - { - "name": "longitude", - "description": "Geographical longitude, in degrees (from '-180' to '180').", - "type": "number" - }, - { - "name": "caption", - "description": "Text describing the photo. 2048 digits max.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_save_response" - } - }, - "errors": [ - { - "code": 114, - "name": "API_ERROR_PARAM_ALBUM_ID", - "description": "Invalid album id" - }, - { - "code": 118, - "name": "API_ERROR_PARAM_SERVER", - "description": "Invalid server" - }, - { - "code": 121, - "name": "API_ERROR_PARAM_HASH", - "description": "Invalid hash" - } - ] - }, - { - "name": "photos.saveMarketAlbumPhoto", - "description": "Saves market album photos after successful uploading.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "photo", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string", - "required": true - }, - { - "name": "server", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "hash", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_saveMarketAlbumPhoto_response" - } - }, - "errors": [ - { - "code": 121, - "name": "API_ERROR_PARAM_HASH", - "description": "Invalid hash" - }, - { - "code": 129, - "name": "API_ERROR_PARAM_PHOTO", - "description": "Invalid photo" - } - ] - }, - { - "name": "photos.saveMarketPhoto", - "description": "Saves market photos after successful uploading.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "photo", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string", - "required": true - }, - { - "name": "server", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "integer", - "required": true - }, - { - "name": "hash", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string", - "required": true - }, - { - "name": "crop_data", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string" - }, - { - "name": "crop_hash", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_saveMarketPhoto_response" - } - }, - "errors": [ - { - "code": 121, - "name": "API_ERROR_PARAM_HASH", - "description": "Invalid hash" - }, - { - "code": 129, - "name": "API_ERROR_PARAM_PHOTO", - "description": "Invalid photo" - } - ] - }, - { - "name": "photos.saveMessagesPhoto", - "description": "Saves a photo after being successfully uploaded. URL obtained with [vk.com/dev/photos.getMessagesUploadServer|photos.getMessagesUploadServer] method.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "photo", - "description": "Parameter returned when the photo is [vk.com/dev/upload_files|uploaded to the server].", - "type": "string", - "required": true - }, - { - "name": "server", - "type": "integer" - }, - { - "name": "hash", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_saveMessagesPhoto_response" - } - }, - "errors": [ - { - "code": 114, - "name": "API_ERROR_PARAM_ALBUM_ID", - "description": "Invalid album id" - }, - { - "code": 118, - "name": "API_ERROR_PARAM_SERVER", - "description": "Invalid server" - }, - { - "code": 121, - "name": "API_ERROR_PARAM_HASH", - "description": "Invalid hash" - } - ] - }, - { - "name": "photos.saveOwnerCoverPhoto", - "description": "Saves cover photo after successful uploading.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "hash", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string", - "required": true - }, - { - "name": "photo", - "description": "Parameter returned when photos are [vk.com/dev/upload_files|uploaded to server].", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_saveOwnerCoverPhoto_response" - } - }, - "errors": [ - { - "code": 129, - "name": "API_ERROR_PARAM_PHOTO", - "description": "Invalid photo" - } - ] - }, - { - "name": "photos.saveOwnerPhoto", - "description": "Saves a profile or community photo. Upload URL can be got with the [vk.com/dev/photos.getOwnerPhotoUploadServer|photos.getOwnerPhotoUploadServer] method.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "server", - "description": "parameter returned after [vk.com/dev/upload_files|photo upload].", - "type": "string" - }, - { - "name": "hash", - "description": "parameter returned after [vk.com/dev/upload_files|photo upload].", - "type": "string" - }, - { - "name": "photo", - "description": "parameter returned after [vk.com/dev/upload_files|photo upload].", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_saveOwnerPhoto_response" - } - }, - "errors": [ - { - "code": 129, - "name": "API_ERROR_PARAM_PHOTO", - "description": "Invalid photo" - } - ] - }, - { - "name": "photos.saveWallPhoto", - "description": "Saves a photo to a user's or community's wall after being uploaded.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of the user on whose wall the photo will be saved.", - "type": "integer", - "minimum": 0 - }, - { - "name": "group_id", - "description": "ID of community on whose wall the photo will be saved.", - "type": "integer", - "minimum": 0 - }, - { - "name": "photo", - "description": "Parameter returned when the the photo is [vk.com/dev/upload_files|uploaded to the server].", - "type": "string", - "required": true - }, - { - "name": "server", - "type": "integer" - }, - { - "name": "hash", - "type": "string" - }, - { - "name": "latitude", - "description": "Geographical latitude, in degrees (from '-90' to '90').", - "type": "number" - }, - { - "name": "longitude", - "description": "Geographical longitude, in degrees (from '-180' to '180').", - "type": "number" - }, - { - "name": "caption", - "description": "Text describing the photo. 2048 digits max.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_saveWallPhoto_response" - } - }, - "errors": [ - { - "code": 114, - "name": "API_ERROR_PARAM_ALBUM_ID", - "description": "Invalid album id" - }, - { - "code": 118, - "name": "API_ERROR_PARAM_SERVER", - "description": "Invalid server" - }, - { - "code": 121, - "name": "API_ERROR_PARAM_HASH", - "description": "Invalid hash" - } - ] - }, - { - "name": "photos.search", - "description": "Returns a list of photos.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string.", - "type": "string" - }, - { - "name": "lat", - "description": "Geographical latitude, in degrees (from '-90' to '90').", - "type": "number" - }, - { - "name": "long", - "description": "Geographical longitude, in degrees (from '-180' to '180').", - "type": "number" - }, - { - "name": "start_time", - "type": "integer", - "minimum": 0 - }, - { - "name": "end_time", - "type": "integer", - "minimum": 0 - }, - { - "name": "sort", - "description": "Sort order:", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of photos.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of photos to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "radius", - "description": "Radius of search in meters (works very approximately). Available values: '10', '100', '800', '6000', '50000'.", - "type": "integer", - "default": 5000, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/photos_search_response" - } - } - }, - { - "name": "polls.addVote", - "description": "Adds the current user's vote to the selected answer in the poll.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the poll. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "poll_id", - "description": "Poll ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "answer_ids", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "is_board", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/polls_addVote_response" - } - }, - "errors": [ - { - "code": 250, - "name": "API_ERROR_POLLS_ACCESS", - "description": "Access to poll denied" - }, - { - "code": 252, - "name": "API_ERROR_POLLS_ANSWER_ID", - "description": "Invalid answer id" - }, - { - "code": 251, - "name": "API_ERROR_POLLS_POLL_ID", - "description": "Invalid poll id" - } - ] - }, - { - "name": "polls.create", - "description": "Creates polls that can be attached to the users' or communities' posts.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "question", - "description": "question text", - "type": "string" - }, - { - "name": "is_anonymous", - "description": "'1' – anonymous poll, participants list is hidden,, '0' – public poll, participants list is available,, Default value is '0'.", - "type": "boolean" - }, - { - "name": "is_multiple", - "type": "boolean" - }, - { - "name": "end_date", - "type": "integer", - "minimum": 1550700000 - }, - { - "name": "owner_id", - "description": "If a poll will be added to a communty it is required to send a negative group identifier. Current user by default.", - "type": "integer" - }, - { - "name": "add_answers", - "description": "available answers list, for example: \" [\"yes\",\"no\",\"maybe\"]\", There can be from 1 to 10 answers.", - "type": "string" - }, - { - "name": "photo_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "background_id", - "type": "string", - "enum": [ - 1, - 2, - 3, - 4, - 6, - 8, - 9 - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/polls_create_response" - } - } - }, - { - "name": "polls.deleteVote", - "description": "Deletes the current user's vote from the selected answer in the poll.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the poll. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "poll_id", - "description": "Poll ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "answer_id", - "description": "Answer ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "is_board", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/polls_deleteVote_response" - } - }, - "errors": [ - { - "code": 250, - "name": "API_ERROR_POLLS_ACCESS", - "description": "Access to poll denied" - }, - { - "code": 252, - "name": "API_ERROR_POLLS_ANSWER_ID", - "description": "Invalid answer id" - }, - { - "code": 251, - "name": "API_ERROR_POLLS_POLL_ID", - "description": "Invalid poll id" - } - ] - }, - { - "name": "polls.edit", - "description": "Edits created polls", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "poll owner id", - "type": "integer" - }, - { - "name": "poll_id", - "description": "edited poll's id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "question", - "description": "new question text", - "type": "string" - }, - { - "name": "add_answers", - "description": "answers list, for example: , \"[\"yes\",\"no\",\"maybe\"]\"", - "type": "string" - }, - { - "name": "edit_answers", - "description": "object containing answers that need to be edited,, key – answer id, value – new answer text. Example: {\"382967099\":\"option1\", \"382967103\":\"option2\"}\"", - "type": "string" - }, - { - "name": "delete_answers", - "description": "list of answer ids to be deleted. For example: \"[382967099, 382967103]\"", - "type": "string" - }, - { - "name": "end_date", - "type": "integer", - "minimum": 0 - }, - { - "name": "photo_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "background_id", - "type": "string", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 6, - 8, - 9 - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "polls.getById", - "description": "Returns detailed information about a poll by its ID.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the poll. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "is_board", - "description": "'1' – poll is in a board, '0' – poll is on a wall. '0' by default.", - "type": "boolean" - }, - { - "name": "poll_id", - "description": "Poll ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "extended", - "type": "boolean" - }, - { - "name": "friends_count", - "type": "integer", - "default": 3, - "minimum": 0, - "maximum": 100 - }, - { - "name": "fields", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "name_case", - "type": "string", - "default": "nom", - "enum": [ - "abl", - "acc", - "dat", - "gen", - "ins", - "nom" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/polls_getById_response" - } - }, - "errors": [ - { - "code": 250, - "name": "API_ERROR_POLLS_ACCESS", - "description": "Access to poll denied" - } - ] - }, - { - "name": "polls.getVoters", - "description": "Returns a list of IDs of users who selected specific answers in the poll.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the poll. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "poll_id", - "description": "Poll ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "answer_ids", - "description": "Answer IDs.", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "is_board", - "type": "boolean" - }, - { - "name": "friends_only", - "description": "'1' — to return only current user's friends, '0' — to return all users (default),", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of voters. '0' — (default)", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of user IDs to return (if the 'friends_only' parameter is not set, maximum '1000', otherwise '10'). '100' — (default)", - "type": "integer", - "minimum": 0 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate (birthdate)', 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online', 'counters'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: , 'nom' — nominative (default) , 'gen' — genitive , 'dat' — dative , 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/polls_getVoters_response" - } - }, - "errors": [ - { - "code": 250, - "name": "API_ERROR_POLLS_ACCESS", - "description": "Access to poll denied" - }, - { - "code": 252, - "name": "API_ERROR_POLLS_ANSWER_ID", - "description": "Invalid answer id" - }, - { - "code": 251, - "name": "API_ERROR_POLLS_POLL_ID", - "description": "Invalid poll id" - }, - { - "code": 253, - "name": "API_ERROR_POLLS_ACCESS_WITHOUT_VOTE", - "description": "Access denied, please vote first" - } - ] - }, - { - "name": "prettyCards.create", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "photo", - "type": "string", - "required": true - }, - { - "name": "title", - "type": "string", - "required": true - }, - { - "name": "link", - "type": "string", - "required": true, - "maxLength": 2000 - }, - { - "name": "price", - "type": "string", - "maxLength": 20 - }, - { - "name": "price_old", - "type": "string", - "maxLength": 20 - }, - { - "name": "button", - "type": "string", - "maxLength": 255 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/prettyCards_create_response" - } - }, - "errors": [ - { - "code": 1901, - "name": "API_ERROR_PRETTY_CARDS_TOO_MANY_CARDS", - "description": "Too many cards" - } - ] - }, - { - "name": "prettyCards.delete", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "card_id", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/prettyCards_delete_response" - } - }, - "errors": [ - { - "code": 1900, - "name": "API_ERROR_PRETTY_CARDS_CARD_NOT_FOUND", - "description": "Card not found" - }, - { - "code": 1902, - "name": "API_ERROR_PRETTY_CARDS_CARD_IS_CONNECTED_TO_POST", - "description": "Card is connected to post" - } - ] - }, - { - "name": "prettyCards.edit", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "card_id", - "type": "integer", - "required": true - }, - { - "name": "photo", - "type": "string" - }, - { - "name": "title", - "type": "string" - }, - { - "name": "link", - "type": "string", - "maxLength": 2000 - }, - { - "name": "price", - "type": "string", - "maxLength": 20 - }, - { - "name": "price_old", - "type": "string", - "maxLength": 20 - }, - { - "name": "button", - "type": "string", - "maxLength": 255 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/prettyCards_edit_response" - } - }, - "errors": [ - { - "code": 1900, - "name": "API_ERROR_PRETTY_CARDS_CARD_NOT_FOUND", - "description": "Card not found" - } - ] - }, - { - "name": "prettyCards.get", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "type": "integer", - "default": 10, - "minimum": 0, - "maximum": 100 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/prettyCards_get_response" - } - } - }, - { - "name": "prettyCards.getById", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "card_ids", - "type": "array", - "required": true, - "items": { - "type": "integer" - }, - "maxItems": 10 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/prettyCards_getById_response" - } - } - }, - { - "name": "prettyCards.getUploadURL", - "access_token_type": [ - "user" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/prettyCards_getUploadURL_response" - } - } - }, - { - "name": "search.getHints", - "description": "Allows the programmer to do a quick search for any substring.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string.", - "type": "string" - }, - { - "name": "offset", - "description": "Offset for querying specific result subset", - "type": "integer", - "minimum": 0, - "maximum": 200 - }, - { - "name": "limit", - "description": "Maximum number of results to return.", - "type": "integer", - "default": 9, - "minimum": 0, - "maximum": 200 - }, - { - "name": "filters", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "fields", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "search_global", - "type": "boolean", - "default": 1 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/search_getHints_response" - } - } - }, - { - "name": "secure.addAppEvent", - "description": "Adds user activity information to an application", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of a user to save the data", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "activity_id", - "description": "there are 2 default activities: , * 1 – level. Works similar to ,, * 2 – points, saves points amount, Any other value is for saving completed missions", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "value", - "description": "depends on activity_id: * 1 – number, current level number,, * 2 – number, current user's points amount, , Any other value is ignored", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 1251, - "name": "API_ERROR_APPS_ALREADY_UNLOCKED", - "description": "This achievement is already unlocked" - } - ] - }, - { - "name": "secure.checkToken", - "description": "Checks the user authentication in 'IFrame' and 'Flash' apps using the 'access_token' parameter.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "token", - "description": "client 'access_token'", - "type": "string" - }, - { - "name": "ip", - "description": "user 'ip address'. Note that user may access using the 'ipv6' address, in this case it is required to transmit the 'ipv6' address. If not transmitted, the address will not be checked.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_checkToken_response" - } - } - }, - { - "name": "secure.getAppBalance", - "description": "Returns payment balance of the application in hundredth of a vote.", - "access_token_type": [ - "service" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_getAppBalance_response" - } - } - }, - { - "name": "secure.getSMSHistory", - "description": "Shows a list of SMS notifications sent by the application using [vk.com/dev/secure.sendSMSNotification|secure.sendSMSNotification] method.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "date_from", - "description": "filter by start date. It is set as UNIX-time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "date_to", - "description": "filter by end date. It is set as UNIX-time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "limit", - "description": "number of returned posts. By default — 1000.", - "type": "integer", - "default": 1000, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_getSMSHistory_response" - } - } - }, - { - "name": "secure.getTransactionsHistory", - "description": "Shows history of votes transaction between users and the application.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "type", - "type": "integer" - }, - { - "name": "uid_from", - "type": "integer", - "minimum": 0 - }, - { - "name": "uid_to", - "type": "integer", - "minimum": 0 - }, - { - "name": "date_from", - "type": "integer", - "minimum": 0 - }, - { - "name": "date_to", - "type": "integer", - "minimum": 0 - }, - { - "name": "limit", - "type": "integer", - "default": 1000, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_getTransactionsHistory_response" - } - } - }, - { - "name": "secure.getUserLevel", - "description": "Returns one of the previously set game levels of one or more users in the application.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "user_ids", - "type": "array", - "required": true, - "items": { - "type": "integer" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_getUserLevel_response" - } - } - }, - { - "name": "secure.giveEventSticker", - "description": "Opens the game achievement and gives the user a sticker", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "user_ids", - "type": "array", - "required": true, - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "achievement_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_giveEventSticker_response" - } - } - }, - { - "name": "secure.sendNotification", - "description": "Sends notification to the user.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "user_ids", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "message", - "description": "notification text which should be sent in 'UTF-8' encoding ('254' characters maximum).", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/secure_sendNotification_response" - } - } - }, - { - "name": "secure.sendSMSNotification", - "description": "Sends 'SMS' notification to a user's mobile device.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of the user to whom SMS notification is sent. The user shall allow the application to send him/her notifications (, +1).", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "'SMS' text to be sent in 'UTF-8' encoding. Only Latin letters and numbers are allowed. Maximum size is '160' characters.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 147, - "name": "API_ERROR_INSUFFICIENT_FUNDS", - "description": "Application has insufficient funds" - }, - { - "code": 146, - "name": "API_ERROR_MOBILE_NOT_ACTIVATED", - "description": "The mobile number of the user is unknown" - } - ] - }, - { - "name": "secure.setCounter", - "description": "Sets a counter which is shown to the user in bold in the left menu.", - "access_token_type": [ - "service" - ], - "parameters": [ - { - "name": "counters", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "counter", - "description": "counter value.", - "type": "integer" - }, - { - "name": "increment", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 148, - "name": "API_ERROR_ACCESS_MENU", - "description": "Access to the menu of the user denied" - } - ] - }, - { - "name": "stats.get", - "description": "Returns statistics of a community or an application.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "app_id", - "description": "Application ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "timestamp_from", - "type": "integer", - "minimum": 0 - }, - { - "name": "timestamp_to", - "type": "integer", - "minimum": 0 - }, - { - "name": "interval", - "type": "string", - "default": "day" - }, - { - "name": "intervals_count", - "type": "integer", - "minimum": 0 - }, - { - "name": "filters", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "stats_groups", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "extended", - "type": "boolean", - "default": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stats_get_response" - } - } - }, - { - "name": "stats.getPostReach", - "description": "Returns stats for a wall post.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "post owner community id. Specify with \"-\" sign.", - "type": "string", - "required": true - }, - { - "name": "post_id", - "description": "wall post id. Note that stats are available only for '300' last (newest) posts on a community wall.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stats_getPostReach_response" - } - }, - "errors": [ - { - "code": 210, - "name": "API_ERROR_WALL_ACCESS_POST", - "description": "Access to wall's post denied" - } - ] - }, - { - "name": "stats.trackVisitor", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "id", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "status.get", - "description": "Returns data required to show the status of a user or community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/status_get_response" - } - } - }, - { - "name": "status.set", - "description": "Sets a new status for the current user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "text", - "description": "Text of the new status.", - "type": "string" - }, - { - "name": "group_id", - "description": "Identifier of a community to set a status in. If left blank the status is set to current user.", - "type": "integer", - "minimum": 0 - } - ], - "errors": [ - { - "name": "API_ERROR_STATUS_NO_AUDIO", - "code": 221, - "description": "User disabled track name broadcast" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "storage.get", - "description": "Returns a value of variable with the name set by key parameter.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "key", - "type": "string", - "maxLength": 100 - }, - { - "name": "keys", - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 1000 - }, - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "global", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "keyResponse": { - "$ref": "responses.json#/definitions/storage_get_response" - }, - "keysResponse": { - "$ref": "responses.json#/definitions/storage_get_keys_response" - } - } - }, - { - "name": "storage.getKeys", - "description": "Returns the names of all variables.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "user id, whose variables names are returned if they were requested with a server method.", - "type": "integer", - "minimum": 0 - }, - { - "name": "global", - "type": "boolean", - "default": 0 - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "description": "amount of variable names the info needs to be collected from.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/storage_getKeys_response" - } - } - }, - { - "name": "storage.set", - "description": "Saves a value of variable with the name set by 'key' parameter.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "key", - "type": "string", - "required": true, - "maxLength": 100 - }, - { - "name": "value", - "type": "string" - }, - { - "name": "user_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "global", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 103, - "name": "API_ERROR_LIMITS", - "description": "Out of limits" - } - ] - }, - { - "name": "stories.banOwner", - "description": "Allows to hide stories from chosen sources from current user's feed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owners_ids", - "description": "List of sources IDs", - "type": "array", - "required": true, - "items": { - "type": "integer" - }, - "maxItems": 200 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "stories.delete", - "description": "Allows to delete story.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Story owner's ID. Current user id is used by default.", - "type": "integer", - "required": true - }, - { - "name": "story_id", - "description": "Story ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "stories.get", - "description": "Returns stories available for current user.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Owner ID.", - "type": "integer" - }, - { - "name": "extended", - "description": "'1' — to return additional fields for users and communities. Default value is 0.", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/stories_get_extended_response" - } - } - }, - { - "name": "stories.getBanned", - "description": "Returns list of sources hidden from current user's feed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "extended", - "description": "'1' — to return additional fields for users and communities. Default value is 0.", - "type": "boolean" - }, - { - "name": "fields", - "description": "Additional fields to return", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getBanned_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/stories_getBanned_extended_response" - } - } - }, - { - "name": "stories.getById", - "description": "Returns story by its ID.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "stories", - "description": "Stories IDs separated by commas. Use format {owner_id}+'_'+{story_id}, for example, 12345_54331.", - "type": "array", - "required": true, - "items": { - "type": "string" - } - }, - { - "name": "extended", - "description": "'1' — to return additional fields for users and communities. Default value is 0.", - "type": "boolean", - "default": false - }, - { - "name": "fields", - "description": "Additional fields to return", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getById_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/stories_getById_extended_response" - } - }, - "errors": [ - { - "code": 1600, - "name": "API_ERROR_STORY_EXPIRED", - "description": "Story has already expired" - } - ] - }, - { - "name": "stories.getPhotoUploadServer", - "description": "Returns URL for uploading a story with photo.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "add_to_news", - "description": "1 — to add the story to friend's feed.", - "type": "boolean" - }, - { - "name": "user_ids", - "description": "List of users IDs who can see the story.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "reply_to_story", - "description": "ID of the story to reply with the current.", - "type": "string" - }, - { - "name": "link_text", - "description": "Link text (for community's stories only).", - "type": "string", - "$ref": "objects.json#/definitions/stories_upload_link_text" - }, - { - "name": "link_url", - "description": "Link URL. Internal links on https://vk.com only.", - "type": "string", - "maxLength": 2048 - }, - { - "name": "group_id", - "description": "ID of the community to upload the story (should be verified or with the \"fire\" icon).", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getPhotoUploadServer_response" - } - }, - "errors": [ - { - "code": 900, - "name": "API_ERROR_MESSAGES_USER_BLOCKED", - "description": "Can't send messages for users from blacklist" - }, - { - "code": 1602, - "name": "API_ERROR_STORY_INCORRECT_REPLY_PRIVACY", - "description": "Incorrect reply privacy" - }, - { - "code": 19, - "name": "API_ERROR_BLOCKED", - "description": "Content blocked" - } - ] - }, - { - "name": "stories.getReplies", - "description": "Returns replies to the story.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Story owner ID.", - "type": "integer", - "required": true - }, - { - "name": "story_id", - "description": "Story ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "access_key", - "description": "Access key for the private object.", - "type": "string" - }, - { - "name": "extended", - "description": "'1' — to return additional fields for users and communities. Default value is 0.", - "type": "boolean", - "default": false - }, - { - "name": "fields", - "description": "Additional fields to return", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getReplies_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/stories_getReplies_extended_response" - } - } - }, - { - "name": "stories.getStats", - "description": "Returns stories available for current user.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Story owner ID. ", - "type": "integer", - "required": true - }, - { - "name": "story_id", - "description": "Story ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getStats_response" - } - } - }, - { - "name": "stories.getVideoUploadServer", - "description": "Allows to receive URL for uploading story with video.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "add_to_news", - "description": "1 — to add the story to friend's feed.", - "type": "boolean" - }, - { - "name": "user_ids", - "description": "List of users IDs who can see the story.", - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "reply_to_story", - "description": "ID of the story to reply with the current.", - "type": "string" - }, - { - "name": "link_text", - "description": "Link text (for community's stories only).", - "type": "string", - "$ref": "objects.json#/definitions/stories_upload_link_text" - }, - { - "name": "link_url", - "description": "Link URL. Internal links on https://vk.com only.", - "type": "string", - "maxLength": 2048 - }, - { - "name": "group_id", - "description": "ID of the community to upload the story (should be verified or with the \"fire\" icon).", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getVideoUploadServer_response" - } - }, - "errors": [ - { - "code": 900, - "name": "API_ERROR_MESSAGES_USER_BLOCKED", - "description": "Can't send messages for users from blacklist" - }, - { - "code": 1602, - "name": "API_ERROR_STORY_INCORRECT_REPLY_PRIVACY", - "description": "Incorrect reply privacy" - }, - { - "code": 19, - "name": "API_ERROR_BLOCKED", - "description": "Content blocked" - } - ] - }, - { - "name": "stories.getViewers", - "description": "Returns a list of story viewers.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "Story owner ID.", - "type": "integer", - "required": true - }, - { - "name": "story_id", - "description": "Story ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "count", - "description": "Maximum number of results.", - "type": "integer", - "default": 100, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of results.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' — to return detailed information about photos", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/stories_getViewers_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/stories_getViewers_extended_response" - } - }, - "errors": [ - { - "code": 1600, - "name": "API_ERROR_STORY_EXPIRED", - "description": "Story has already expired" - } - ] - }, - { - "name": "stories.hideAllReplies", - "description": "Hides all replies in the last 24 hours from the user to current user's stories.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user whose replies should be hidden.", - "type": "integer", - "required": true - }, - { - "name": "group_id", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "stories.hideReply", - "description": "Hides the reply to the current user's story.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user whose replies should be hidden.", - "type": "integer", - "required": true - }, - { - "name": "story_id", - "description": "Story ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "stories.unbanOwner", - "description": "Allows to show stories from hidden sources in current user's feed.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owners_ids", - "description": "List of hidden sources to show stories from.", - "type": "array", - "required": true, - "items": { - "type": "integer" - }, - "maxItems": 200 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "streaming.getServerUrl", - "description": "Allows to receive data for the connection to Streaming API.", - "access_token_type": [ - "user", - "service" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/streaming_getServerUrl_response" - } - } - }, - { - "name": "streaming.setSettings", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "monthly_tier", - "type": "string", - "enum": [ - "tier_1", - "tier_2", - "tier_3", - "tier_4", - "tier_5", - "tier_6", - "unlimited" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "users.get", - "description": "Returns detailed information on users.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "user_ids", - "description": "User IDs or screen names ('screen_name'). By default, current user ID.", - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 1000 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'contacts', 'education', 'online', 'counters', 'relation', 'last_seen', 'activity', 'can_write_private_message', 'can_see_all_posts', 'can_post', 'universities',", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: 'nom' — nominative (default), 'gen' — genitive , 'dat' — dative, 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/users_get_response" - } - } - }, - { - "name": "users.getFollowers", - "description": "Returns a list of IDs of followers of the user in question, sorted by date added, most recent first.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of followers.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of followers to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online'.", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "name_case", - "description": "Case for declension of user name and surname: 'nom' — nominative (default), 'gen' — genitive , 'dat' — dative, 'acc' — accusative , 'ins' — instrumental , 'abl' — prepositional", - "type": "string", - "enum": [ - "nom", - "gen", - "dat", - "acc", - "ins", - "abl" - ], - "enumNames": [ - "nominative", - "genitive", - "dative", - "accusative", - "instrumental", - "prepositional" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/users_getFollowers_response" - }, - "fieldsResponse": { - "$ref": "responses.json#/definitions/users_getFollowers_fields_response" - } - } - }, - { - "name": "users.getSubscriptions", - "description": "Returns a list of IDs of users and communities followed by the user.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "user_id", - "description": "User ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' — to return a combined list of users and communities, '0' — to return separate lists of users and communities (default)", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of subscriptions.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of users and communities to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/users_getSubscriptions_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/users_getSubscriptions_extended_response" - } - } - }, - { - "name": "users.isAppUser", - "description": "Returns information whether a user installed the application.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/users_isAppUser_response" - } - } - }, - { - "name": "users.report", - "description": "Reports (submits a complain about) a user.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "user_id", - "description": "ID of the user about whom a complaint is being made.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "type", - "description": "Type of complaint: 'porn' – pornography, 'spam' – spamming, 'insult' – abusive behavior, 'advertisement' – disruptive advertisements", - "type": "string", - "required": true, - "enum": [ - "porn", - "spam", - "insult", - "advertisement" - ] - }, - { - "name": "comment", - "description": "Comment describing the complaint.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "users.search", - "description": "Returns a list of users matching the search criteria.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string (e.g., 'Vasya Babich').", - "type": "string" - }, - { - "name": "sort", - "description": "Sort order: '1' — by date registered, '0' — by rating", - "type": "integer", - "enum": [ - 0, - 1 - ], - "enumNames": [ - "by rating", - "by date registered" - ] - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of users.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of users to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 1000 - }, - { - "name": "fields", - "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'rate', 'contacts', 'education', 'online',", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "city", - "description": "City ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "country", - "description": "Country ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "hometown", - "description": "City name in a string.", - "type": "string" - }, - { - "name": "university_country", - "description": "ID of the country where the user graduated.", - "type": "integer", - "minimum": 0 - }, - { - "name": "university", - "description": "ID of the institution of higher education.", - "type": "integer", - "minimum": 0 - }, - { - "name": "university_year", - "description": "Year of graduation from an institution of higher education.", - "type": "integer", - "minimum": 0 - }, - { - "name": "university_faculty", - "description": "Faculty ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "university_chair", - "description": "Chair ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "sex", - "description": "'1' — female, '2' — male, '0' — any (default)", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "any", - "female", - "male" - ] - }, - { - "name": "status", - "description": "Relationship status: '1' — Not married, '2' — In a relationship, '3' — Engaged, '4' — Married, '5' — It's complicated, '6' — Actively searching, '7' — In love", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], - "enumNames": [ - "not specified", - "not married", - "relationship", - "engaged", - "married", - "complicated", - "actively searching", - "in love" - ] - }, - { - "name": "age_from", - "description": "Minimum age.", - "type": "integer", - "minimum": 0 - }, - { - "name": "age_to", - "description": "Maximum age.", - "type": "integer", - "minimum": 0 - }, - { - "name": "birth_day", - "description": "Day of birth.", - "type": "integer", - "minimum": 0 - }, - { - "name": "birth_month", - "description": "Month of birth.", - "type": "integer", - "minimum": 0 - }, - { - "name": "birth_year", - "description": "Year of birth.", - "type": "integer", - "minimum": 1900, - "maximum": 2100 - }, - { - "name": "online", - "description": "'1' — online only, '0' — all users", - "type": "boolean" - }, - { - "name": "has_photo", - "description": "'1' — with photo only, '0' — all users", - "type": "boolean" - }, - { - "name": "school_country", - "description": "ID of the country where users finished school.", - "type": "integer", - "minimum": 0 - }, - { - "name": "school_city", - "description": "ID of the city where users finished school.", - "type": "integer", - "minimum": 0 - }, - { - "name": "school_class", - "type": "integer", - "minimum": 0 - }, - { - "name": "school", - "description": "ID of the school.", - "type": "integer", - "minimum": 0 - }, - { - "name": "school_year", - "description": "School graduation year.", - "type": "integer", - "minimum": 0 - }, - { - "name": "religion", - "description": "Users' religious affiliation.", - "type": "string" - }, - { - "name": "interests", - "description": "Users' interests.", - "type": "string" - }, - { - "name": "company", - "description": "Name of the company where users work.", - "type": "string" - }, - { - "name": "position", - "description": "Job position.", - "type": "string" - }, - { - "name": "group_id", - "description": "ID of a community to search in communities.", - "type": "integer", - "minimum": 0 - }, - { - "name": "from_list", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/users_search_response" - } - } - }, - { - "name": "utils.checkLink", - "description": "Checks whether a link is blocked in VK.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "url", - "description": "Link to check (e.g., 'http://google.com').", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/utils_checkLink_response" - } - } - }, - { - "name": "utils.deleteFromLastShortened", - "description": "Deletes shortened link from user's list.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "key", - "description": "Link key (characters after vk.cc/).", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "utils.getLastShortenedLinks", - "description": "Returns a list of user's shortened links.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "count", - "description": "Number of links to return.", - "type": "integer", - "default": 10, - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of links.", - "type": "integer", - "default": 0, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/utils_getLastShortenedLinks_response" - } - } - }, - { - "name": "utils.getLinkStats", - "description": "Returns stats data for shortened link.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "key", - "description": "Link key (characters after vk.cc/).", - "type": "string", - "required": true - }, - { - "name": "source", - "description": "Source of scope", - "type": "string", - "default": "vk_cc", - "enum": [ - "vk_cc", - "vk_link" - ] - }, - { - "name": "access_key", - "description": "Access key for private link stats.", - "type": "string" - }, - { - "name": "interval", - "description": "Interval.", - "type": "string", - "default": "day", - "enum": [ - "day", - "forever", - "hour", - "month", - "week" - ] - }, - { - "name": "intervals_count", - "description": "Number of intervals to return.", - "type": "integer", - "default": 1, - "minimum": 0, - "maximum": 100 - }, - { - "name": "extended", - "description": "1 — to return extended stats data (sex, age, geo). 0 — to return views number only.", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/utils_getLinkStats_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/utils_getLinkStats_extended_response" - } - }, - "errors": [ - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "utils.getServerTime", - "description": "Returns the current time of the VK server.", - "access_token_type": [ - "user", - "group", - "service" - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/utils_getServerTime_response" - } - } - }, - { - "name": "utils.getShortLink", - "description": "Allows to receive a link shortened via vk.cc.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "url", - "description": "URL to be shortened.", - "type": "string", - "required": true - }, - { - "name": "private", - "description": "1 — private stats, 0 — public stats.", - "type": "boolean", - "default": false - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/utils_getShortLink_response" - } - } - }, - { - "name": "utils.resolveScreenName", - "description": "Detects a type of object (e.g., user, community, application) and its ID by screen name.", - "access_token_type": [ - "user", - "group", - "service" - ], - "parameters": [ - { - "name": "screen_name", - "description": "Screen name of the user, community (e.g., 'apiclub,' 'andrew', or 'rules_of_war'), or application.", - "type": "string", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/utils_resolveScreenName_response" - } - } - }, - { - "name": "video.add", - "description": "Adds a video to a user or community page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "target_id", - "description": "identifier of a user or community to add a video to. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the video. Use a negative value to designate a community ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - }, - { - "code": 800, - "name": "API_ERROR_VIDEO_ALREADY_ADDED", - "description": "This video is already added" - } - ] - }, - { - "name": "video.addAlbum", - "description": "Creates an empty album for videos.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID (if the album will be created in a community).", - "type": "integer", - "minimum": 0 - }, - { - "name": "title", - "description": "Album title.", - "type": "string" - }, - { - "name": "privacy", - "description": "new access permissions for the album. Possible values: , *'0' – all users,, *'1' – friends only,, *'2' – friends and friends of friends,, *'3' – \"only me\".", - "type": "array", - "items": { - "type": "string", - "enum": [ - "0", - "1", - "2", - "3" - ], - "enumNames": [ - "all", - "friends", - "friends of friends", - "only me" - ] - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_addAlbum_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - }, - { - "code": 302, - "name": "API_ERROR_ALBUMS_LIMIT", - "description": "Albums number limit is reached" - } - ] - }, - { - "name": "video.addToAlbum", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "target_id", - "type": "integer" - }, - { - "name": "album_id", - "type": "integer" - }, - { - "name": "album_ids", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "video_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - }, - { - "code": 800, - "name": "API_ERROR_VIDEO_ALREADY_ADDED", - "description": "This video is already added" - } - ] - }, - { - "name": "video.createComment", - "description": "Adds a new comment on a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true - }, - { - "name": "message", - "description": "New comment text.", - "type": "string" - }, - { - "name": "attachments", - "description": "List of objects attached to the comment, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media attachment owner. '' — Media attachment ID. Example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "from_group", - "description": "'1' — to post the comment from a community name (only if 'owner_id'<0)", - "type": "boolean" - }, - { - "name": "reply_to_comment", - "type": "integer", - "minimum": 0 - }, - { - "name": "sticker_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "guid", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_createComment_response" - } - }, - "errors": [ - { - "code": 801, - "name": "API_ERROR_VIDEO_COMMENTS_CLOSED", - "description": "Comments for this video are closed" - } - ] - }, - { - "name": "video.delete", - "description": "Deletes a video from a user or community page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "target_id", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.deleteAlbum", - "description": "Deletes a video album.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID (if the album is owned by a community).", - "type": "integer", - "minimum": 0 - }, - { - "name": "album_id", - "description": "Album ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.deleteComment", - "description": "Deletes a comment on a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "ID of the comment to be deleted.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.edit", - "description": "Edits information about a video on a user or community page.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true - }, - { - "name": "name", - "description": "New video title.", - "type": "string" - }, - { - "name": "desc", - "description": "New video description.", - "type": "string" - }, - { - "name": "privacy_view", - "description": "Privacy settings in a [vk.com/dev/privacy_setting|special format]. Privacy setting is available for videos uploaded to own profile by user.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "privacy_comment", - "description": "Privacy settings for comments in a [vk.com/dev/privacy_setting|special format].", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "no_comments", - "description": "Disable comments for the group video.", - "type": "boolean" - }, - { - "name": "repeat", - "description": "'1' — to repeat the playback of the video, '0' — to play the video once,", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.editAlbum", - "description": "Edits the title of a video album.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "group_id", - "description": "Community ID (if the album edited is owned by a community).", - "type": "integer", - "minimum": 0 - }, - { - "name": "album_id", - "description": "Album ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "title", - "description": "New album title.", - "type": "string", - "required": true - }, - { - "name": "privacy", - "description": "new access permissions for the album. Possible values: , *'0' – all users,, *'1' – friends only,, *'2' – friends and friends of friends,, *'3' – \"only me\".", - "type": "array", - "items": { - "type": "string", - "enum": [ - "0", - "1", - "2", - "3" - ], - "enumNames": [ - "all", - "friends", - "friends of friends", - "only me" - ] - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.editComment", - "description": "Edits the text of a comment on a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true - }, - { - "name": "message", - "description": "New comment text.", - "type": "string" - }, - { - "name": "attachments", - "description": "List of objects attached to the comment, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media attachment owner. '' — Media attachment ID. Example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.get", - "description": "Returns detailed information about videos.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video(s).", - "type": "integer" - }, - { - "name": "videos", - "description": "Video IDs, in the following format: \"_,_\", Use a negative value to designate a community ID. Example: \"-4363_136089719,13245770_137352259\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "album_id", - "description": "ID of the album containing the video(s).", - "type": "integer" - }, - { - "name": "count", - "description": "Number of videos to return.", - "type": "integer", - "default": 100, - "minimum": 0, - "maximum": 200 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of videos.", - "type": "integer", - "minimum": 0 - }, - { - "name": "extended", - "description": "'1' — to return an extended response with additional fields", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/video_get_extended_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.getAlbumById", - "description": "Returns video album info", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "identifier of a user or community to add a video to. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "album_id", - "description": "Album ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_getAlbumById_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.getAlbums", - "description": "Returns a list of video albums owned by a user or community.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video album(s).", - "type": "integer" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of video albums.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of video albums to return.", - "type": "integer", - "default": 50, - "minimum": 0, - "maximum": 100 - }, - { - "name": "extended", - "description": "'1' — to return additional information about album privacy settings for the current user", - "type": "boolean" - }, - { - "name": "need_system", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_getAlbums_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/video_getAlbums_extended_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.getAlbumsByVideo", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "target_id", - "type": "integer" - }, - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "video_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "extended", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_getAlbumsByVideo_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/video_getAlbumsByVideo_extended_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.getComments", - "description": "Returns a list of comments on a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "need_likes", - "description": "'1' — to return an additional 'likes' field", - "type": "boolean" - }, - { - "name": "start_comment_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of comments.", - "type": "integer" - }, - { - "name": "count", - "description": "Number of comments to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - }, - { - "name": "sort", - "description": "Sort order: 'asc' — oldest comment first, 'desc' — newest comment first", - "type": "string", - "enum": [ - "asc", - "desc" - ], - "enumNames": [ - "oldest comment first", - "newest comment first" - ] - }, - { - "name": "extended", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_getComments_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/video_getComments_extended_response" - } - }, - "errors": [ - { - "code": 801, - "name": "API_ERROR_VIDEO_COMMENTS_CLOSED", - "description": "Comments for this video are closed" - } - ] - }, - { - "name": "video.removeFromAlbum", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "target_id", - "type": "integer" - }, - { - "name": "album_id", - "type": "integer" - }, - { - "name": "album_ids", - "type": "array", - "items": { - "type": "integer" - } - }, - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "video_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.reorderAlbums", - "description": "Reorders the album in the list of user video albums.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the albums..", - "type": "integer" - }, - { - "name": "album_id", - "description": "Album ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "before", - "description": "ID of the album before which the album in question shall be placed.", - "type": "integer", - "minimum": 0 - }, - { - "name": "after", - "description": "ID of the album after which the album in question shall be placed.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - }, - { - "code": 104, - "name": "API_ERROR_NOT_FOUND", - "description": "Not found" - } - ] - }, - { - "name": "video.reorderVideos", - "description": "Reorders the video in the video album.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "target_id", - "description": "ID of the user or community that owns the album with videos.", - "type": "integer" - }, - { - "name": "album_id", - "description": "ID of the video album.", - "type": "integer" - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer", - "required": true - }, - { - "name": "video_id", - "description": "ID of the video.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "before_owner_id", - "description": "ID of the user or community that owns the video before which the video in question shall be placed.", - "type": "integer" - }, - { - "name": "before_video_id", - "description": "ID of the video before which the video in question shall be placed.", - "type": "integer", - "minimum": 0 - }, - { - "name": "after_owner_id", - "description": "ID of the user or community that owns the video after which the photo in question shall be placed.", - "type": "integer" - }, - { - "name": "after_video_id", - "description": "ID of the video after which the photo in question shall be placed.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - } - ] - }, - { - "name": "video.report", - "description": "Reports (submits a complaint about) a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer", - "required": true - }, - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Reason for the complaint: '0' – spam, '1' – child pornography, '2' – extremism, '3' – violence, '4' – drug propaganda, '5' – adult material, '6' – insult, abuse", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - }, - { - "name": "comment", - "description": "Comment describing the complaint.", - "type": "string" - }, - { - "name": "search_query", - "description": "(If the video was found in search results.) Search query string.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.reportComment", - "description": "Reports (submits a complaint about) a comment on a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "ID of the comment being reported.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Reason for the complaint: , 0 – spam , 1 – child pornography , 2 – extremism , 3 – violence , 4 – drug propaganda , 5 – adult material , 6 – insult, abuse", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.restore", - "description": "Restores a previously deleted video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "video_id", - "description": "Video ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "video.restoreComment", - "description": "Restores a previously deleted comment on a video.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the video.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "ID of the deleted comment.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_restoreComment_response" - } - } - }, - { - "name": "video.save", - "description": "Returns a server address (required for upload) and video data.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "name", - "description": "Name of the video.", - "type": "string" - }, - { - "name": "description", - "description": "Description of the video.", - "type": "string" - }, - { - "name": "is_private", - "description": "'1' — to designate the video as private (send it via a private message), the video will not appear on the user's video list and will not be available by ID for other users, '0' — not to designate the video as private", - "type": "boolean" - }, - { - "name": "wallpost", - "description": "'1' — to post the saved video on a user's wall, '0' — not to post the saved video on a user's wall", - "type": "boolean" - }, - { - "name": "link", - "description": "URL for embedding the video from an external website.", - "type": "string" - }, - { - "name": "group_id", - "description": "ID of the community in which the video will be saved. By default, the current user's page.", - "type": "integer", - "minimum": 0 - }, - { - "name": "album_id", - "description": "ID of the album to which the saved video will be added.", - "type": "integer", - "minimum": 0 - }, - { - "name": "privacy_view", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "privacy_comment", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "no_comments", - "type": "boolean" - }, - { - "name": "repeat", - "description": "'1' — to repeat the playback of the video, '0' — to play the video once,", - "type": "boolean" - }, - { - "name": "compression", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_save_response" - } - }, - "errors": [ - { - "code": 204, - "name": "API_ERROR_ACCESS_VIDEO", - "description": "Access denied" - }, - { - "code": 214, - "name": "API_ERROR_WALL_ADD_POST", - "description": "Access to adding post denied" - }, - { - "code": 219, - "name": "API_ERROR_WALL_ADS_PUBLISHED", - "description": "Advertisement post was recently added" - } - ] - }, - { - "name": "video.search", - "description": "Returns a list of videos under the set search criterion.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "q", - "description": "Search query string (e.g., 'The Beatles').", - "type": "string", - "required": true - }, - { - "name": "sort", - "description": "Sort order: '1' — by duration, '2' — by relevance, '0' — by date added", - "type": "integer", - "enum": [ - 1, - 2, - 0 - ], - "enumNames": [ - "duration", - "relevance", - "date added" - ] - }, - { - "name": "hd", - "description": "If not null, only searches for high-definition videos.", - "type": "integer" - }, - { - "name": "adult", - "description": "'1' — to disable the Safe Search filter, '0' — to enable the Safe Search filter", - "type": "boolean" - }, - { - "name": "filters", - "description": "Filters to apply: 'youtube' — return YouTube videos only, 'vimeo' — return Vimeo videos only, 'short' — return short videos only, 'long' — return long videos only", - "type": "array", - "items": { - "type": "string", - "enum": [ - "youtube", - "vimeo", - "short", - "long" - ] - } - }, - { - "name": "search_own", - "type": "boolean" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of videos.", - "type": "integer", - "minimum": 0 - }, - { - "name": "longer", - "type": "integer", - "minimum": 0 - }, - { - "name": "shorter", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of videos to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 200 - }, - { - "name": "extended", - "type": "boolean", - "default": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/video_search_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/video_search_extended_response" - } - } - }, - { - "name": "wall.closeComments", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "post_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_bool_response" - } - } - }, - { - "name": "wall.createComment", - "description": "Adds a comment to a post on a user wall or community wall.", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "Post ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "from_group", - "description": "Group ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the comment.", - "type": "string" - }, - { - "name": "reply_to_comment", - "description": "ID of comment to reply.", - "type": "integer" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of media objects attached to the comment, in the following format: \"_,_\", '' — Type of media ojbect: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media owner. '' — Media ID. For example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "sticker_id", - "description": "Sticker ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "guid", - "description": "Unique identifier to avoid repeated comments.", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_createComment_response" - } - }, - "errors": [ - { - "code": 213, - "name": "API_ERROR_WALL_ACCESS_ADD_REPLY", - "description": "Access to status replies denied" - }, - { - "code": 223, - "name": "API_ERROR_WALL_REPLY_OWNER_FLOOD", - "description": "Too many replies" - }, - { - "code": 222, - "name": "API_ERROR_WALL_LINKS_FORBIDDEN", - "description": "Hyperlinks are forbidden" - }, - { - "code": 212, - "name": "API_ERROR_WALL_ACCESS_REPLIES", - "description": "Access to post comments denied" - } - ] - }, - { - "name": "wall.delete", - "description": "Deletes a post from a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "ID of the post to be deleted.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 210, - "name": "API_ERROR_WALL_ACCESS_POST", - "description": "Access to wall's post denied" - } - ] - }, - { - "name": "wall.deleteComment", - "description": "Deletes a comment on a post on a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 211, - "name": "API_ERROR_WALL_ACCESS_COMMENT", - "description": "Access to wall's comment denied" - } - ] - }, - { - "name": "wall.edit", - "description": "Edits a post on a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "friends_only", - "type": "boolean" - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the post.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of objects attached to the post, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media application owner. '' — Media application ID. Example: \"photo100172_166443618,photo66748_265827614\", May contain a link to an external page to include in the post. Example: \"photo66748_265827614,http://habrahabr.ru\", \"NOTE: If more than one link is being attached, an error is thrown.\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "services", - "type": "string" - }, - { - "name": "signed", - "type": "boolean" - }, - { - "name": "publish_date", - "type": "integer", - "minimum": 0 - }, - { - "name": "lat", - "type": "number" - }, - { - "name": "long", - "type": "number" - }, - { - "name": "place_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "mark_as_ads", - "type": "boolean" - }, - { - "name": "close_comments", - "type": "boolean" - }, - { - "name": "poster_bkg_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "poster_bkg_owner_id", - "type": "integer" - }, - { - "name": "poster_bkg_access_hash", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_edit_response" - } - }, - "errors": [ - { - "code": 224, - "name": "API_ERROR_WALL_ADS_POST_LIMIT_REACHED", - "description": "Too many ads posts" - } - ] - }, - { - "name": "wall.editAdsStealth", - "description": "Allows to edit hidden post.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "Post ID. Used for publishing of scheduled and suggested posts.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the post.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of objects attached to the post, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, '' — ID of the media application owner. '' — Media application ID. Example: \"photo100172_166443618,photo66748_265827614\", May contain a link to an external page to include in the post. Example: \"photo66748_265827614,http://habrahabr.ru\", \"NOTE: If more than one link is being attached, an error will be thrown.\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "signed", - "description": "Only for posts in communities with 'from_group' set to '1': '1' — post will be signed with the name of the posting user, '0' — post will not be signed (default)", - "type": "boolean" - }, - { - "name": "lat", - "description": "Geographical latitude of a check-in, in degrees (from -90 to 90).", - "type": "number" - }, - { - "name": "long", - "description": "Geographical longitude of a check-in, in degrees (from -180 to 180).", - "type": "number" - }, - { - "name": "place_id", - "description": "ID of the location where the user was tagged.", - "type": "integer", - "minimum": 0 - }, - { - "name": "link_button", - "description": "Link button ID", - "type": "string" - }, - { - "name": "link_title", - "description": "Link title", - "type": "string" - }, - { - "name": "link_image", - "description": "Link image url", - "type": "string" - }, - { - "name": "link_video", - "description": "Link video ID in format \"_\"", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 224, - "name": "API_ERROR_WALL_ADS_POST_LIMIT_REACHED", - "description": "Too many ads posts" - } - ] - }, - { - "name": "wall.editComment", - "description": "Edits a comment on a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "message", - "description": "New comment text.", - "type": "string" - }, - { - "name": "attachments", - "description": "List of objects attached to the comment, in the following format: , \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, '' — ID of the media attachment owner. '' — Media attachment ID. For example: \"photo100172_166443618,photo66748_265827614\"", - "type": "array", - "items": { - "type": "string" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "wall.get", - "description": "Returns a list of posts on a user wall or community wall.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the wall. By default, current user ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "domain", - "description": "User or community short address.", - "type": "string" - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of posts.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of posts to return (maximum 100).", - "type": "integer", - "minimum": 0 - }, - { - "name": "filter", - "description": "Filter to apply: 'owner' — posts by the wall owner, 'others' — posts by someone else, 'all' — posts by the wall owner and others (default), 'postponed' — timed posts (only available for calls with an 'access_token'), 'suggests' — suggested posts on a community wall", - "type": "string", - "enum": [ - "owner", - "others", - "all", - "postponed", - "suggests" - ] - }, - { - "name": "extended", - "description": "'1' — to return 'wall', 'profiles', and 'groups' fields, '0' — to return no additional fields (default)", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_get_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/wall_get_extended_response" - } - }, - "errors": [ - { - "code": 19, - "name": "API_ERROR_BLOCKED", - "description": "Content blocked" - } - ] - }, - { - "name": "wall.getById", - "description": "Returns a list of posts from user or community walls by their IDs.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "posts", - "description": "User or community IDs and post IDs, separated by underscores. Use a negative value to designate a community ID. Example: \"93388_21539,93388_20904,2943_4276,-1_1\"", - "type": "array", - "required": true, - "items": { - "type": "string" - } - }, - { - "name": "extended", - "description": "'1' — to return user and community objects needed to display posts, '0' — no additional fields are returned (default)", - "type": "boolean" - }, - { - "name": "copy_history_depth", - "description": "Sets the number of parent elements to include in the array 'copy_history' that is returned if the post is a repost from another wall.", - "type": "integer", - "default": 2 - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_getById_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/wall_getById_extended_response" - } - } - }, - { - "name": "wall.getComments", - "description": "Returns a list of comments on a post on a user wall or community wall.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "Post ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "need_likes", - "description": "'1' — to return the 'likes' field, '0' — not to return the 'likes' field (default)", - "type": "boolean" - }, - { - "name": "start_comment_id", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of comments.", - "type": "integer" - }, - { - "name": "count", - "description": "Number of comments to return (maximum 100).", - "type": "integer", - "minimum": 0 - }, - { - "name": "sort", - "description": "Sort order: 'asc' — chronological, 'desc' — reverse chronological", - "type": "string", - "enum": [ - "asc", - "desc" - ], - "enumNames": [ - "chronological", - "reverse chronological" - ] - }, - { - "name": "preview_length", - "description": "Number of characters at which to truncate comments when previewed. By default, '90'. Specify '0' if you do not want to truncate comments.", - "type": "integer", - "minimum": 0 - }, - { - "name": "extended", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "thread_items_count", - "description": "Count items in threads.", - "type": "integer", - "default": 0, - "minimum": 0, - "maximum": 10 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_getComments_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/wall_getComments_extended_response" - } - }, - "errors": [ - { - "code": 212, - "name": "API_ERROR_WALL_ACCESS_REPLIES", - "description": "Access to post comments denied" - } - ] - }, - { - "name": "wall.getReposts", - "description": "Returns information about reposts of a post on user wall or community wall.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. By default, current user ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "Post ID.", - "type": "integer", - "minimum": 0 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of reposts.", - "type": "integer", - "minimum": 0 - }, - { - "name": "count", - "description": "Number of reposts to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 1000 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_getReposts_response" - } - } - }, - { - "name": "wall.openComments", - "access_token_type": [ - "user", - "group" - ], - "parameters": [ - { - "name": "owner_id", - "type": "integer", - "required": true - }, - { - "name": "post_id", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/base_bool_response" - } - } - }, - { - "name": "wall.pin", - "description": "Pins the post on wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the wall. By default, current user ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "Post ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "wall.post", - "description": "Adds a new post on a user wall or community wall. Can also be used to publish suggested or scheduled posts.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "friends_only", - "description": "'1' — post will be available to friends only, '0' — post will be available to all users (default)", - "type": "boolean" - }, - { - "name": "from_group", - "description": "For a community: '1' — post will be published by the community, '0' — post will be published by the user (default)", - "type": "boolean" - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the post.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of objects attached to the post, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, '' — ID of the media application owner. '' — Media application ID. Example: \"photo100172_166443618,photo66748_265827614\", May contain a link to an external page to include in the post. Example: \"photo66748_265827614,http://habrahabr.ru\", \"NOTE: If more than one link is being attached, an error will be thrown.\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "services", - "description": "List of services or websites the update will be exported to, if the user has so requested. Sample values: 'twitter', 'facebook'.", - "type": "string" - }, - { - "name": "signed", - "description": "Only for posts in communities with 'from_group' set to '1': '1' — post will be signed with the name of the posting user, '0' — post will not be signed (default)", - "type": "boolean" - }, - { - "name": "publish_date", - "description": "Publication date (in Unix time). If used, posting will be delayed until the set time.", - "type": "integer", - "minimum": 0 - }, - { - "name": "lat", - "description": "Geographical latitude of a check-in, in degrees (from -90 to 90).", - "type": "number" - }, - { - "name": "long", - "description": "Geographical longitude of a check-in, in degrees (from -180 to 180).", - "type": "number" - }, - { - "name": "place_id", - "description": "ID of the location where the user was tagged.", - "type": "integer", - "minimum": 0 - }, - { - "name": "post_id", - "description": "Post ID. Used for publishing of scheduled and suggested posts.", - "type": "integer", - "minimum": 0 - }, - { - "name": "guid", - "type": "string" - }, - { - "name": "mark_as_ads", - "type": "boolean", - "default": false - }, - { - "name": "close_comments", - "type": "boolean" - }, - { - "name": "mute_notifications", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_post_response" - } - }, - "errors": [ - { - "code": 219, - "name": "API_ERROR_WALL_ADS_PUBLISHED", - "description": "Advertisement post was recently added" - }, - { - "code": 214, - "name": "API_ERROR_WALL_ADD_POST", - "description": "Access to adding post denied" - }, - { - "code": 220, - "name": "API_ERROR_WALL_TOO_MANY_RECIPIENTS", - "description": "Too many recipients" - }, - { - "code": 222, - "name": "API_ERROR_WALL_LINKS_FORBIDDEN", - "description": "Hyperlinks are forbidden" - }, - { - "code": 224, - "name": "API_ERROR_WALL_ADS_POST_LIMIT_REACHED", - "description": "Too many ads posts" - } - ] - }, - { - "name": "wall.postAdsStealth", - "description": "Allows to create hidden post which will not be shown on the community's wall and can be used for creating an ad with type \"Community post\".", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer", - "required": true - }, - { - "name": "message", - "description": "(Required if 'attachments' is not set.) Text of the post.", - "type": "string" - }, - { - "name": "attachments", - "description": "(Required if 'message' is not set.) List of objects attached to the post, in the following format: \"_,_\", '' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, '' — ID of the media application owner. '' — Media application ID. Example: \"photo100172_166443618,photo66748_265827614\", May contain a link to an external page to include in the post. Example: \"photo66748_265827614,http://habrahabr.ru\", \"NOTE: If more than one link is being attached, an error will be thrown.\"", - "type": "array", - "items": { - "type": "string" - } - }, - { - "name": "signed", - "description": "Only for posts in communities with 'from_group' set to '1': '1' — post will be signed with the name of the posting user, '0' — post will not be signed (default)", - "type": "boolean" - }, - { - "name": "lat", - "description": "Geographical latitude of a check-in, in degrees (from -90 to 90).", - "type": "number" - }, - { - "name": "long", - "description": "Geographical longitude of a check-in, in degrees (from -180 to 180).", - "type": "number" - }, - { - "name": "place_id", - "description": "ID of the location where the user was tagged.", - "type": "integer", - "minimum": 0 - }, - { - "name": "guid", - "description": "Unique identifier to avoid duplication the same post.", - "type": "string" - }, - { - "name": "link_button", - "description": "Link button ID", - "type": "string" - }, - { - "name": "link_title", - "description": "Link title", - "type": "string" - }, - { - "name": "link_image", - "description": "Link image url", - "type": "string" - }, - { - "name": "link_video", - "description": "Link video ID in format \"_\"", - "type": "string" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_postAdsStealth_response" - } - }, - "errors": [ - { - "code": 219, - "name": "API_ERROR_WALL_ADS_PUBLISHED", - "description": "Advertisement post was recently added" - }, - { - "code": 214, - "name": "API_ERROR_WALL_ADD_POST", - "description": "Access to adding post denied" - }, - { - "code": 220, - "name": "API_ERROR_WALL_TOO_MANY_RECIPIENTS", - "description": "Too many recipients" - }, - { - "code": 222, - "name": "API_ERROR_WALL_LINKS_FORBIDDEN", - "description": "Hyperlinks are forbidden" - } - ] - }, - { - "name": "wall.reportComment", - "description": "Reports (submits a complaint about) a comment on a post on a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the wall.", - "type": "integer", - "required": true - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Reason for the complaint: '0' – spam, '1' – child pornography, '2' – extremism, '3' – violence, '4' – drug propaganda, '5' – adult material, '6' – insult, abuse", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "wall.reportPost", - "description": "Reports (submits a complaint about) a post on a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the wall.", - "type": "integer", - "required": true - }, - { - "name": "post_id", - "description": "Post ID.", - "type": "integer", - "required": true, - "minimum": 0 - }, - { - "name": "reason", - "description": "Reason for the complaint: '0' – spam, '1' – child pornography, '2' – extremism, '3' – violence, '4' – drug propaganda, '5' – adult material, '6' – insult, abuse", - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "enumNames": [ - "spam", - "child pornography", - "extremism", - "violence", - "drug propaganda", - "adult material", - "insult abuse" - ] - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "wall.repost", - "description": "Reposts (copies) an object to a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "object", - "description": "ID of the object to be reposted on the wall. Example: \"wall66748_3675\"", - "type": "string", - "required": true - }, - { - "name": "message", - "description": "Comment to be added along with the reposted object.", - "type": "string" - }, - { - "name": "group_id", - "description": "Target community ID when reposting to a community.", - "type": "integer", - "minimum": 0 - }, - { - "name": "mark_as_ads", - "type": "boolean", - "default": false - }, - { - "name": "mute_notifications", - "type": "boolean" - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_repost_response" - } - }, - "errors": [ - { - "code": 219, - "name": "API_ERROR_WALL_ADS_PUBLISHED", - "description": "Advertisement post was recently added" - }, - { - "code": 214, - "name": "API_ERROR_WALL_ADD_POST", - "description": "Access to adding post denied" - }, - { - "code": 224, - "name": "API_ERROR_WALL_ADS_POST_LIMIT_REACHED", - "description": "Too many ads posts" - } - ] - }, - { - "name": "wall.restore", - "description": "Restores a post deleted from a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID from whose wall the post was deleted. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "ID of the post to be restored.", - "type": "integer", - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 210, - "name": "API_ERROR_WALL_ACCESS_POST", - "description": "Access to wall's post denied" - }, - { - "code": 214, - "name": "API_ERROR_WALL_ADD_POST", - "description": "Access to adding post denied" - } - ] - }, - { - "name": "wall.restoreComment", - "description": "Restores a comment deleted from a user wall or community wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "User ID or community ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "comment_id", - "description": "Comment ID.", - "type": "integer", - "required": true - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - }, - "errors": [ - { - "code": 211, - "name": "API_ERROR_WALL_ACCESS_COMMENT", - "description": "Access to wall's comment denied" - } - ] - }, - { - "name": "wall.search", - "description": "Allows to search posts on user or community walls.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "owner_id", - "description": "user or community id. \"Remember that for a community 'owner_id' must be negative.\"", - "type": "integer" - }, - { - "name": "domain", - "description": "user or community screen name.", - "type": "string" - }, - { - "name": "query", - "description": "search query string.", - "type": "string" - }, - { - "name": "owners_only", - "description": "'1' – returns only page owner's posts.", - "type": "boolean" - }, - { - "name": "count", - "description": "count of posts to return.", - "type": "integer", - "default": 20, - "minimum": 0, - "maximum": 100 - }, - { - "name": "offset", - "description": "Offset needed to return a specific subset of posts.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "extended", - "description": "show extended post info.", - "type": "boolean" - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_user_group_fields" - } - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/wall_search_response" - }, - "extendedResponse": { - "$ref": "responses.json#/definitions/wall_search_extended_response" - } - }, - "errors": [ - { - "code": 210, - "name": "API_ERROR_WALL_ACCESS_POST", - "description": "Access to wall's post denied" - } - ] - }, - { - "name": "wall.unpin", - "description": "Unpins the post on wall.", - "access_token_type": [ - "user" - ], - "parameters": [ - { - "name": "owner_id", - "description": "ID of the user or community that owns the wall. By default, current user ID. Use a negative value to designate a community ID.", - "type": "integer" - }, - { - "name": "post_id", - "description": "Post ID.", - "type": "integer", - "required": true, - "minimum": 0 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/ok_response" - } - } - }, - { - "name": "widgets.getComments", - "description": "Gets a list of comments for the page added through the [vk.com/dev/Comments|Comments widget].", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "widget_api_id", - "type": "integer" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "page_id", - "type": "string" - }, - { - "name": "order", - "type": "string", - "default": "date" - }, - { - "name": "fields", - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_fields" - } - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "type": "integer", - "default": 10, - "minimum": 10, - "maximum": 200 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/widgets_getComments_response" - } - } - }, - { - "name": "widgets.getPages", - "description": "Gets a list of application/site pages where the [vk.com/dev/Comments|Comments widget] or [vk.com/dev/Like|Like widget] is installed.", - "access_token_type": [ - "user", - "service" - ], - "parameters": [ - { - "name": "widget_api_id", - "type": "integer" - }, - { - "name": "order", - "type": "string", - "default": "friend_likes" - }, - { - "name": "period", - "type": "string", - "default": "week" - }, - { - "name": "offset", - "type": "integer", - "default": 0, - "minimum": 0 - }, - { - "name": "count", - "type": "integer", - "default": 10, - "minimum": 10, - "maximum": 200 - } - ], - "responses": { - "response": { - "$ref": "responses.json#/definitions/widgets_getPages_response" - } - } - } - ] -} \ No newline at end of file diff --git a/vkapi/schemes/objects.json b/vkapi/schemes/objects.json deleted file mode 100644 index 55c3263..0000000 --- a/vkapi/schemes/objects.json +++ /dev/null @@ -1,12603 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "objects", - "definitions": { - "account_account_counters": { - "type": "object", - "properties": { - "app_requests": { - "type": "integer", - "description": "New app requests number", - "minimum": 1 - }, - "events": { - "type": "integer", - "description": "New events number", - "minimum": 1 - }, - "friends": { - "type": "integer", - "description": "New friends requests number", - "minimum": 1 - }, - "friends_suggestions": { - "type": "integer", - "description": "New friends suggestions number", - "minimum": 1 - }, - "gifts": { - "type": "integer", - "description": "New gifts number", - "minimum": 1 - }, - "groups": { - "type": "integer", - "description": "New groups number", - "minimum": 1 - }, - "messages": { - "type": "integer", - "description": "New messages number", - "minimum": 1 - }, - "notifications": { - "type": "integer", - "description": "New notifications number", - "minimum": 1 - }, - "photos": { - "type": "integer", - "description": "New photo tags number", - "minimum": 1 - }, - "videos": { - "type": "integer", - "description": "New video tags number", - "minimum": 1 - } - } - }, - "account_info": { - "type": "object", - "properties": { - "2fa_required": { - "description": "Two factor authentication is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "country": { - "type": "string", - "description": "Country code" - }, - "https_required": { - "description": "Information whether HTTPS-only is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "intro": { - "description": "Information whether user has been processed intro", - "$ref": "#/definitions/base_bool_int" - }, - "lang": { - "type": "integer", - "description": "Language ID" - }, - "no_wall_replies": { - "description": "Information whether wall comments should be hidden", - "$ref": "#/definitions/base_bool_int" - }, - "own_posts_default": { - "description": "Information whether only owners posts should be shown", - "$ref": "#/definitions/base_bool_int" - } - }, - "additionalProperties": false - }, - "account_name_request": { - "type": "object", - "properties": { - "first_name": { - "type": "string", - "description": "First name in request" - }, - "id": { - "type": "integer", - "description": "Request ID needed to cancel the request" - }, - "last_name": { - "type": "string", - "description": "Last name in request" - }, - "status": { - "$ref": "#/definitions/account_name_request_status" - }, - "lang": { - "type": "string" - } - } - }, - "account_name_request_status": { - "type": "string", - "description": "Request status", - "enum": [ - "success", - "processing", - "declined", - "was_accepted", - "was_declined" - ] - }, - "account_offer": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Offer description" - }, - "id": { - "type": "integer", - "description": "Offer ID" - }, - "img": { - "type": "string", - "format": "uri", - "description": "URL of the preview image" - }, - "instruction": { - "type": "string", - "description": "Instruction how to process the offer" - }, - "instruction_html": { - "type": "string", - "description": "Instruction how to process the offer (HTML format)" - }, - "price": { - "type": "integer", - "description": "Offer price" - }, - "short_description": { - "type": "string", - "description": "Offer short description" - }, - "tag": { - "type": "string", - "description": "Offer tag" - }, - "title": { - "type": "string", - "description": "Offer title" - } - }, - "additionalProperties": false - }, - "account_push_conversations": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Items count" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_conversations_item" - } - } - } - }, - "account_push_conversations_item": { - "type": "object", - "properties": { - "disabled_until": { - "type": "integer", - "description": "Time until that notifications are disabled in seconds" - }, - "peer_id": { - "type": "integer", - "description": "Peer ID" - }, - "sound": { - "description": "Information whether the sound are enabled", - "$ref": "#/definitions/base_bool_int" - } - }, - "required": [ - "peer_id", - "sound", - "disabled_until" - ] - }, - "account_push_params": { - "type": "object", - "properties": { - "msg": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_mode" - } - }, - "chat": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_mode" - } - }, - "like": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_settings" - } - }, - "repost": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_settings" - } - }, - "comment": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_settings" - } - }, - "mention": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_settings" - } - }, - "reply": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "new_post": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "wall_post": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "wall_publish": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "friend": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "friend_found": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "friend_accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "group_invite": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "group_accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "birthday": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "event_soon": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "app_request": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - }, - "sdk_open": { - "type": "array", - "items": { - "$ref": "#/definitions/account_push_params_onoff" - } - } - } - }, - "account_push_params_mode": { - "type": "string", - "description": "Settings parameters", - "enum": [ - "on", - "off", - "no_sound", - "no_text" - ] - }, - "account_push_params_onoff": { - "type": "string", - "description": "Settings parameters", - "enum": [ - "on", - "off" - ] - }, - "account_push_params_settings": { - "type": "string", - "description": "Settings parameters", - "enum": [ - "on", - "off", - "fr_of_fr" - ] - }, - "account_push_settings": { - "type": "object", - "properties": { - "disabled": { - "description": "Information whether notifications are disabled", - "$ref": "#/definitions/base_bool_int" - }, - "disabled_until": { - "type": "integer", - "description": "Time until that notifications are disabled in Unixtime" - }, - "settings": { - "$ref": "#/definitions/account_push_params" - }, - "conversations": { - "$ref": "#/definitions/account_push_conversations" - } - } - }, - "account_user_settings": { - "type": "object", - "allOf": [ - { - "$ref": "objects.json#/definitions/users_user_min" - }, - { - "$ref": "objects.json#/definitions/users_user_settings_xtr" - } - ] - }, - "account_user_settings_interest": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "title", - "value" - ] - }, - "account_user_settings_interests": { - "type": "object", - "properties": { - "activities": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "interests": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "music": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "tv": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "movies": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "books": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "games": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "quotes": { - "$ref": "#/definitions/account_user_settings_interest" - }, - "about": { - "$ref": "#/definitions/account_user_settings_interest" - } - } - }, - "addresses_fields": { - "type": "string", - "enum": [ - "id", - "title", - "address", - "additional_address", - "country_id", - "city_id", - "metro_station_id", - "latitude", - "longitude", - "distance", - "work_info_status", - "timetable", - "phone", - "time_offset" - ] - }, - "ads_access_role": { - "type": "string", - "description": "Current user's role", - "enum": [ - "admin", - "manager", - "reports" - ] - }, - "ads_accesses": { - "type": "object", - "properties": { - "client_id": { - "type": "string", - "description": "Client ID" - }, - "role": { - "$ref": "#/definitions/ads_access_role" - } - } - }, - "ads_account": { - "type": "object", - "properties": { - "access_role": { - "$ref": "#/definitions/ads_access_role" - }, - "account_id": { - "type": "integer", - "description": "Account ID" - }, - "account_status": { - "description": "Information whether account is active", - "$ref": "#/definitions/base_bool_int" - }, - "account_type": { - "$ref": "#/definitions/ads_account_type" - } - }, - "required": [ - "account_id", - "account_type", - "account_status", - "access_role" - ], - "additionalProperties": false - }, - "ads_account_type": { - "type": "string", - "description": "Account type", - "enum": [ - "general", - "agency" - ] - }, - "ads_ad": { - "type": "object", - "properties": { - "ad_format": { - "type": "integer", - "description": "Ad format" - }, - "ad_platform": { - "type": [ - "integer", - "string" - ], - "description": "Ad platform" - }, - "all_limit": { - "type": "integer", - "description": "Total limit" - }, - "approved": { - "$ref": "#/definitions/ads_ad_approved" - }, - "campaign_id": { - "type": "integer", - "description": "Campaign ID" - }, - "category1_id": { - "type": "integer", - "description": "Category ID" - }, - "category2_id": { - "type": "integer", - "description": "Additional category ID" - }, - "cost_type": { - "$ref": "#/definitions/ads_ad_cost_type" - }, - "cpc": { - "type": "integer", - "description": "Cost of a click, kopecks" - }, - "cpm": { - "type": "integer", - "description": "Cost of 1000 impressions, kopecks" - }, - "cpa": { - "type": "integer", - "description": "Cost of an action, kopecks" - }, - "disclaimer_medical": { - "description": "Information whether disclaimer is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "disclaimer_specialist": { - "description": "Information whether disclaimer is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "disclaimer_supplements": { - "description": "Information whether disclaimer is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "id": { - "type": "integer", - "description": "Ad ID" - }, - "impressions_limit": { - "type": "integer", - "description": "Impressions limit" - }, - "impressions_limited": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether impressions are limited" - }, - "name": { - "type": "string", - "description": "Ad title" - }, - "status": { - "$ref": "#/definitions/ads_ad_status" - }, - "video": { - "description": "Information whether the ad is a video", - "$ref": "#/definitions/base_bool_int" - } - }, - "required": [ - "id", - "campaign_id", - "ad_format", - "cost_type", - "all_limit", - "status", - "name", - "approved" - ], - "additionalProperties": false - }, - "ads_ad_approved": { - "type": "integer", - "description": "Review status", - "enum": [ - 0, - 1, - 2, - 3 - ], - "enumNames": [ - "not moderated", - "pending moderation", - "approved", - "rejected" - ] - }, - "ads_ad_cost_type": { - "type": "integer", - "description": "Cost type", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "per clicks", - "per impressions", - "per actions" - ] - }, - "ads_ad_layout": { - "type": "object", - "properties": { - "ad_format": { - "type": "integer", - "description": "Ad format" - }, - "campaign_id": { - "type": "integer", - "description": "Campaign ID" - }, - "cost_type": { - "$ref": "#/definitions/ads_ad_cost_type" - }, - "description": { - "type": "string", - "description": "Ad description" - }, - "id": { - "type": "integer", - "description": "Ad ID" - }, - "image_src": { - "type": "string", - "format": "uri", - "description": "Image URL" - }, - "image_src_2x": { - "type": "string", - "format": "uri", - "description": "URL of the preview image in double size" - }, - "link_domain": { - "type": "string", - "description": "Domain of advertised object" - }, - "link_url": { - "type": "string", - "format": "uri", - "description": "URL of advertised object" - }, - "preview_link": { - "type": [ - "integer", - "string" - ], - "description": "link to preview an ad as it is shown on the website" - }, - "title": { - "type": "string", - "description": "Ad title" - }, - "video": { - "description": "Information whether the ad is a video", - "$ref": "#/definitions/base_bool_int" - } - }, - "required": [ - "id", - "campaign_id", - "ad_format", - "cost_type", - "title", - "description", - "link_url", - "image_src" - ], - "additionalProperties": false - }, - "ads_ad_status": { - "type": "integer", - "description": "Ad atatus", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "stopped", - "started", - "deleted" - ] - }, - "ads_campaign": { - "type": "object", - "properties": { - "all_limit": { - "type": "string", - "description": "Campaign's total limit, rubles" - }, - "day_limit": { - "type": "string", - "description": "Campaign's day limit, rubles" - }, - "id": { - "type": "integer", - "description": "Campaign ID" - }, - "name": { - "type": "string", - "description": "Campaign title" - }, - "start_time": { - "type": "integer", - "description": "Campaign start time, as Unixtime" - }, - "status": { - "$ref": "#/definitions/ads_campaign_status" - }, - "stop_time": { - "type": "integer", - "description": "Campaign stop time, as Unixtime" - }, - "type": { - "$ref": "#/definitions/ads_campaign_type" - } - }, - "required": [ - "id", - "type", - "name", - "status", - "day_limit", - "all_limit", - "start_time", - "stop_time" - ], - "additionalProperties": false - }, - "ads_campaign_status": { - "type": "integer", - "description": "Campaign status", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "stopped", - "started", - "deleted" - ] - }, - "ads_campaign_type": { - "type": "string", - "description": "Campaign type", - "enum": [ - "normal", - "vk_apps_managed", - "mobile_apps", - "promoted_posts" - ] - }, - "ads_category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Category ID", - "minimum": 1 - }, - "name": { - "type": "string", - "description": "Category name" - }, - "subcategories": { - "type": "array", - "items": { - "$ref": "#/definitions/base_object_with_name" - } - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "ads_client": { - "type": "object", - "properties": { - "all_limit": { - "type": "string", - "description": "Client's total limit, rubles" - }, - "day_limit": { - "type": "string", - "description": "Client's day limit, rubles" - }, - "id": { - "type": "integer", - "description": "Client ID" - }, - "name": { - "type": "string", - "description": "Client name" - } - }, - "required": [ - "id", - "name", - "day_limit", - "all_limit" - ], - "additionalProperties": false - }, - "ads_criteria": { - "type": "object", - "properties": { - "age_from": { - "type": "integer", - "description": "Age from", - "minimum": 0 - }, - "age_to": { - "type": "integer", - "description": "Age to", - "minimum": 0 - }, - "apps": { - "type": "string", - "description": "Apps IDs" - }, - "apps_not": { - "type": "string", - "description": "Apps IDs to except" - }, - "birthday": { - "type": "integer", - "description": "Days to birthday" - }, - "cities": { - "type": "string", - "description": "Cities IDs" - }, - "cities_not": { - "type": "string", - "description": "Cities IDs to except" - }, - "country": { - "type": "integer", - "description": "Country ID", - "minimum": 0 - }, - "districts": { - "type": "string", - "description": "Districts IDs" - }, - "groups": { - "type": "string", - "description": "Communities IDs" - }, - "interest_categories": { - "type": "string", - "description": "Interests categories IDs" - }, - "interests": { - "type": "string", - "description": "Interests" - }, - "paying": { - "description": "Information whether the user has proceeded VK payments before", - "$ref": "#/definitions/base_bool_int" - }, - "positions": { - "type": "string", - "description": "Positions IDs" - }, - "religions": { - "type": "string", - "description": "Religions IDs" - }, - "retargeting_groups": { - "type": "string", - "description": "Retargeting groups IDs" - }, - "retargeting_groups_not": { - "type": "string", - "description": "Retargeting groups IDs to except" - }, - "school_from": { - "type": "integer", - "description": "School graduation year from" - }, - "school_to": { - "type": "integer", - "description": "School graduation year to" - }, - "schools": { - "type": "string", - "description": "Schools IDs" - }, - "sex": { - "$ref": "#/definitions/ads_criteria_sex" - }, - "stations": { - "type": "string", - "description": "Stations IDs" - }, - "statuses": { - "type": "string", - "description": "Relationship statuses" - }, - "streets": { - "type": "string", - "description": "Streets IDs" - }, - "travellers": { - "description": "Travellers only", - "$ref": "#/definitions/base_property_exists" - }, - "uni_from": { - "type": "integer", - "description": "University graduation year from" - }, - "uni_to": { - "type": "integer", - "description": "University graduation year to" - }, - "user_browsers": { - "type": "string", - "description": "Browsers" - }, - "user_devices": { - "type": "string", - "description": "Devices" - }, - "user_os": { - "type": "string", - "description": "Operating systems" - } - }, - "additionalProperties": false - }, - "ads_criteria_sex": { - "type": "integer", - "description": "Sex", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "any", - "male", - "female" - ] - }, - "ads_demo_stats": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "stats": { - "$ref": "#/definitions/ads_demostats_format" - }, - "type": { - "$ref": "#/definitions/ads_object_type" - } - }, - "additionalProperties": false - }, - "ads_demostats_format": { - "type": "object", - "properties": { - "age": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_stats_age" - } - }, - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_stats_cities" - } - }, - "day": { - "type": "string", - "description": "Day as YYYY-MM-DD" - }, - "month": { - "type": "string", - "description": "Month as YYYY-MM" - }, - "overall": { - "type": "integer", - "description": "1 if period=overall" - }, - "sex": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_stats_sex" - } - }, - "sex_age": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_stats_sex_age" - } - } - }, - "additionalProperties": false - }, - "ads_flood_stats": { - "type": "object", - "properties": { - "left": { - "type": "integer", - "description": "Requests left" - }, - "refresh": { - "type": "integer", - "description": "Time to refresh in seconds" - } - }, - "required": [ - "left", - "refresh" - ], - "additionalProperties": false - }, - "ads_link_status": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Reject reason" - }, - "redirect_url": { - "type": "string", - "format": "uri", - "description": "URL" - }, - "status": { - "type": "string", - "description": "Link status" - } - }, - "required": [ - "status", - "description", - "redirect_url" - ], - "additionalProperties": false - }, - "ads_object_type": { - "type": "string", - "description": "Object type", - "enum": [ - "ad", - "campaign", - "client", - "office" - ] - }, - "ads_paragraphs": { - "type": "object", - "properties": { - "paragraph": { - "type": "string", - "description": "Rules paragraph" - } - } - }, - "ads_promoted_post_reach": { - "type": "object", - "properties": { - "hide": { - "type": "integer", - "description": "Hides amount" - }, - "id": { - "type": "integer", - "description": "Object ID from 'ids' parameter" - }, - "join_group": { - "type": "integer", - "description": "Community joins" - }, - "links": { - "type": "integer", - "description": "Link clicks" - }, - "reach_subscribers": { - "type": "integer", - "description": "Subscribers reach" - }, - "reach_total": { - "type": "integer", - "description": "Total reach" - }, - "report": { - "type": "integer", - "description": "Reports amount" - }, - "to_group": { - "type": "integer", - "description": "Community clicks" - }, - "unsubscribe": { - "type": "integer", - "description": "'Unsubscribe' events amount" - }, - "video_views_100p": { - "type": "integer", - "description": "Video views for 100 percent" - }, - "video_views_25p": { - "type": "integer", - "description": "Video views for 25 percent" - }, - "video_views_3s": { - "type": "integer", - "description": "Video views for 3 seconds" - }, - "video_views_50p": { - "type": "integer", - "description": "Video views for 50 percent" - }, - "video_views_75p": { - "type": "integer", - "description": "Video views for 75 percent" - }, - "video_views_start": { - "type": "integer", - "description": "Video starts" - } - }, - "required": [ - "id", - "reach_subscribers", - "reach_total", - "links", - "to_group", - "join_group", - "report", - "hide", - "unsubscribe" - ], - "additionalProperties": false - }, - "ads_reject_reason": { - "type": "object", - "properties": { - "comment": { - "type": "string", - "description": "Comment text" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_rules" - } - } - }, - "additionalProperties": false - }, - "ads_rules": { - "type": "object", - "properties": { - "paragraphs": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_paragraphs" - } - }, - "title": { - "type": "string", - "description": "Comment" - } - } - }, - "ads_stats": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "stats": { - "$ref": "#/definitions/ads_stats_format" - }, - "type": { - "$ref": "#/definitions/ads_object_type" - } - }, - "additionalProperties": false - }, - "ads_stats_age": { - "type": "object", - "properties": { - "clicks_rate": { - "type": "number", - "description": "Clicks rate" - }, - "impressions_rate": { - "type": "number", - "description": "Impressions rate" - }, - "value": { - "type": "string", - "description": "Age interval" - } - } - }, - "ads_stats_cities": { - "type": "object", - "properties": { - "clicks_rate": { - "type": "number", - "description": "Clicks rate" - }, - "impressions_rate": { - "type": "number", - "description": "Impressions rate" - }, - "name": { - "type": "string", - "description": "City name" - }, - "value": { - "type": "integer", - "description": "City ID" - } - } - }, - "ads_stats_format": { - "type": "object", - "properties": { - "clicks": { - "type": "integer", - "description": "Clicks number" - }, - "day": { - "type": "string", - "description": "Day as YYYY-MM-DD" - }, - "impressions": { - "type": "integer", - "description": "Impressions number" - }, - "join_rate": { - "type": "integer", - "description": "Events number" - }, - "month": { - "type": "string", - "description": "Month as YYYY-MM" - }, - "overall": { - "type": "integer", - "description": "1 if period=overall" - }, - "reach": { - "type": "integer", - "description": "Reach " - }, - "spent": { - "type": "integer", - "description": "Spent funds" - }, - "video_clicks_site": { - "type": "integer", - "description": "Clickthoughs to the advertised site" - }, - "video_views": { - "type": "integer", - "description": "Video views number" - }, - "video_views_full": { - "type": "integer", - "description": "Video views (full video)" - }, - "video_views_half": { - "type": "integer", - "description": "Video views (half of video)" - } - } - }, - "ads_stats_sex": { - "type": "object", - "properties": { - "clicks_rate": { - "type": "number", - "description": "Clicks rate" - }, - "impressions_rate": { - "type": "number", - "description": "Impressions rate" - }, - "value": { - "$ref": "#/definitions/ads_stats_sex_value" - } - } - }, - "ads_stats_sex_age": { - "type": "object", - "properties": { - "clicks_rate": { - "type": "number", - "description": "Clicks rate" - }, - "impressions_rate": { - "type": "number", - "description": "Impressions rate" - }, - "value": { - "type": "string", - "description": "Sex and age interval" - } - } - }, - "ads_stats_sex_value": { - "type": "string", - "description": "Sex", - "enum": [ - "f", - "m" - ], - "enumNames": [ - "female", - "male" - ] - }, - "ads_targ_settings": { - "type": "object", - "allOf": [ - { - "properties": { - "id": { - "type": "integer", - "description": "Ad ID" - }, - "campaign_id": { - "type": "integer", - "description": "Campaign ID" - } - } - }, - { - "$ref": "#/definitions/ads_criteria" - } - ] - }, - "ads_targ_stats": { - "type": "object", - "properties": { - "audience_count": { - "type": "integer", - "description": "Audience" - }, - "recommended_cpc": { - "type": "number", - "description": "Recommended CPC value" - }, - "recommended_cpm": { - "type": "number", - "description": "Recommended CPM value" - } - }, - "required": [ - "audience_count" - ], - "additionalProperties": false - }, - "ads_targ_suggestions": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "name": { - "type": "string", - "description": "Object name" - } - }, - "additionalProperties": false - }, - "ads_targ_suggestions_cities": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "name": { - "type": "string", - "description": "Object name" - }, - "parent": { - "type": "string", - "description": "Parent object" - } - }, - "additionalProperties": false - }, - "ads_targ_suggestions_regions": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "name": { - "type": "string", - "description": "Object name" - }, - "type": { - "type": "string", - "description": "Object type" - } - }, - "additionalProperties": false - }, - "ads_targ_suggestions_schools": { - "type": "object", - "properties": { - "desc": { - "type": "string", - "description": "Full school title" - }, - "id": { - "type": "integer", - "description": "School ID" - }, - "name": { - "type": "string", - "description": "School title" - }, - "parent": { - "type": "string", - "description": "City name" - }, - "type": { - "$ref": "#/definitions/ads_targ_suggestions_schools_type" - } - }, - "additionalProperties": false - }, - "ads_targ_suggestions_schools_type": { - "type": "string", - "description": "School type", - "enum": [ - "school", - "university", - "faculty", - "chair" - ] - }, - "ads_target_group": { - "type": "object", - "properties": { - "audience_count": { - "type": "integer", - "description": "Audience" - }, - "domain": { - "type": "string", - "description": "Site domain" - }, - "id": { - "type": "integer", - "description": "Group ID" - }, - "lifetime": { - "type": "integer", - "description": "Number of days for user to be in group" - }, - "name": { - "type": "string", - "description": "Group name" - }, - "pixel": { - "type": "string", - "description": "Pixel code" - } - }, - "additionalProperties": false - }, - "ads_users": { - "type": "object", - "properties": { - "accesses": { - "type": "array", - "items": { - "$ref": "#/definitions/ads_accesses" - } - }, - "user_id": { - "type": "integer", - "description": "User ID" - } - }, - "required": [ - "user_id", - "accesses" - ], - "additionalProperties": false - }, - "apps_app": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/apps_app_min" - }, - { - "properties": { - "author_group": { - "type": "integer", - "description": "Official community's ID" - }, - "author_url": { - "type": "string", - "format": "uri", - "description": "Application author's URL" - }, - "banner_1120": { - "type": "string", - "format": "uri", - "description": "URL of the app banner with 1120 px in width" - }, - "banner_560": { - "type": "string", - "format": "uri", - "description": "URL of the app banner with 560 px in width" - }, - "friends": { - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - } - }, - "catalog_position": { - "type": "integer", - "description": "Catalog position" - }, - "description": { - "type": "string", - "description": "Application description" - }, - "genre": { - "type": "string", - "description": "Genre name" - }, - "genre_id": { - "type": "integer", - "description": "Genre ID" - }, - "international": { - "type": "integer", - "description": "Information whether the application is multilanguage" - }, - "is_in_catalog": { - "type": "integer", - "description": "Information whether application is in mobile catalog" - }, - "leaderboard_type": { - "$ref": "#/definitions/apps_app_leaderboard_type" - }, - "members_count": { - "type": "integer", - "description": "Members number" - }, - "platform_id": { - "type": "integer", - "description": "Application ID in store" - }, - "published_date": { - "type": "integer", - "description": "Date when the application has been published in Unixtime" - }, - "screen_name": { - "type": "string", - "description": "Screen name" - }, - "screenshots": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo" - } - }, - "section": { - "type": "string", - "description": "Application section name" - } - } - } - ] - }, - "apps_app_leaderboard_type": { - "type": "integer", - "description": "Leaderboard type", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "not supported", - "levels", - "points" - ] - }, - "apps_app_min": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/apps_app_type" - }, - "id": { - "type": "integer", - "description": "Application ID", - "minimum": 0 - }, - "title": { - "type": "string", - "description": "Application title" - }, - "author_id": { - "type": "integer", - "description": "Application author's ID" - }, - "icon_139": { - "type": "string", - "format": "uri", - "description": "URL of the app icon with 139 px in width" - }, - "icon_150": { - "type": "string", - "format": "uri", - "description": "URL of the app icon with 150 px in width" - }, - "icon_278": { - "type": "string", - "format": "uri", - "description": "URL of the app icon with 278 px in width" - }, - "icon_75": { - "type": "string", - "format": "uri", - "description": "URL of the app icon with 75 px in width" - } - }, - "required": [ - "id", - "title", - "type" - ] - }, - "apps_app_type": { - "type": "string", - "description": "Application type", - "enum": [ - "app", - "game", - "site", - "standalone", - "vk_app", - "community_app", - "html5_game" - ] - }, - "apps_leaderboard": { - "type": "object", - "properties": { - "level": { - "type": "integer", - "description": "Level" - }, - "points": { - "type": "integer", - "description": "Points number" - }, - "score": { - "type": "integer", - "description": "Score number" - }, - "user_id": { - "type": "integer", - "description": "User ID" - } - }, - "required": [ - "user_id" - ] - }, - "apps_scope": { - "type": "object", - "description": "Scope description", - "properties": { - "name": { - "type": "string", - "description": "Scope name" - }, - "title": { - "type": "string", - "description": "Scope title" - } - }, - "required": [ - "name" - ], - "additionalProperties": false - }, - "audio_audio": { - "type": "object", - "properties": { - "artist": { - "type": "string", - "description": "Artist name" - }, - "id": { - "type": "integer", - "description": "Audio ID", - "minimum": 0 - }, - "title": { - "type": "string", - "description": "Title" - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL of mp3 file" - }, - "duration": { - "type": "integer", - "description": "Duration in seconds", - "minimum": 0 - }, - "date": { - "type": "integer", - "description": "Date when uploaded", - "minimum": 0 - }, - "album_id": { - "type": "integer", - "description": "Album ID", - "minimum": 0 - }, - "genre_id": { - "type": "integer", - "description": "Genre ID", - "minimum": 0 - }, - "performer": { - "type": "string", - "description": "Performer name" - } - }, - "required": [ - "id", - "owner_id", - "duration", - "artist", - "title" - ], - "additionalProperties": false - }, - "base_bool_int": { - "type": "integer", - "enum": [ - 0, - 1 - ], - "enumNames": [ - "no", - "yes" - ] - }, - "base_city": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "City ID", - "minimum": 1 - }, - "title": { - "type": "string", - "description": "City title" - } - }, - "required": [ - "id", - "title" - ] - }, - "base_comments_info": { - "type": "object", - "properties": { - "can_post": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can comment the post" - }, - "count": { - "type": "integer", - "minimum": 0, - "description": "Comments number" - }, - "groups_can_post": { - "type": "boolean", - "description": "Information whether groups can comment the post" - } - } - }, - "base_country": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Country ID", - "minimum": 1 - }, - "title": { - "type": "string", - "description": "Country title" - } - }, - "required": [ - "id", - "title" - ], - "additionalProperties": false - }, - "base_error": { - "type": "object", - "properties": { - "error_code": { - "type": "integer", - "description": "Error code" - }, - "error_msg": { - "type": "string", - "description": "Error message" - }, - "request_params": { - "type": "array", - "items": { - "$ref": "#/definitions/base_request_param" - } - } - }, - "withoutRefs": true - }, - "base_geo": { - "type": "object", - "properties": { - "coordinates": { - "$ref": "#/definitions/base_geo_coordinates" - }, - "place": { - "$ref": "#/definitions/base_place" - }, - "showmap": { - "type": "integer", - "description": "Information whether a map is showed" - }, - "type": { - "type": "string", - "description": "Place type" - } - } - }, - "base_geo_coordinates": { - "type": "object", - "properties": { - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - } - }, - "required": [ - "latitude", - "longitude" - ], - "additionalProperties": false - }, - "base_image": { - "type": "object", - "properties": { - "height": { - "type": "integer", - "description": "Image height", - "minimum": 0 - }, - "url": { - "type": "string", - "format": "uri", - "description": "Image url" - }, - "width": { - "type": "integer", - "description": "Image width", - "minimum": 0 - } - }, - "required": [ - "url", - "width", - "height" - ], - "additionalProperties": false - }, - "base_likes": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Likes number" - }, - "user_likes": { - "description": "Information whether current user likes the photo", - "$ref": "#/definitions/base_bool_int" - } - }, - "additionalProperties": false - }, - "base_likes_info": { - "type": "object", - "properties": { - "can_like": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can like the post" - }, - "can_publish": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can repost" - }, - "count": { - "type": "integer", - "minimum": 0, - "description": "Likes number" - }, - "user_likes": { - "type": "integer", - "description": "Information whether current uer has liked the post" - } - }, - "required": [ - "count", - "user_likes", - "can_like" - ], - "additionalProperties": false - }, - "base_link": { - "type": "object", - "properties": { - "application": { - "$ref": "#/definitions/base_link_application" - }, - "button": { - "$ref": "#/definitions/base_link_button" - }, - "caption": { - "type": "string", - "description": "Link caption" - }, - "description": { - "type": "string", - "description": "Link description" - }, - "id": { - "type": "string", - "description": "Link ID" - }, - "is_favorite": { - "type": "boolean" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "preview_page": { - "type": "string", - "description": "String ID of the page with article preview" - }, - "preview_url": { - "type": "string", - "format": "uri", - "description": "URL of the page with article preview" - }, - "product": { - "$ref": "#/definitions/base_link_product" - }, - "rating": { - "$ref": "#/definitions/base_link_rating" - }, - "title": { - "type": "string", - "description": "Link title" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Link URL" - } - }, - "required": [ - "url" - ], - "additionalProperties": false - }, - "base_link_application": { - "type": "object", - "properties": { - "app_id": { - "type": "number", - "description": "Application Id" - }, - "store": { - "$ref": "#/definitions/base_link_application_store" - } - }, - "additionalProperties": false - }, - "base_link_application_store": { - "type": "object", - "properties": { - "id": { - "type": "number", - "description": "Store Id" - }, - "name": { - "type": "string", - "description": "Store name" - } - }, - "additionalProperties": false - }, - "base_link_button": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/base_link_button_action", - "description": "Button action" - }, - "title": { - "type": "string", - "description": "Button title" - } - }, - "additionalProperties": false - }, - "base_link_button_action": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/base_link_button_action_type" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Action URL" - } - }, - "additionalProperties": false - }, - "base_link_button_action_type": { - "type": "string", - "description": "Action type", - "enum": [ - "open_url" - ], - "enumNames": [ - "open_url" - ] - }, - "base_link_product": { - "type": "object", - "properties": { - "price": { - "$ref": "#/definitions/market_price" - }, - "merchant": { - "type": "string" - }, - "orders_count": { - "type": "integer" - } - }, - "required": [ - "price" - ], - "additionalProperties": false - }, - "base_link_rating": { - "type": "object", - "properties": { - "reviews_count": { - "type": "integer", - "description": "Count of reviews" - }, - "stars": { - "type": "number", - "description": "Count of stars" - } - }, - "additionalProperties": false - }, - "base_message_error": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "Error code" - }, - "description": { - "type": "string", - "description": "Error message" - } - }, - "withoutRefs": true - }, - "base_object": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "title": { - "type": "string", - "description": "Object title" - } - }, - "required": [ - "id", - "title" - ], - "additionalProperties": false - }, - "base_object_count": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Items count" - } - } - }, - "base_object_with_name": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Object ID" - }, - "name": { - "type": "string", - "description": "Object name" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "base_ok_response": { - "type": "integer", - "description": "Returns 1 if request has been processed successfully", - "enum": [ - 1 - ], - "enumNames": [ - "ok" - ] - }, - "base_place": { - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "Place address" - }, - "checkins": { - "type": "integer", - "description": "Checkins number" - }, - "city": { - "type": "string", - "description": "City name" - }, - "country": { - "type": "string", - "description": "Country name" - }, - "created": { - "type": "integer", - "description": "Date of the place creation in Unixtime" - }, - "icon": { - "type": "string", - "format": "uri", - "description": "URL of the place's icon" - }, - "id": { - "type": "integer", - "description": "Place ID" - }, - "latitude": { - "type": "number", - "description": "Place latitude" - }, - "longitude": { - "type": "number", - "description": "Place longitude" - }, - "title": { - "type": "string", - "description": "Place title" - }, - "type": { - "type": "string", - "description": "Place type" - } - } - }, - "base_property_exists": { - "type": "integer", - "enum": [ - 1 - ], - "enumNames": [ - "Property exists" - ] - }, - "base_reposts_info": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Reposts number" - }, - "user_reposted": { - "type": "integer", - "description": "Information whether current user has reposted the post" - } - } - }, - "base_request_param": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Parameter name" - }, - "value": { - "type": "string", - "description": "Parameter value" - } - } - }, - "base_sex": { - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "unknown", - "female", - "male" - ] - }, - "base_sticker": { - "type": "object", - "properties": { - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/base_image" - } - }, - "images_with_background": { - "type": "array", - "items": { - "$ref": "#/definitions/base_image" - } - }, - "product_id": { - "type": "integer", - "description": "Collection ID" - }, - "sticker_id": { - "type": "integer", - "description": "Sticker ID" - } - }, - "additionalProperties": false - }, - "base_upload_server": { - "type": "object", - "properties": { - "upload_url": { - "type": "string", - "format": "uri", - "description": "Upload URL" - } - }, - "required": [ - "upload_url" - ], - "additionalProperties": false - }, - "base_user_group_fields": { - "type": "string", - "enum": [ - "about", - "action_button", - "activities", - "activity", - "addresses", - "admin_level", - "age_limits", - "author_id", - "ban_info", - "bdate", - "blacklisted", - "blacklisted_by_me", - "books", - "can_create_topic", - "can_message", - "can_post", - "can_see_all_posts", - "can_see_audio", - "can_send_friend_request", - "can_upload_video", - "can_write_private_message", - "career", - "city", - "common_count", - "connections", - "contacts", - "counters", - "country", - "cover", - "crop_photo", - "deactivated", - "description", - "domain", - "education", - "exports", - "finish_date", - "fixed_post", - "followers_count", - "friend_status", - "games", - "has_market_app", - "has_mobile", - "has_photo", - "home_town", - "id", - "interests", - "is_admin", - "is_closed", - "is_favorite", - "is_friend", - "is_hidden_from_feed", - "is_member", - "is_messages_blocked", - "can_send_notify", - "is_subscribed", - "last_seen", - "links", - "lists", - "maiden_name", - "main_album_id", - "main_section", - "market", - "member_status", - "members_count", - "military", - "movies", - "music", - "name", - "nickname", - "occupation", - "online", - "online_status", - "personal", - "phone", - "photo_100", - "photo_200", - "photo_200_orig", - "photo_400_orig", - "photo_50", - "photo_id", - "photo_max", - "photo_max_orig", - "quotes", - "relation", - "relatives", - "schools", - "screen_name", - "sex", - "site", - "start_date", - "status", - "timezone", - "trending", - "tv", - "type", - "universities", - "verified", - "wall_comments", - "wiki_page", - "vk_admin_status" - ] - }, - "base_user_id": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "description": "User ID" - } - } - }, - "board_default_order": { - "type": "integer", - "description": "Sort type", - "enum": [ - 1, - 2, - -1, - -2 - ], - "enumNames": [ - "desc_updated", - "desc_created", - "asc_updated", - "asc_created" - ] - }, - "board_topic": { - "type": "object", - "properties": { - "comments": { - "type": "integer", - "description": "Comments number" - }, - "created": { - "type": "integer", - "description": "Date when the topic has been created in Unixtime" - }, - "created_by": { - "type": "integer", - "description": "Creator ID" - }, - "id": { - "type": "integer", - "description": "Topic ID" - }, - "is_closed": { - "description": "Information whether the topic is closed", - "$ref": "#/definitions/base_bool_int" - }, - "is_fixed": { - "description": "Information whether the topic is fixed", - "$ref": "#/definitions/base_bool_int" - }, - "title": { - "type": "string", - "description": "Topic title" - }, - "updated": { - "type": "integer", - "description": "Date when the topic has been updated in Unixtime" - }, - "updated_by": { - "type": "integer", - "description": "ID of user who updated the topic" - } - } - }, - "board_topic_comment": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_comment_attachment" - } - }, - "date": { - "type": "integer", - "description": "Date when the comment has been added in Unixtime", - "minimum": 0 - }, - "from_id": { - "type": "integer", - "description": "Author ID" - }, - "id": { - "type": "integer", - "description": "Comment ID", - "minimum": 1 - }, - "real_offset": { - "type": "integer", - "description": "Real position of the comment" - }, - "text": { - "type": "string", - "description": "Comment text" - } - }, - "required": [ - "id", - "from_id", - "date", - "text" - ], - "additionalProperties": false - }, - "board_topic_poll": { - "type": "object", - "properties": { - "answer_id": { - "type": "integer", - "description": "Current user's answer ID", - "minimum": 0 - }, - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/polls_answer" - } - }, - "created": { - "type": "integer", - "description": "Date when poll has been created in Unixtime", - "minimum": 0 - }, - "is_closed": { - "description": "Information whether the poll is closed", - "$ref": "#/definitions/base_bool_int" - }, - "owner_id": { - "type": "integer", - "description": "Poll owner's ID" - }, - "poll_id": { - "type": "integer", - "description": "Poll ID", - "minimum": 1 - }, - "question": { - "type": "string", - "description": "Poll question" - }, - "votes": { - "type": "string", - "description": "Votes number", - "minimum": 0 - } - }, - "required": [ - "poll_id", - "owner_id", - "created", - "question", - "votes", - "answer_id", - "answers" - ], - "additionalProperties": false - }, - "callback_board_post_delete": { - "type": "object", - "properties": { - "topic_owner_id": { - "type": "integer", - "minimum": 0 - }, - "topic_id": { - "type": "integer", - "minimum": 0 - }, - "id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "topic_owner_id", - "topic_id", - "id" - ], - "withoutRefs": true - }, - "callback_confirmation_message": { - "type": "object", - "properties": { - "type": { - "$ref": "objects.json#/definitions/callback_message_type" - }, - "group_id": { - "type": "integer" - }, - "secret": { - "type": "string" - } - }, - "required": [ - "type", - "group_id", - "secret" - ], - "withoutRefs": true - }, - "callback_group_change_photo": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "minimum": 0 - }, - "photo": { - "$ref": "#/definitions/photos_photo" - } - }, - "required": [ - "user_id", - "photo" - ], - "withoutRefs": true - }, - "callback_group_change_settings": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "minimum": 0 - }, - "self": { - "$ref": "#/definitions/base_bool_int" - } - }, - "required": [ - "user_id", - "self" - ], - "withoutRefs": true - }, - "callback_group_join": { - "type": "object", - "properties": { - "user_id": { - "type": "integer" - }, - "join_type": { - "$ref": "objects.json#/definitions/callback_group_join_type" - } - }, - "required": [ - "user_id", - "join_type" - ], - "withoutRefs": true - }, - "callback_group_join_type": { - "type": "string", - "enum": [ - "join", - "unsure", - "accepted", - "approved", - "request" - ], - "withoutRefs": true - }, - "callback_group_leave": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "minimum": 0 - }, - "self": { - "$ref": "#/definitions/base_bool_int" - } - }, - "withoutRefs": true - }, - "callback_group_market": { - "type": "integer", - "enum": [ - 0, - 1 - ], - "enumNames": [ - "disabled", - "open" - ], - "withoutRefs": true - }, - "callback_group_officer_role": { - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3 - ], - "enumNames": [ - "none", - "moderator", - "editor", - "administrator" - ], - "withoutRefs": true - }, - "callback_group_officers_edit": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "minimum": 0 - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "level_old": { - "$ref": "objects.json#/definitions/callback_group_officer_role" - }, - "level_new": { - "$ref": "objects.json#/definitions/callback_group_officer_role" - } - }, - "required": [ - "admin_id", - "user_id", - "level_old", - "level_new" - ], - "withoutRefs": true - }, - "callback_group_settings_changes": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "access": { - "$ref": "#/definitions/groups_group_is_closed" - }, - "screen_name": { - "type": "string" - }, - "public_category": { - "type": "integer" - }, - "public_subcategory": { - "type": "integer" - }, - "age_limits": { - "$ref": "#/definitions/groups_group_full_age_limits" - }, - "website": { - "type": "string" - }, - "enable_status_default": { - "$ref": "objects.json#/definitions/groups_group_wall" - }, - "enable_audio": { - "$ref": "objects.json#/definitions/groups_group_audio" - }, - "enable_video": { - "$ref": "objects.json#/definitions/groups_group_video" - }, - "enable_photo": { - "$ref": "objects.json#/definitions/groups_group_photos" - }, - "enable_market": { - "$ref": "objects.json#/definitions/callback_group_market" - } - }, - "withoutRefs": true - }, - "callback_market_comment": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": 0 - }, - "from_id": { - "type": "integer" - }, - "date": { - "type": "integer", - "minimum": 0 - }, - "text": { - "type": "string" - }, - "market_owner_od": { - "type": "integer" - }, - "photo_id": { - "type": "integer" - } - }, - "required": [ - "id", - "from_id", - "date" - ], - "withoutRefs": true - }, - "callback_market_comment_delete": { - "type": "object", - "properties": { - "owner_id": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "item_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "owner_id", - "id", - "user_id", - "item_id" - ], - "withoutRefs": true - }, - "callback_message_allow": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "minimum": 0 - }, - "key": { - "type": "string" - } - }, - "required": [ - "user_id", - "key" - ], - "withoutRefs": true - }, - "callback_message_base": { - "type": "object", - "properties": { - "type": { - "$ref": "objects.json#/definitions/callback_message_type" - }, - "object": { - "type": "object" - }, - "group_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "type", - "object", - "group_id" - ], - "withoutRefs": true - }, - "callback_message_deny": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "user_id" - ], - "withoutRefs": true - }, - "callback_message_type": { - "type": "string", - "enum": [ - "confirmation", - "group_change_photo", - "group_change_settings", - "group_officers_edit", - "lead_forms_new", - "market_comment_delete", - "market_comment_edit", - "market_comment_restore", - "message_allow", - "message_deny", - "message_read", - "message_reply", - "message_typing_state", - "messages_edit", - "photo_comment_delete", - "photo_comment_edit", - "photo_comment_restore", - "poll_vote_new", - "user_block", - "user_unblock", - "video_comment_delete", - "video_comment_edit", - "video_comment_restore", - "wall_reply_delete", - "wall_reply_restore", - "wall_repost" - ], - "withoutRefs": true - }, - "callback_photo_comment": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": 0 - }, - "from_id": { - "type": "integer", - "minimum": 0 - }, - "date": { - "type": "integer", - "minimum": 0 - }, - "text": { - "type": "string" - }, - "photo_owner_od": { - "type": "integer" - } - }, - "required": [ - "id", - "from_id", - "date", - "text", - "photo_owner_od" - ], - "withoutRefs": true - }, - "callback_photo_comment_delete": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": 0 - }, - "owner_id": { - "type": "integer", - "minimum": 0 - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "photo_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "id", - "owner_id", - "user_id", - "photo_id" - ], - "withoutRefs": true - }, - "callback_poll_vote_new": { - "type": "object", - "properties": { - "owner_id": { - "type": "integer" - }, - "poll_id": { - "type": "integer", - "minimum": 0 - }, - "option_id": { - "type": "integer", - "minimum": 0 - }, - "user_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "owner_id", - "poll_id", - "option_id", - "user_id" - ], - "withoutRefs": true - }, - "callback_user_block": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "minimum": 0 - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "unblock_date": { - "type": "integer", - "minimum": 0 - }, - "reason": { - "type": "integer", - "minimum": 0 - }, - "comment": { - "type": "string" - } - }, - "required": [ - "admin_id", - "user_id", - "unblock_date", - "reason" - ], - "withoutRefs": true - }, - "callback_user_unblock": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "minimum": 0 - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "by_end_date": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "admin_id", - "user_id", - "by_end_date" - ], - "withoutRefs": true - }, - "callback_video_comment": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": 0 - }, - "from_id": { - "type": "integer" - }, - "date": { - "type": "integer", - "minimum": 0 - }, - "text": { - "type": "string" - }, - "video_owner_od": { - "type": "integer" - } - }, - "required": [ - "id", - "from_id", - "date", - "text", - "video_owner_od" - ], - "withoutRefs": true - }, - "callback_video_comment_delete": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": 0 - }, - "owner_id": { - "type": "integer" - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "video_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "id", - "owner_id", - "user_id", - "video_id" - ], - "withoutRefs": true - }, - "callback_wall_comment_delete": { - "type": "object", - "properties": { - "owner_id": { - "type": "integer" - }, - "id": { - "type": "integer", - "minimum": 0 - }, - "user_id": { - "type": "integer", - "minimum": 0 - }, - "post_id": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "owner_id", - "id", - "user_id", - "post_id" - ], - "withoutRefs": true - }, - "comment_thread": { - "type": "object", - "properties": { - "can_post": { - "type": "boolean", - "description": "Information whether current user can comment the post" - }, - "count": { - "type": "integer", - "description": "Comments number", - "minimum": 0 - }, - "groups_can_post": { - "type": "boolean", - "description": "Information whether groups can comment the post" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - }, - "show_reply_button": { - "type": "boolean", - "description": "Information whether recommended to display reply button" - } - }, - "required": [ - "count" - ] - }, - "database_city": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/base_object" - }, - { - "properties": { - "area": { - "type": "string", - "description": "Area title" - }, - "region": { - "type": "string", - "description": "Region title" - }, - "important": { - "description": "Information whether the city is included in important cities list", - "$ref": "#/definitions/base_bool_int" - } - }, - "additionalProperties": false - } - ] - }, - "database_faculty": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Faculty ID" - }, - "title": { - "type": "string", - "description": "Faculty title" - } - } - }, - "database_region": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Region ID" - }, - "title": { - "type": "string", - "description": "Region title" - } - } - }, - "database_school": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "School ID" - }, - "title": { - "type": "string", - "description": "School title" - } - } - }, - "database_station": { - "type": "object", - "properties": { - "city_id": { - "type": "integer", - "description": "City ID", - "minimum": 1 - }, - "color": { - "type": "string", - "description": "Hex color code without #" - }, - "id": { - "type": "integer", - "description": "Station ID", - "minimum": 1 - }, - "name": { - "type": "string", - "description": "Station name" - } - }, - "required": [ - "id", - "name" - ] - }, - "database_university": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "University ID" - }, - "title": { - "type": "string", - "description": "University title" - } - } - }, - "docs_doc": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the document" - }, - "date": { - "type": "integer", - "description": "Date when file has been uploaded in Unixtime", - "minimum": 0 - }, - "ext": { - "type": "string", - "description": "File extension" - }, - "id": { - "type": "integer", - "description": "Document ID", - "minimum": 0 - }, - "is_licensed": { - "$ref": "#/definitions/base_bool_int" - }, - "owner_id": { - "type": "integer", - "description": "Document owner ID" - }, - "preview": { - "$ref": "#/definitions/docs_doc_preview" - }, - "size": { - "type": "integer", - "description": "File size in bites", - "minimum": 0 - }, - "title": { - "type": "string", - "description": "Document title" - }, - "type": { - "type": "integer", - "description": "Document type" - }, - "url": { - "type": "string", - "format": "uri", - "description": "File URL" - } - }, - "required": [ - "id", - "owner_id", - "title", - "size", - "ext", - "date", - "type" - ], - "additionalProperties": false - }, - "docs_doc_attachment_type": { - "type": "string", - "description": "Doc attachment type", - "enum": [ - "doc", - "graffiti", - "audio_message" - ] - }, - "docs_doc_preview": { - "type": "object", - "properties": { - "photo": { - "$ref": "#/definitions/docs_doc_preview_photo" - }, - "video": { - "$ref": "#/definitions/docs_doc_preview_video" - } - } - }, - "docs_doc_preview_photo": { - "type": "object", - "properties": { - "sizes": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo_sizes" - } - } - } - }, - "docs_doc_preview_video": { - "type": "object", - "properties": { - "filesize": { - "type": "integer", - "description": "Video file size in bites", - "minimum": 0 - }, - "height": { - "type": "integer", - "description": "Video's height in pixels", - "minimum": 0 - }, - "src": { - "type": "string", - "format": "uri", - "description": "Video URL" - }, - "width": { - "type": "integer", - "description": "Video's width in pixels", - "minimum": 0 - } - }, - "required": [ - "src", - "width", - "height", - "filesize" - ], - "additionalProperties": false - }, - "docs_doc_types": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Number of docs" - }, - "id": { - "type": "integer", - "description": "Doc type ID" - }, - "title": { - "type": "string", - "description": "Doc type title" - } - } - }, - "docs_doc_upload_response": { - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "Uploaded file data" - } - }, - "withoutRefs": true - }, - "events_event_attach": { - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "address of event" - }, - "button_text": { - "type": "string", - "description": "text of attach" - }, - "friends": { - "type": "array", - "description": "array of friends ids", - "items": { - "type": "integer" - } - }, - "id": { - "type": "integer", - "description": "event ID", - "minimum": 0 - }, - "is_favorite": { - "type": "boolean", - "description": "is favorite" - }, - "member_status": { - "$ref": "#/definitions/groups_group_full_member_status", - "description": "Current user's member status" - }, - "text": { - "type": "string", - "description": "text of attach" - }, - "time": { - "type": "integer", - "description": "event start time" - } - }, - "required": [ - "id", - "is_favorite", - "text", - "friends", - "button_text" - ], - "additionalProperties": false - }, - "fave_bookmark": { - "type": "object", - "properties": { - "added_date": { - "type": "integer", - "description": "Timestamp, when this item was bookmarked", - "minimum": 0 - }, - "link": { - "$ref": "#/definitions/base_link" - }, - "post": { - "$ref": "#/definitions/wall_wallpost_full" - }, - "product": { - "$ref": "#/definitions/market_market_item" - }, - "seen": { - "type": "boolean", - "description": "Has user seen this item" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/fave_tag" - } - }, - "type": { - "description": "Item type", - "$ref": "#/definitions/fave_bookmark_type" - }, - "video": { - "$ref": "#/definitions/video_video" - } - }, - "required": [ - "type", - "seen", - "added_date", - "tags" - ] - }, - "fave_bookmark_type": { - "type": "string", - "enum": [ - "post", - "video", - "product", - "article", - "link" - ] - }, - "fave_page": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "Some info about user or group" - }, - "group": { - "$ref": "#/definitions/groups_group_full" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/fave_tag" - } - }, - "type": { - "description": "Item type", - "$ref": "#/definitions/fave_page_type" - }, - "updated_date": { - "type": "integer", - "description": "Timestamp, when this page was bookmarked", - "minimum": 0 - }, - "user": { - "$ref": "#/definitions/users_user_full" - } - }, - "required": [ - "type", - "description", - "tags" - ], - "withoutRefs": true - }, - "fave_page_type": { - "type": "string", - "enum": [ - "user", - "group", - "hints" - ] - }, - "fave_tag": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Tag id", - "minimum": 0 - }, - "name": { - "type": "string", - "description": "Tag name" - } - } - }, - "friends_friend_status": { - "type": "object", - "properties": { - "friend_status": { - "$ref": "#/definitions/friends_friend_status_status" - }, - "read_state": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether request is unviewed" - }, - "request_message": { - "type": "string", - "description": "Message sent with request" - }, - "sign": { - "type": "string", - "description": "MD5 hash for the result validation" - }, - "user_id": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "required": [ - "user_id", - "friend_status" - ], - "additionalProperties": false - }, - "friends_friend_status_status": { - "type": "integer", - "description": "Friend status with the user", - "enum": [ - 0, - 1, - 2, - 3 - ], - "enumNames": [ - "not a friend", - "outcoming request", - "incoming request", - "is friend" - ] - }, - "friends_friends_list": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "List ID" - }, - "name": { - "type": "string", - "description": "List title" - } - }, - "required": [ - "name", - "id" - ], - "additionalProperties": false - }, - "friends_mutual_friend": { - "type": "object", - "properties": { - "common_count": { - "type": "integer", - "description": "Total mutual friends number" - }, - "common_friends": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "id": { - "type": "integer", - "description": "User ID" - } - }, - "additionalProperties": false - }, - "friends_requests": { - "type": "object", - "properties": { - "from": { - "type": "string", - "description": "ID of the user by whom friend has been suggested" - }, - "mutual": { - "$ref": "#/definitions/friends_requests_mutual" - }, - "user_id": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "additionalProperties": false - }, - "friends_requests_mutual": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Total mutual friends number" - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - }, - "additionalProperties": false - }, - "friends_requests_xtr_message": { - "type": "object", - "properties": { - "from": { - "type": "string", - "description": "ID of the user by whom friend has been suggested" - }, - "message": { - "type": "string", - "description": "Message sent with a request" - }, - "mutual": { - "$ref": "#/definitions/friends_requests_mutual" - }, - "user_id": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "additionalProperties": false - }, - "friends_user_xtr_lists": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user_full" - }, - { - "properties": { - "lists": { - "type": "array", - "items": { - "type": "integer", - "description": "IDs of friend lists with user" - } - } - } - } - ] - }, - "friends_user_xtr_phone": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user_full" - }, - { - "properties": { - "phone": { - "type": "string", - "description": "User phone" - } - } - } - ] - }, - "gifts_gift": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when gist has been sent in Unixtime" - }, - "from_id": { - "type": "integer", - "description": "Gift sender ID" - }, - "gift": { - "$ref": "#/definitions/gifts_layout" - }, - "gift_hash": { - "type": "string", - "description": "Hash" - }, - "id": { - "type": "integer", - "description": "Gift ID" - }, - "message": { - "type": "string", - "description": "Comment text" - }, - "privacy": { - "$ref": "#/definitions/gifts_gift_privacy" - } - } - }, - "gifts_gift_privacy": { - "type": "integer", - "description": "Gift privacy", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "name and message for all", - "name for all", - "name and message for recipient only" - ] - }, - "gifts_layout": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Gift ID" - }, - "thumb_256": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 256 px in width" - }, - "thumb_48": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 48 px in width" - }, - "thumb_96": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 96 px in width" - } - } - }, - "groups_address": { - "type": "object", - "properties": { - "additional_address": { - "type": "string", - "description": "Additional address to the place (6 floor, left door)" - }, - "address": { - "type": "string", - "description": "String address to the place (Nevsky, 28)" - }, - "city_id": { - "type": "integer", - "description": "City id of address", - "minimum": 0 - }, - "country_id": { - "type": "integer", - "description": "Country id of address", - "minimum": 0 - }, - "distance": { - "type": "integer", - "description": "Distance from the point" - }, - "id": { - "type": "integer", - "description": "Address id" - }, - "latitude": { - "type": "number", - "description": "Address latitude" - }, - "longitude": { - "type": "number", - "description": "Address longitude" - }, - "metro_station_id": { - "type": "integer", - "description": "Metro id of address", - "minimum": 0 - }, - "phone": { - "type": "string", - "description": "Address phone" - }, - "time_offset": { - "type": "integer", - "description": "Time offset int minutes from utc time" - }, - "timetable": { - "description": "Week timetable for the address", - "$ref": "#/definitions/groups_address_timetable" - }, - "title": { - "type": "string", - "description": "Title of the place (Zinger, etc)" - }, - "work_info_status": { - "description": "Status of information about timetable", - "$ref": "#/definitions/groups_address_work_info_status" - } - }, - "required": [ - "id" - ] - }, - "groups_address_timetable": { - "type": "object", - "description": "Timetable for a week", - "properties": { - "fri": { - "description": "Timetable for friday", - "$ref": "#/definitions/groups_address_timetable_day" - }, - "mon": { - "description": "Timetable for monday", - "$ref": "#/definitions/groups_address_timetable_day" - }, - "sat": { - "description": "Timetable for saturday", - "$ref": "#/definitions/groups_address_timetable_day" - }, - "sun": { - "description": "Timetable for sunday", - "$ref": "#/definitions/groups_address_timetable_day" - }, - "thu": { - "description": "Timetable for thursday", - "$ref": "#/definitions/groups_address_timetable_day" - }, - "tue": { - "description": "Timetable for tuesday", - "$ref": "#/definitions/groups_address_timetable_day" - }, - "wed": { - "description": "Timetable for wednesday", - "$ref": "#/definitions/groups_address_timetable_day" - } - } - }, - "groups_address_timetable_day": { - "type": "object", - "description": "Timetable for one day", - "properties": { - "break_close_time": { - "type": "integer", - "description": "Close time of the break in minutes" - }, - "break_open_time": { - "type": "integer", - "description": "Start time of the break in minutes" - }, - "close_time": { - "type": "integer", - "description": "Close time in minutes" - }, - "open_time": { - "type": "integer", - "description": "Open time in minutes" - } - }, - "required": [ - "open_time", - "close_time" - ] - }, - "groups_address_work_info_status": { - "type": "string", - "description": "Status of information about timetable", - "enum": [ - "no_information", - "temporarily_closed", - "always_opened", - "timetable", - "forever_closed" - ] - }, - "groups_addresses_info": { - "type": "object", - "properties": { - "is_enabled": { - "description": "Information whether addresses is enabled", - "type": "boolean" - }, - "main_address_id": { - "type": "integer", - "description": "Main address id for group" - } - }, - "required": [ - "is_enabled" - ], - "additionalProperties": false - }, - "groups_ban_info": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "description": "Administrator ID", - "minimum": 1 - }, - "comment": { - "type": "string", - "description": "Comment for a ban" - }, - "comment_visible": { - "type": "boolean", - "description": "Show comment for user" - }, - "is_closed": { - "type": "boolean" - }, - "date": { - "type": "integer", - "description": "Date when user has been added to blacklist in Unixtime", - "minimum": 0 - }, - "end_date": { - "type": "integer", - "description": "Date when user will be removed from blacklist in Unixtime", - "minimum": 0 - }, - "reason": { - "$ref": "#/definitions/groups_ban_info_reason" - } - }, - "additionalProperties": false - }, - "groups_ban_info_reason": { - "type": "integer", - "description": "Ban reason", - "enum": [ - 0, - 1, - 2, - 3, - 4 - ], - "enumNames": [ - "other", - "spam", - "verbal abuse", - "strong language", - "flood" - ] - }, - "groups_banned_item": { - "type": "object", - "oneOf": [ - { - "$ref": "objects.json#/definitions/groups_owner_xtr_ban_info" - } - ] - }, - "groups_callback_server": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": 0 - }, - "title": { - "type": "string" - }, - "creator_id": { - "type": "integer", - "minimum": 0 - }, - "url": { - "type": "string" - }, - "secret_key": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "unconfigured", - "failed", - "wait", - "ok" - ] - } - }, - "required": [ - "id", - "title", - "creator_id", - "url", - "secret_key", - "status" - ] - }, - "groups_callback_settings": { - "type": "object", - "properties": { - "api_version": { - "type": "string", - "description": "API version used for the events" - }, - "events": { - "$ref": "#/definitions/groups_long_poll_events" - } - } - }, - "groups_contacts_item": { - "type": "object", - "properties": { - "desc": { - "type": "string", - "description": "Contact description" - }, - "email": { - "type": "string", - "description": "Contact email" - }, - "phone": { - "type": "string", - "description": "Contact phone" - }, - "user_id": { - "type": "integer", - "description": "User ID" - } - }, - "additionalProperties": false - }, - "groups_counters_group": { - "type": "object", - "properties": { - "addresses": { - "type": "integer", - "description": "Addresses number" - }, - "albums": { - "type": "integer", - "description": "Photo albums number" - }, - "audios": { - "type": "integer", - "description": "Audios number" - }, - "docs": { - "type": "integer", - "description": "Docs number" - }, - "market": { - "type": "integer", - "description": "Market items number" - }, - "photos": { - "type": "integer", - "description": "Photos number" - }, - "topics": { - "type": "integer", - "description": "Topics number" - }, - "videos": { - "type": "integer", - "description": "Videos number" - } - } - }, - "groups_cover": { - "type": "object", - "properties": { - "enabled": { - "description": "Information whether cover is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/base_image" - } - } - }, - "required": [ - "enabled" - ], - "additionalProperties": false - }, - "groups_fields": { - "type": "string", - "enum": [ - "market", - "member_status", - "is_favorite", - "is_subscribed", - "city", - "country", - "verified", - "description", - "wiki_page", - "members_count", - "counters", - "cover", - "can_post", - "can_see_all_posts", - "activity", - "fixed_post", - "can_create_topic", - "can_upload_video", - "has_photo", - "status", - "main_album_id", - "links", - "contacts", - "site", - "main_section", - "trending", - "can_message", - "is_market_cart_enabled", - "is_messages_blocked", - "can_send_notify", - "online_status", - "start_date", - "finish_date", - "age_limits", - "ban_info", - "action_button", - "author_id", - "phone", - "has_market_app", - "addresses", - "live_covers", - "is_adult", - "can_subscribe_posts", - "warning_notification" - ] - }, - "groups_filter": { - "type": "string", - "enum": [ - "admin", - "editor", - "moder", - "groups", - "publics", - "events", - "has_addresses" - ] - }, - "groups_group": { - "type": "object", - "properties": { - "admin_level": { - "$ref": "#/definitions/groups_group_admin_level" - }, - "deactivated": { - "type": "string", - "description": "Information whether community is banned" - }, - "finish_date": { - "description": "Finish date in Unixtime format", - "type": "integer" - }, - "id": { - "type": "integer", - "description": "Community ID" - }, - "is_admin": { - "description": "Information whether current user is administrator", - "$ref": "#/definitions/base_bool_int" - }, - "is_advertiser": { - "description": "Information whether current user is advertiser", - "$ref": "#/definitions/base_bool_int" - }, - "is_closed": { - "$ref": "#/definitions/groups_group_is_closed" - }, - "is_member": { - "description": "Information whether current user is member", - "$ref": "#/definitions/base_bool_int" - }, - "name": { - "type": "string", - "description": "Community name" - }, - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the community with 100 pixels in width" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the community with 200 pixels in width" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the community with 50 pixels in width" - }, - "screen_name": { - "type": "string", - "description": "Domain of the community page" - }, - "start_date": { - "description": "Start date in Unixtime format", - "type": "integer" - }, - "type": { - "$ref": "#/definitions/groups_group_type" - } - } - }, - "groups_group_access": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "open", - "closed", - "private" - ] - }, - "groups_group_admin_level": { - "type": "integer", - "description": "Level of current user's credentials as manager", - "enum": [ - 1, - 2, - 3 - ], - "enumNames": [ - "moderator", - "editor", - "administrator" - ] - }, - "groups_group_age_limits": { - "type": "integer", - "default": 1, - "minimum": 0, - "enumNames": [ - "unlimited", - "16 plus", - "18 plus" - ], - "enum": [ - 1, - 2, - 3 - ] - }, - "groups_group_audio": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "disabled", - "open", - "limited" - ] - }, - "groups_group_ban_info": { - "type": "object", - "properties": { - "comment": { - "type": "string", - "description": "Ban comment" - }, - "end_date": { - "type": "integer", - "description": "End date of ban in Unixtime" - } - }, - "additionalProperties": false - }, - "groups_group_category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Category ID", - "minimum": 1 - }, - "name": { - "type": "string", - "description": "Category name" - }, - "subcategories": { - "type": "array", - "items": { - "$ref": "#/definitions/base_object_with_name" - } - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "groups_group_category_full": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Category ID", - "minimum": 1 - }, - "name": { - "type": "string", - "description": "Category name" - }, - "page_count": { - "type": "integer", - "description": "Pages number" - }, - "page_previews": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_group" - } - }, - "subcategories": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_group_category" - } - } - }, - "required": [ - "id", - "name", - "page_count", - "page_previews" - ], - "additionalProperties": false - }, - "groups_group_category_type": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - } - }, - "groups_group_docs": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "disabled", - "open", - "limited" - ] - }, - "groups_group_full": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/groups_group" - }, - { - "properties": { - "market": { - "$ref": "#/definitions/groups_market_info" - }, - "member_status": { - "$ref": "#/definitions/groups_group_full_member_status", - "description": "Current user's member status" - }, - "is_favorite": { - "description": "Information whether community is in faves", - "$ref": "#/definitions/base_bool_int" - }, - "is_subscribed": { - "description": "Information whether current user is subscribed", - "$ref": "#/definitions/base_bool_int" - }, - "city": { - "$ref": "#/definitions/base_object" - }, - "country": { - "$ref": "#/definitions/base_country" - }, - "verified": { - "description": "Information whether community is verified", - "$ref": "#/definitions/base_bool_int" - }, - "description": { - "type": "string", - "description": "Community description" - }, - "wiki_page": { - "type": "string", - "description": "Community's main wiki page title" - }, - "members_count": { - "type": "integer", - "description": "Community members number" - }, - "counters": { - "$ref": "#/definitions/groups_counters_group" - }, - "cover": { - "$ref": "#/definitions/groups_cover" - }, - "can_post": { - "description": "Information whether current user can post on community's wall", - "$ref": "#/definitions/base_bool_int" - }, - "can_see_all_posts": { - "description": "Information whether current user can see all posts on community's wall", - "$ref": "#/definitions/base_bool_int" - }, - "activity": { - "type": "string", - "description": "Type of group, start date of event or category of public page" - }, - "fixed_post": { - "type": "integer", - "description": "Fixed post ID" - }, - "can_create_topic": { - "description": "Information whether current user can create topic", - "$ref": "#/definitions/base_bool_int" - }, - "can_upload_video": { - "description": "Information whether current user can upload video", - "$ref": "#/definitions/base_bool_int" - }, - "has_photo": { - "description": "Information whether community has photo", - "$ref": "#/definitions/base_bool_int" - }, - "status": { - "type": "string", - "description": "Community status" - }, - "main_album_id": { - "type": "integer", - "description": "Community's main photo album ID" - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_links_item" - } - }, - "contacts": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_contacts_item" - } - }, - "site": { - "type": "string", - "description": "Community's website" - }, - "main_section": { - "$ref": "#/definitions/groups_group_full_main_section" - }, - "trending": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether the community has a \"fire\" pictogram." - }, - "can_message": { - "description": "Information whether current user can send a message to community", - "$ref": "#/definitions/base_bool_int" - }, - "is_messages_blocked": { - "description": "Information whether community can send a message to current user", - "$ref": "#/definitions/base_bool_int" - }, - "can_send_notify": { - "description": "Information whether community can send notifications by phone number to current user", - "$ref": "#/definitions/base_bool_int" - }, - "online_status": { - "$ref": "#/definitions/groups_online_status", - "description": "Status of replies in community messages" - }, - "age_limits": { - "$ref": "#/definitions/groups_group_full_age_limits", - "description": "Information whether age limit" - }, - "ban_info": { - "$ref": "#/definitions/groups_group_ban_info", - "description": "User ban info" - }, - "addresses": { - "$ref": "#/definitions/groups_addresses_info", - "description": "Info about addresses in groups" - }, - "is_subscribed_podcasts": { - "description": "Information whether current user is subscribed to podcasts", - "type": "boolean" - }, - "can_subscribe_podcasts": { - "description": "Owner in whitelist or not", - "type": "boolean" - }, - "can_subscribe_posts": { - "description": "Can subscribe to wall", - "type": "boolean" - } - } - } - ] - }, - "groups_group_full_age_limits": { - "type": "integer", - "enum": [ - 1, - 2, - 3 - ], - "enumNames": [ - "no", - "over 16", - "over 18" - ] - }, - "groups_group_full_main_section": { - "type": "integer", - "description": "Main section of community", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "enumNames": [ - "absent", - "photos", - "topics", - "audio", - "video", - "market" - ] - }, - "groups_group_full_member_status": { - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "enumNames": [ - "not a member", - "member", - "not sure", - "declined", - "has sent a request", - "invited" - ] - }, - "groups_group_is_closed": { - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "open", - "closed", - "private" - ], - "description": "Information whether community is closed" - }, - "groups_group_link": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Link label" - }, - "desc": { - "type": "string", - "description": "Link description" - }, - "edit_title": { - "description": "Information whether the title can be edited", - "$ref": "#/definitions/base_bool_int" - }, - "id": { - "type": "integer", - "description": "Link ID" - }, - "image_processing": { - "description": "Information whether the image on processing", - "$ref": "#/definitions/base_bool_int" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Link URL" - } - }, - "additionalProperties": false - }, - "groups_group_market_currency": { - "type": "integer", - "minimum": 0, - "enum": [ - 643, - 980, - 398, - 978, - 840 - ], - "enumNames": [ - "russian rubles", - "ukrainian hryvnia", - "kazakh tenge", - "euro", - "us dollars" - ] - }, - "groups_group_photos": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "disabled", - "open", - "limited" - ] - }, - "groups_group_public_category_list": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "subtypes_list": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_group_category_type" - } - } - } - }, - "groups_group_role": { - "type": "string", - "enum": [ - "moderator", - "editor", - "administrator" - ] - }, - "groups_group_settings": { - "type": "object", - "properties": { - "access": { - "type": "integer", - "description": "Community access settings" - }, - "address": { - "type": "string", - "description": "Community's page domain" - }, - "audio": { - "type": "integer", - "description": "Audio settings" - }, - "description": { - "type": "string", - "description": "Community description" - }, - "docs": { - "type": "integer", - "description": "Docs settings" - }, - "obscene_filter": { - "description": "Information whether the obscene filter is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "obscene_stopwords": { - "description": "Information whether the stopwords filter is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "obscene_words": { - "type": "string", - "description": "The list of stop words" - }, - "photos": { - "type": "integer", - "description": "Photos settings" - }, - "public_category": { - "type": "integer", - "description": "Information about the group category" - }, - "public_category_list": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_group_public_category_list" - } - }, - "public_subcategory": { - "type": "integer", - "description": "Information about the group subcategory" - }, - "rss": { - "type": "string", - "format": "uri", - "description": "URL of the RSS feed" - }, - "subject": { - "type": "integer", - "description": "Community subject ID" - }, - "subject_list": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_subject_item" - } - }, - "title": { - "type": "string", - "description": "Community title" - }, - "topics": { - "type": "integer", - "description": "Topics settings" - }, - "video": { - "type": "integer", - "description": "Video settings" - }, - "wall": { - "type": "integer", - "description": "Wall settings" - }, - "website": { - "type": "string", - "description": "Community website" - }, - "wiki": { - "type": "integer", - "description": "Wiki settings" - } - } - }, - "groups_group_subject": { - "type": "string", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42 - ], - "enumNames": [ - "auto", - "activity holidays", - "business", - "pets", - "health", - "dating and communication", - "games", - "it", - "cinema", - "beauty and fashion", - "cooking", - "art and culture", - "literature", - "mobile services and internet", - "music", - "science and technology", - "real estate", - "news and media", - "security", - "education", - "home and renovations", - "politics", - "food", - "industry", - "travel", - "work", - "entertainment", - "religion", - "family", - "sports", - "insurance", - "television", - "goods and services", - "hobbies", - "finance", - "photo", - "esoterics", - "electronics and appliances", - "erotic", - "humor", - "society_humanities", - "design and graphics" - ] - }, - "groups_group_topics": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "disabled", - "open", - "limited" - ] - }, - "groups_group_type": { - "type": "string", - "description": "Community type", - "enum": [ - "group", - "page", - "event" - ] - }, - "groups_group_video": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "disabled", - "open", - "limited" - ] - }, - "groups_group_wall": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2, - 3 - ], - "enumNames": [ - "disabled", - "open", - "limited", - "closed" - ] - }, - "groups_group_wiki": { - "type": "integer", - "minimum": 0, - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "disabled", - "open", - "limited" - ] - }, - "groups_group_xtr_invited_by": { - "type": "object", - "properties": { - "admin_level": { - "$ref": "#/definitions/groups_group_xtr_invited_by_admin_level" - }, - "id": { - "type": "string", - "description": "Community ID" - }, - "invited_by": { - "type": "integer", - "description": "Inviter ID", - "minimum": 1 - }, - "is_admin": { - "description": "Information whether current user is manager", - "$ref": "#/definitions/base_bool_int" - }, - "is_advertiser": { - "description": "Information whether current user is advertiser", - "$ref": "#/definitions/base_bool_int" - }, - "is_closed": { - "description": "Information whether community is closed", - "$ref": "#/definitions/base_bool_int" - }, - "is_member": { - "description": "Information whether current user is member", - "$ref": "#/definitions/base_bool_int" - }, - "name": { - "type": "string", - "description": "Community name" - }, - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the community with 100 pixels in width" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the community with 200 pixels in width" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the community with 50 pixels in width" - }, - "screen_name": { - "type": "string", - "description": "Domain of the community page" - }, - "type": { - "$ref": "#/definitions/groups_group_xtr_invited_by_type" - } - }, - "additionalProperties": false - }, - "groups_group_xtr_invited_by_admin_level": { - "type": "integer", - "description": "Level of current user's credentials as manager", - "enum": [ - 1, - 2, - 3 - ], - "enumNames": [ - "moderator", - "editor", - "administrator" - ] - }, - "groups_group_xtr_invited_by_type": { - "type": "string", - "description": "Community type", - "enum": [ - "group", - "page", - "event" - ] - }, - "groups_groups_array": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "Community ID" - } - } - }, - "required": [ - "count", - "items" - ], - "additionalProperties": false - }, - "groups_links_item": { - "type": "object", - "properties": { - "desc": { - "type": "string", - "description": "Link description" - }, - "edit_title": { - "description": "Information whether the link title can be edited", - "$ref": "#/definitions/base_bool_int" - }, - "id": { - "type": "integer", - "description": "Link ID" - }, - "name": { - "type": "string", - "description": "Link title" - }, - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of square image of the link with 100 pixels in width" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of square image of the link with 50 pixels in width" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Link URL" - } - } - }, - "groups_long_poll_events": { - "type": "object", - "properties": { - "audio_new": { - "$ref": "#/definitions/base_bool_int" - }, - "board_post_delete": { - "$ref": "#/definitions/base_bool_int" - }, - "board_post_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "board_post_new": { - "$ref": "#/definitions/base_bool_int" - }, - "board_post_restore": { - "$ref": "#/definitions/base_bool_int" - }, - "group_change_photo": { - "$ref": "#/definitions/base_bool_int" - }, - "group_change_settings": { - "$ref": "#/definitions/base_bool_int" - }, - "group_join": { - "$ref": "#/definitions/base_bool_int" - }, - "group_leave": { - "$ref": "#/definitions/base_bool_int" - }, - "group_officers_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "lead_forms_new": { - "$ref": "#/definitions/base_bool_int" - }, - "market_comment_delete": { - "$ref": "#/definitions/base_bool_int" - }, - "market_comment_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "market_comment_new": { - "$ref": "#/definitions/base_bool_int" - }, - "market_comment_restore": { - "$ref": "#/definitions/base_bool_int" - }, - "message_allow": { - "$ref": "#/definitions/base_bool_int" - }, - "message_deny": { - "$ref": "#/definitions/base_bool_int" - }, - "message_new": { - "$ref": "#/definitions/base_bool_int" - }, - "message_read": { - "$ref": "#/definitions/base_bool_int" - }, - "message_reply": { - "$ref": "#/definitions/base_bool_int" - }, - "message_typing_state": { - "$ref": "#/definitions/base_bool_int" - }, - "messages_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "photo_comment_delete": { - "$ref": "#/definitions/base_bool_int" - }, - "photo_comment_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "photo_comment_new": { - "$ref": "#/definitions/base_bool_int" - }, - "photo_comment_restore": { - "$ref": "#/definitions/base_bool_int" - }, - "photo_new": { - "$ref": "#/definitions/base_bool_int" - }, - "poll_vote_new": { - "$ref": "#/definitions/base_bool_int" - }, - "user_block": { - "$ref": "#/definitions/base_bool_int" - }, - "user_unblock": { - "$ref": "#/definitions/base_bool_int" - }, - "video_comment_delete": { - "$ref": "#/definitions/base_bool_int" - }, - "video_comment_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "video_comment_new": { - "$ref": "#/definitions/base_bool_int" - }, - "video_comment_restore": { - "$ref": "#/definitions/base_bool_int" - }, - "video_new": { - "$ref": "#/definitions/base_bool_int" - }, - "wall_post_new": { - "$ref": "#/definitions/base_bool_int" - }, - "wall_reply_delete": { - "$ref": "#/definitions/base_bool_int" - }, - "wall_reply_edit": { - "$ref": "#/definitions/base_bool_int" - }, - "wall_reply_new": { - "$ref": "#/definitions/base_bool_int" - }, - "wall_reply_restore": { - "$ref": "#/definitions/base_bool_int" - }, - "wall_repost": { - "$ref": "#/definitions/base_bool_int" - } - }, - "required": [ - "app_payload", - "message_new", - "message_reply", - "photo_new", - "audio_new", - "video_new", - "wall_reply_new", - "wall_reply_edit", - "wall_reply_delete", - "wall_reply_restore", - "wall_post_new", - "board_post_new", - "board_post_edit", - "board_post_restore", - "board_post_delete", - "photo_comment_new", - "photo_comment_edit", - "photo_comment_delete", - "photo_comment_restore", - "video_comment_new", - "video_comment_edit", - "video_comment_delete", - "video_comment_restore", - "market_comment_new", - "market_comment_edit", - "market_comment_delete", - "market_comment_restore", - "poll_vote_new", - "group_join", - "group_leave", - "group_change_settings", - "group_change_photo", - "group_officers_edit", - "message_allow", - "message_deny", - "wall_repost", - "user_block", - "user_unblock", - "messages_edit", - "message_typing_state", - "message_read" - ] - }, - "groups_long_poll_server": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Long Poll key" - }, - "server": { - "type": "string", - "description": "Long Poll server address" - }, - "ts": { - "type": "string", - "description": "Number of the last event" - } - }, - "required": [ - "key", - "server", - "ts" - ], - "additionalProperties": false - }, - "groups_long_poll_settings": { - "type": "object", - "properties": { - "api_version": { - "type": "string", - "description": "API version used for the events" - }, - "events": { - "$ref": "#/definitions/groups_long_poll_events" - }, - "is_enabled": { - "type": "boolean", - "description": "Shows whether Long Poll is enabled" - } - }, - "required": [ - "is_enabled", - "events" - ] - }, - "groups_market_info": { - "type": "object", - "properties": { - "contact_id": { - "type": "integer", - "description": "Contact person ID" - }, - "currency": { - "$ref": "#/definitions/market_currency" - }, - "currency_text": { - "type": "string", - "description": "Currency name" - }, - "enabled": { - "description": "Information whether the market is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "main_album_id": { - "type": "integer", - "description": "Main market album ID" - }, - "price_max": { - "type": "integer", - "description": "Maximum price" - }, - "price_min": { - "type": "integer", - "description": "Minimum price" - } - } - }, - "groups_member_role": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "User ID" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/groups_member_role_permission" - } - }, - "role": { - "$ref": "#/definitions/groups_member_role_status" - } - } - }, - "groups_member_role_permission": { - "type": "string", - "enum": [ - "ads" - ] - }, - "groups_member_role_status": { - "type": "string", - "description": "User's credentials as community admin", - "enum": [ - "moderator", - "editor", - "administrator", - "creator" - ] - }, - "groups_member_status": { - "type": "object", - "properties": { - "member": { - "description": "Information whether user is a member of the group", - "$ref": "#/definitions/base_bool_int" - }, - "user_id": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "required": [ - "member", - "user_id" - ], - "additionalProperties": false - }, - "groups_member_status_full": { - "type": "object", - "properties": { - "can_invite": { - "description": "Information whether user can be invited", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "can_recall": { - "description": "Information whether user's invite to the group can be recalled", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "invitation": { - "description": "Information whether user has been invited to the group", - "$ref": "#/definitions/base_bool_int" - }, - "member": { - "description": "Information whether user is a member of the group", - "$ref": "#/definitions/base_bool_int" - }, - "request": { - "description": "Information whether user has send request to the group", - "$ref": "#/definitions/base_bool_int" - }, - "user_id": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "required": [ - "member", - "user_id" - ], - "additionalProperties": false - }, - "groups_online_status": { - "type": "object", - "description": "Online status of group", - "properties": { - "minutes": { - "type": "integer", - "description": "Estimated time of answer (for status = answer_mark)" - }, - "status": { - "$ref": "#/definitions/groups_online_status_type" - } - }, - "required": [ - "status" - ], - "additionalProperties": false - }, - "groups_online_status_type": { - "type": "string", - "description": "Type of online status of group", - "enum": [ - "none", - "online", - "answer_mark" - ] - }, - "groups_owner_xtr_ban_info": { - "type": "object", - "properties": { - "ban_info": { - "$ref": "#/definitions/groups_ban_info" - }, - "group": { - "$ref": "#/definitions/groups_group", - "description": "Information about group if type = group" - }, - "profile": { - "$ref": "#/definitions/users_user", - "description": "Information about group if type = profile" - }, - "type": { - "$ref": "#/definitions/groups_owner_xtr_ban_info_type" - } - } - }, - "groups_owner_xtr_ban_info_type": { - "type": "string", - "description": "Owner type", - "enum": [ - "group", - "profile" - ] - }, - "groups_role_options": { - "type": "string", - "description": "User's credentials as community admin", - "enum": [ - "moderator", - "editor", - "administrator", - "creator" - ] - }, - "groups_subject_item": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Subject ID" - }, - "name": { - "type": "string", - "description": "Subject title" - } - } - }, - "groups_token_permission_setting": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "setting": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ - "setting", - "name" - ], - "additionalProperties": false - }, - "groups_user_xtr_role": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user_full" - }, - { - "properties": { - "role": { - "$ref": "#/definitions/groups_role_options" - } - } - } - ] - }, - "leads_checked": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "Reason why user can't start the lead" - }, - "result": { - "$ref": "#/definitions/leads_checked_result" - }, - "sid": { - "type": "string", - "description": "Session ID" - }, - "start_link": { - "type": "string", - "format": "uri", - "description": "URL user should open to start the lead" - } - } - }, - "leads_checked_result": { - "type": "string", - "description": "Information whether user can start the lead", - "enum": [ - "true", - "false" - ] - }, - "leads_complete": { - "type": "object", - "properties": { - "cost": { - "type": "integer", - "description": "Offer cost" - }, - "limit": { - "type": "integer", - "description": "Offer limit" - }, - "spent": { - "type": "integer", - "description": "Amount of spent votes" - }, - "success": { - "$ref": "#/definitions/base_ok_response" - }, - "test_mode": { - "description": "Information whether test mode is enabled", - "$ref": "#/definitions/base_bool_int" - } - } - }, - "leads_entry": { - "type": "object", - "properties": { - "aid": { - "type": "integer", - "description": "Application ID" - }, - "comment": { - "type": "string", - "description": "Comment text" - }, - "date": { - "type": "integer", - "description": "Date when the action has been started in Unixtime" - }, - "sid": { - "type": "string", - "description": "Session string ID" - }, - "start_date": { - "type": "integer", - "description": "Start date in Unixtime (for status=2)" - }, - "status": { - "type": "integer", - "description": "Action type" - }, - "test_mode": { - "description": "Information whether test mode is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "uid": { - "type": "integer", - "description": "User ID" - } - } - }, - "leads_lead": { - "type": "object", - "properties": { - "completed": { - "type": "integer", - "description": "Completed offers number" - }, - "cost": { - "type": "integer", - "description": "Offer cost" - }, - "days": { - "$ref": "#/definitions/leads_lead_days" - }, - "impressions": { - "type": "integer", - "description": "Impressions number" - }, - "limit": { - "type": "integer", - "description": "Lead limit" - }, - "spent": { - "type": "integer", - "description": "Amount of spent votes" - }, - "started": { - "type": "integer", - "description": "Started offers number" - } - } - }, - "leads_lead_days": { - "type": "object", - "properties": { - "completed": { - "type": "integer", - "description": "Completed offers number" - }, - "impressions": { - "type": "integer", - "description": "Impressions number" - }, - "spent": { - "type": "integer", - "description": "Amount of spent votes" - }, - "started": { - "type": "integer", - "description": "Started offers number" - } - } - }, - "leads_start": { - "type": "object", - "properties": { - "test_mode": { - "description": "Information whether test mode is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "vk_sid": { - "type": "string", - "description": "Session data" - } - } - }, - "likes_type": { - "type": "string", - "enum": [ - "post", - "comment", - "photo", - "audio", - "video", - "note", - "market", - "photo_comment", - "video_comment", - "topic_comment", - "market_comment", - "sitepage" - ] - }, - "market_currency": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Currency ID", - "minimum": 0 - }, - "name": { - "type": "string", - "description": "Currency sign" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "market_market_album": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Items number", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Market album ID", - "minimum": 1 - }, - "owner_id": { - "type": "integer", - "description": "Market album owner's ID" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "title": { - "type": "string", - "description": "Market album title" - }, - "updated_time": { - "type": "integer", - "description": "Date when album has been updated last time in Unixtime", - "minimum": 0 - } - }, - "required": [ - "id", - "owner_id", - "title", - "count", - "updated_time" - ], - "additionalProperties": false - }, - "market_market_category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Category ID" - }, - "name": { - "type": "string", - "description": "Category name" - }, - "section": { - "$ref": "#/definitions/market_section" - } - }, - "required": [ - "id", - "name", - "section" - ], - "additionalProperties": false - }, - "market_market_item": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the market item" - }, - "availability": { - "$ref": "#/definitions/market_market_item_availability" - }, - "button_title": { - "type": "string", - "description": "Title for button for url" - }, - "category": { - "$ref": "#/definitions/market_market_category" - }, - "date": { - "type": "integer", - "description": "Date when the item has been created in Unixtime", - "minimum": 0 - }, - "description": { - "type": "string", - "description": "Item description" - }, - "external_id": { - "type": "string" - }, - "id": { - "type": "integer", - "description": "Item ID", - "minimum": 0 - }, - "is_favorite": { - "type": "boolean" - }, - "owner_id": { - "type": "integer", - "description": "Item owner's ID" - }, - "price": { - "$ref": "#/definitions/market_price" - }, - "thumb_photo": { - "type": "string", - "format": "uri", - "description": "URL of the preview image" - }, - "title": { - "type": "string", - "description": "Item title" - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL to item" - } - }, - "required": [ - "id", - "owner_id", - "title", - "description", - "price", - "category", - "date", - "thumb_photo", - "availability" - ], - "additionalProperties": false - }, - "market_market_item_availability": { - "type": "integer", - "description": "Information whether the item is available", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "available", - "removed", - "unavailable" - ] - }, - "market_market_item_full": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/market_market_item" - }, - { - "properties": { - "albums_ids": { - "type": "array", - "items": { - "type": "integer" - } - }, - "photos": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo" - } - }, - "can_comment": { - "description": "Information whether current use can comment the item", - "$ref": "#/definitions/base_bool_int" - }, - "can_repost": { - "description": "Information whether current use can repost the item", - "$ref": "#/definitions/base_bool_int" - }, - "likes": { - "$ref": "#/definitions/base_likes" - }, - "reposts": { - "$ref": "#/definitions/base_reposts_info" - }, - "views_count": { - "type": "integer", - "description": "Views number" - } - } - } - ] - }, - "market_price": { - "type": "object", - "properties": { - "amount": { - "type": "string", - "description": "Amount" - }, - "currency": { - "$ref": "#/definitions/market_currency" - }, - "discount_rate": { - "type": "integer" - }, - "old_amount": { - "type": "string" - }, - "text": { - "type": "string", - "description": "Text" - } - } - }, - "market_section": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Section ID", - "minimum": 0 - }, - "name": { - "type": "string", - "description": "Section name" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - }, - "message_chat_preview": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "minimum": 0 - }, - "joined": { - "type": "boolean" - }, - "local_id": { - "type": "integer" - }, - "members": { - "type": "array", - "items": { - "type": "integer" - } - }, - "members_count": { - "type": "integer", - "minimum": 0 - }, - "title": { - "type": "string" - } - } - }, - "messages_audio_message": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for audio message" - }, - "duration": { - "type": "integer", - "description": "Audio message duration in seconds", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Audio message ID", - "minimum": 0 - }, - "link_mp3": { - "type": "string", - "format": "uri", - "description": "MP3 file URL" - }, - "link_ogg": { - "type": "string", - "format": "uri", - "description": "OGG file URL" - }, - "owner_id": { - "type": "integer", - "description": "Audio message owner ID" - }, - "waveform": { - "type": "array", - "items": { - "type": "integer", - "description": "Sound visualisation", - "minimum": 0 - } - } - }, - "required": [ - "id", - "owner_id", - "duration", - "waveform", - "link_ogg", - "link_mp3" - ], - "additionalProperties": false - }, - "messages_chat": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "description": "Chat creator ID" - }, - "id": { - "type": "integer", - "description": "Chat ID" - }, - "kicked": { - "description": "Shows that user has been kicked from the chat", - "$ref": "#/definitions/base_bool_int" - }, - "left": { - "description": "Shows that user has been left the chat", - "$ref": "#/definitions/base_bool_int" - }, - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 100 px in width" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 200 px in width" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 50 px in width" - }, - "push_settings": { - "$ref": "#/definitions/messages_chat_push_settings" - }, - "title": { - "type": "string", - "description": "Chat title" - }, - "type": { - "type": "string", - "description": "Chat type" - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID" - } - } - }, - "required": [ - "id", - "type", - "admin_id", - "users" - ], - "additionalProperties": false - }, - "messages_chat_full": { - "type": "object", - "properties": { - "admin_id": { - "type": "integer", - "description": "Chat creator ID" - }, - "id": { - "type": "integer", - "description": "Chat ID" - }, - "kicked": { - "description": "Shows that user has been kicked from the chat", - "$ref": "#/definitions/base_bool_int" - }, - "left": { - "description": "Shows that user has been left the chat", - "$ref": "#/definitions/base_bool_int" - }, - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 100 px in width" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 200 px in width" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 50 px in width" - }, - "push_settings": { - "$ref": "#/definitions/messages_chat_push_settings" - }, - "title": { - "type": "string", - "description": "Chat title" - }, - "type": { - "type": "string", - "description": "Chat type" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_user_xtr_invited_by" - } - } - }, - "required": [ - "id", - "type", - "admin_id", - "users" - ], - "additionalProperties": false - }, - "messages_chat_push_settings": { - "type": "object", - "properties": { - "disabled_until": { - "type": "integer", - "description": "Time until that notifications are disabled" - }, - "sound": { - "description": "Information whether the sound is on", - "$ref": "#/definitions/base_bool_int" - } - } - }, - "messages_chat_restrictions": { - "type": "object", - "properties": { - "admins_promote_users": { - "type": "boolean", - "description": "Only admins can promote users to admins" - }, - "only_admins_edit_info": { - "type": "boolean", - "description": "Only admins can change chat info" - }, - "only_admins_edit_pin": { - "type": "boolean", - "description": "Only admins can edit pinned message" - }, - "only_admins_invite": { - "type": "boolean", - "description": "Only admins can invite users to this chat" - }, - "only_admins_kick": { - "type": "boolean", - "description": "Only admins can kick users from this chat" - } - } - }, - "messages_conversation": { - "type": "object", - "properties": { - "peer": { - "$ref": "#/definitions/messages_conversation_peer" - }, - "last_message_id": { - "type": "integer", - "minimum": 0, - "description": "ID of the last message in conversation" - }, - "in_read": { - "type": "integer", - "minimum": 0, - "description": "Last message user have read" - }, - "out_read": { - "type": "integer", - "minimum": 0, - "description": "Last outcoming message have been read by the opponent" - }, - "unread_count": { - "type": "integer", - "minimum": 0, - "description": "Unread messages number" - }, - "important": { - "type": "boolean" - }, - "unanswered": { - "type": "boolean" - }, - "special_service_type": { - "type": "string", - "enum": [ - "business_notify" - ] - }, - "message_request": { - "type": "string", - "enum": [ - "pending", - "rejected" - ] - }, - "mentions": { - "type": "array", - "description": "Ids of messages with mentions", - "items": { - "type": "integer", - "description": "Message id of message with mention" - } - }, - "current_keyboard": { - "$ref": "#/definitions/messages_keyboard" - } - }, - "required": [ - "peer", - "in_read", - "out_read", - "last_message_id" - ] - }, - "messages_conversation_member": { - "type": "object", - "properties": { - "can_kick": { - "type": "boolean", - "description": "Is it possible for user to kick this member" - }, - "invited_by": { - "type": "integer" - }, - "is_admin": { - "type": "boolean" - }, - "is_owner": { - "type": "boolean" - }, - "is_message_request": { - "type": "boolean" - }, - "join_date": { - "type": "integer", - "minimum": 0 - }, - "request_date": { - "type": "integer", - "minimum": 0, - "description": "Message request date" - }, - "member_id": { - "type": "integer" - } - }, - "required": [ - "member_id" - ] - }, - "messages_conversation_peer": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "local_id": { - "type": "integer" - }, - "type": { - "$ref": "#/definitions/messages_conversation_peer_type" - } - }, - "required": [ - "id", - "type" - ] - }, - "messages_conversation_peer_type": { - "type": "string", - "enum": [ - "chat", - "email", - "user", - "group" - ], - "description": "Peer type" - }, - "messages_conversation_with_message": { - "type": "object", - "properties": { - "conversation": { - "$ref": "#/definitions/messages_conversation" - }, - "last_message": { - "$ref": "#/definitions/messages_message" - } - } - }, - "messages_foreign_message": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_message_attachment" - } - }, - "conversation_message_id": { - "type": "integer", - "description": "Conversation message ID" - }, - "date": { - "type": "integer", - "description": "Date when the message was created" - }, - "from_id": { - "type": "integer", - "description": "Message author's ID" - }, - "fwd_messages": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_foreign_message" - } - }, - "geo": { - "$ref": "#/definitions/base_geo" - }, - "id": { - "type": "integer", - "description": "Message ID" - }, - "peer_id": { - "type": "integer", - "description": "Peer ID" - }, - "reply_message": { - "$ref": "#/definitions/messages_foreign_message" - }, - "text": { - "type": "string", - "description": "Message text" - }, - "update_time": { - "type": "integer", - "description": "Date when the message has been updated in Unixtime" - } - }, - "required": [ - "date", - "from_id", - "text" - ] - }, - "messages_graffiti": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for graffiti" - }, - "height": { - "type": "integer", - "description": "Graffiti height", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Graffiti ID", - "minimum": 0 - }, - "owner_id": { - "type": "integer", - "description": "Graffiti owner ID" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Graffiti URL" - }, - "width": { - "type": "integer", - "description": "Graffiti width", - "minimum": 0 - } - }, - "required": [ - "id", - "owner_id", - "url", - "width", - "height" - ], - "additionalProperties": false - }, - "messages_history_attachment": { - "type": "object", - "properties": { - "attachment": { - "$ref": "#/definitions/messages_history_message_attachment" - }, - "message_id": { - "type": "integer", - "description": "Message ID" - }, - "from_id": { - "type": "integer", - "description": "Message author's ID" - } - }, - "required": [ - "message_id", - "from_id", - "attachment" - ] - }, - "messages_history_message_attachment": { - "type": "object", - "properties": { - "audio": { - "$ref": "#/definitions/audio_audio" - }, - "audio_message": { - "$ref": "#/definitions/messages_audio_message" - }, - "doc": { - "$ref": "#/definitions/docs_doc" - }, - "graffiti": { - "$ref": "#/definitions/messages_graffiti" - }, - "link": { - "$ref": "#/definitions/base_link" - }, - "market": { - "$ref": "#/definitions/base_link" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "share": { - "$ref": "#/definitions/base_link" - }, - "type": { - "$ref": "#/definitions/messages_history_message_attachment_type" - }, - "video": { - "$ref": "#/definitions/video_video" - }, - "wall": { - "$ref": "#/definitions/base_link" - } - }, - "required": [ - "type" - ] - }, - "messages_history_message_attachment_type": { - "type": "string", - "description": "Attachments type", - "enum": [ - "photo", - "video", - "audio", - "doc", - "link", - "market", - "wall", - "share", - "graffiti", - "audio_message" - ] - }, - "messages_keyboard": { - "type": "object", - "properties": { - "author_id": { - "type": "integer", - "description": "Community or bot, which set this keyboard" - }, - "buttons": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_keyboard_button" - } - } - }, - "one_time": { - "type": "boolean", - "description": "Should this keyboard disappear on first use" - }, - "inline": { - "type": "boolean" - } - }, - "required": [ - "one_time", - "buttons" - ], - "withSetters": true - }, - "messages_keyboard_button": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/messages_keyboard_button_action" - }, - "color": { - "type": "string", - "enum": [ - "default", - "positive", - "negative", - "primary" - ], - "description": "Button color" - } - }, - "required": [ - "action" - ], - "withSetters": true - }, - "messages_keyboard_button_action": { - "type": "object", - "description": "Description of the action, that should be performed on button click", - "properties": { - "app_id": { - "type": "integer", - "description": "Fragment value in app link like vk.com/app{app_id}_-654321#hash" - }, - "hash": { - "type": "string", - "description": "Fragment value in app link like vk.com/app123456_-654321#{hash}" - }, - "label": { - "type": "string", - "description": "Label for button" - }, - "owner_id": { - "type": "integer", - "description": "Fragment value in app link like vk.com/app123456_{owner_id}#hash" - }, - "payload": { - "type": "string", - "description": "Additional data sent along with message for developer convenience" - }, - "type": { - "type": "string", - "description": "Button type", - "enum": [ - "text", - "start", - "location", - "vkpay", - "open_app" - ] - } - }, - "required": [ - "type" - ], - "additionalProperties": false, - "withSetters": true - }, - "messages_last_activity": { - "type": "object", - "properties": { - "online": { - "description": "Information whether user is online", - "$ref": "#/definitions/base_bool_int" - }, - "time": { - "type": "integer", - "description": "Time when user was online in Unixtime" - } - }, - "required": [ - "online", - "time" - ], - "additionalProperties": false - }, - "messages_longpoll_messages": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_message" - } - } - } - }, - "messages_longpoll_params": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Key" - }, - "pts": { - "type": "integer", - "description": "Persistent timestamp" - }, - "server": { - "type": "string", - "description": "Server URL" - }, - "ts": { - "type": "integer", - "description": "Timestamp" - } - } - }, - "messages_message": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/messages_message_action" - }, - "admin_author_id": { - "type": "integer", - "description": "Only for messages from community. Contains user ID of community admin, who sent this message." - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_message_attachment" - } - }, - "conversation_message_id": { - "type": "integer", - "description": "Unique auto-incremented number for all messages with this peer" - }, - "date": { - "type": "integer", - "description": "Date when the message has been sent in Unixtime" - }, - "deleted": { - "description": "Is it an deleted message", - "$ref": "#/definitions/base_bool_int" - }, - "from_id": { - "type": "integer", - "description": "Message author's ID" - }, - "fwd_messages": { - "description": "Forwarded messages", - "type": "array", - "items": { - "$ref": "#/definitions/messages_foreign_message" - } - }, - "geo": { - "$ref": "#/definitions/base_geo" - }, - "id": { - "type": "integer", - "description": "Message ID" - }, - "important": { - "type": "boolean", - "description": "Is it an important message" - }, - "is_hidden": { - "type": "boolean" - }, - "keyboard": { - "$ref": "#/definitions/messages_keyboard" - }, - "members_count": { - "type": "integer", - "description": "Members number" - }, - "out": { - "description": "Information whether the message is outcoming", - "$ref": "#/definitions/base_bool_int" - }, - "payload": { - "type": "string" - }, - "peer_id": { - "type": "integer", - "description": "Peer ID" - }, - "random_id": { - "type": "integer", - "description": "ID used for sending messages. It returned only for outgoing messages" - }, - "ref": { - "type": "string" - }, - "ref_source": { - "type": "string" - }, - "reply_message": { - "$ref": "#/definitions/messages_foreign_message" - }, - "text": { - "type": "string", - "description": "Message text" - }, - "update_time": { - "type": "integer", - "description": "Date when the message has been updated in Unixtime" - } - }, - "required": [ - "date", - "from_id", - "id", - "out", - "peer_id", - "text" - ] - }, - "messages_message_action": { - "type": "object", - "properties": { - "conversation_message_id": { - "type": "integer", - "description": "Message ID" - }, - "email": { - "type": "string", - "description": "Email address for chat_invite_user or chat_kick_user actions" - }, - "member_id": { - "type": "integer", - "description": "User or email peer ID" - }, - "message": { - "type": "string", - "description": "Message body of related message" - }, - "photo": { - "$ref": "#/definitions/messages_message_action_photo" - }, - "text": { - "type": "string", - "description": "New chat title for chat_create and chat_title_update actions" - }, - "type": { - "$ref": "#/definitions/messages_message_action_status" - } - }, - "required": [ - "type" - ] - }, - "messages_message_action_photo": { - "type": "object", - "properties": { - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 100px in width" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 200px in width" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 50px in width" - } - }, - "required": [ - "photo_50", - "photo_100", - "photo_200" - ] - }, - "messages_message_action_status": { - "type": "string", - "description": "Action status", - "enum": [ - "chat_photo_update", - "chat_photo_remove", - "chat_create", - "chat_title_update", - "chat_invite_user", - "chat_kick_user", - "chat_pin_message", - "chat_unpin_message", - "chat_invite_user_by_link" - ] - }, - "messages_message_attachment": { - "type": "object", - "properties": { - "audio": { - "$ref": "#/definitions/audio_audio" - }, - "audio_message": { - "$ref": "#/definitions/messages_audio_message" - }, - "doc": { - "$ref": "#/definitions/docs_doc" - }, - "gift": { - "$ref": "#/definitions/gifts_layout" - }, - "graffiti": { - "$ref": "#/definitions/messages_graffiti" - }, - "link": { - "$ref": "#/definitions/base_link" - }, - "market": { - "$ref": "#/definitions/market_market_item" - }, - "market_market_album": { - "$ref": "#/definitions/market_market_album" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "sticker": { - "$ref": "#/definitions/base_sticker" - }, - "type": { - "$ref": "#/definitions/messages_message_attachment_type" - }, - "video": { - "$ref": "#/definitions/video_video" - }, - "wall": { - "$ref": "#/definitions/wall_wallpost_full" - }, - "wall_reply": { - "$ref": "#/definitions/wall_wall_comment" - } - }, - "required": [ - "type" - ], - "additionalProperties": false - }, - "messages_message_attachment_type": { - "type": "string", - "description": "Attachment type", - "enum": [ - "photo", - "audio", - "video", - "doc", - "link", - "market", - "market_album", - "gift", - "sticker", - "wall", - "wall_reply", - "article", - "graffiti", - "audio_message" - ] - }, - "messages_pinned_message": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/messages_message_attachment" - } - }, - "conversation_message_id": { - "type": "integer", - "description": "Unique auto-incremented number for all messages with this peer" - }, - "date": { - "type": "integer", - "description": "Date when the message has been sent in Unixtime" - }, - "from_id": { - "type": "integer", - "description": "Message author's ID" - }, - "fwd_messages": { - "description": "Forwarded messages", - "type": "array", - "items": { - "$ref": "#/definitions/messages_foreign_message" - } - }, - "geo": { - "$ref": "#/definitions/base_geo" - }, - "id": { - "type": "integer", - "description": "Message ID" - }, - "peer_id": { - "type": "integer", - "description": "Peer ID" - }, - "reply_message": { - "$ref": "#/definitions/messages_foreign_message" - }, - "text": { - "type": "string", - "description": "Message text" - }, - "keyboard": { - "$ref": "#/definitions/messages_keyboard" - } - }, - "required": [ - "id", - "date", - "from_id", - "peer_id", - "text" - ] - }, - "messages_user_xtr_invited_by": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user_xtr_type" - }, - { - "properties": { - "invited_by": { - "type": "integer", - "description": "ID of the inviter" - } - } - } - ] - }, - "newsfeed_comments_filters": { - "type": "string", - "enum": [ - "post", - "photo", - "video", - "topic", - "note" - ] - }, - "newsfeed_event_activity": { - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "address of event" - }, - "button_text": { - "type": "string", - "description": "text of attach" - }, - "friends": { - "type": "array", - "description": "array of friends ids", - "items": { - "type": "integer" - } - }, - "member_status": { - "$ref": "#/definitions/groups_group_full_member_status", - "description": "Current user's member status" - }, - "text": { - "type": "string", - "description": "text of attach" - }, - "time": { - "type": "integer", - "description": "event start time" - } - }, - "required": [ - "text", - "button_text", - "friends", - "member_status" - ], - "additionalProperties": false - }, - "newsfeed_filters": { - "type": "string", - "enum": [ - "post", - "photo", - "photo_tag", - "wall_photo", - "friend", - "note", - "audio", - "video" - ] - }, - "newsfeed_ignore_item_type": { - "type": "string", - "enum": [ - "wall", - "tag", - "profilephoto", - "video", - "photo", - "audio" - ], - "enumNames": [ - "post on the wall", - "tag on a photo", - "profile photo", - "video", - "photo", - "audio" - ] - }, - "newsfeed_item_audio": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "audio": { - "$ref": "#/definitions/newsfeed_item_audio_audio" - }, - "post_id": { - "type": "integer", - "description": "Post ID" - } - } - } - ] - }, - "newsfeed_item_audio_audio": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Audios number" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/audio_audio" - } - } - } - }, - "newsfeed_item_base": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/newsfeed_newsfeed_item_type" - }, - "source_id": { - "type": "integer", - "description": "Item source ID" - }, - "date": { - "type": "integer", - "description": "Date when item has been added in Unixtime" - } - }, - "required": [ - "type", - "source_id", - "date" - ] - }, - "newsfeed_item_digest": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "button_text": { - "type": "string" - }, - "feed_id": { - "type": "string", - "description": "id of feed in digest" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost" - } - }, - "main_post_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "template": { - "type": "string", - "enum": [ - "list", - "grid" - ], - "description": "type of digest" - }, - "title": { - "type": "string" - }, - "track_code": { - "type": "string" - } - } - } - ] - }, - "newsfeed_item_friend": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "friends": { - "$ref": "#/definitions/newsfeed_item_friend_friends" - } - } - } - ] - }, - "newsfeed_item_friend_friends": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Number of friends has been added" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/base_user_id" - } - } - } - }, - "newsfeed_item_note": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "notes": { - "$ref": "#/definitions/newsfeed_item_note_notes" - } - } - } - ] - }, - "newsfeed_item_note_notes": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Notes number" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/newsfeed_newsfeed_note" - } - } - } - }, - "newsfeed_item_photo": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "photos": { - "$ref": "#/definitions/newsfeed_item_photo_photos" - }, - "post_id": { - "type": "integer", - "description": "Post ID" - } - } - } - ] - }, - "newsfeed_item_photo_photos": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Photos number" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/newsfeed_newsfeed_photo" - } - } - } - }, - "newsfeed_item_photo_tag": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "photo_tags": { - "$ref": "#/definitions/newsfeed_item_photo_tag_photo_tags" - }, - "post_id": { - "type": "integer", - "description": "Post ID" - } - } - } - ] - }, - "newsfeed_item_photo_tag_photo_tags": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Tags number" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/newsfeed_newsfeed_photo" - } - } - } - }, - "newsfeed_item_stories_block": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "block_type": { - "type": "string", - "enum": [ - "local", - "remote" - ] - }, - "stories": { - "type": "array", - "items": { - "$ref": "#/definitions/stories_story" - } - }, - "title": { - "type": "string" - }, - "track_code": { - "type": "string" - } - } - } - ] - }, - "newsfeed_item_topic": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "comments": { - "$ref": "#/definitions/base_comments_info" - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "post_id": { - "type": "integer", - "description": "Topic post ID" - }, - "text": { - "type": "string", - "description": "Post text" - } - }, - "required": [ - "post_id", - "text" - ] - } - ] - }, - "newsfeed_item_video": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "video": { - "$ref": "#/definitions/newsfeed_item_video_video" - } - } - } - ] - }, - "newsfeed_item_video_video": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Tags number" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/video_video" - } - } - } - }, - "newsfeed_item_wallpost": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_item_base" - }, - { - "properties": { - "activity": { - "$ref": "#/definitions/newsfeed_event_activity" - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost_attachment" - } - }, - "comments": { - "$ref": "#/definitions/base_comments_info" - }, - "copy_history": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost" - } - }, - "geo": { - "$ref": "#/definitions/base_geo" - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "post_id": { - "type": "integer", - "description": "Post ID" - }, - "post_source": { - "$ref": "#/definitions/wall_post_source" - }, - "post_type": { - "$ref": "#/definitions/newsfeed_item_wallpost_type" - }, - "reposts": { - "$ref": "#/definitions/base_reposts_info" - }, - "text": { - "type": "string", - "description": "Post text" - } - } - } - ] - }, - "newsfeed_item_wallpost_type": { - "type": "string", - "description": "Post type", - "enum": [ - "post", - "copy", - "reply" - ] - }, - "newsfeed_list": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "List ID" - }, - "title": { - "type": "string", - "description": "List title" - } - }, - "required": [ - "id", - "title" - ], - "additionalProperties": false - }, - "newsfeed_list_full": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/newsfeed_list" - }, - { - "properties": { - "no_reposts": { - "description": "Information whether reposts hiding is enabled", - "$ref": "#/definitions/base_bool_int" - }, - "source_ids": { - "type": "array", - "items": { - "type": "integer", - "description": "Users and communities IDs" - } - } - } - } - ] - }, - "newsfeed_newsfeed_item": { - "type": "object", - "oneOf": [ - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_wallpost" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_photo" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_photo_tag" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_friend" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_note" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_audio" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_video" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_topic" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_digest" - }, - { - "invalid_one_of": true, - "$ref": "#/definitions/newsfeed_item_stories_block" - } - ] - }, - "newsfeed_newsfeed_item_type": { - "type": "string", - "description": "Item type", - "enum": [ - "post", - "photo", - "photo_tag", - "wall_photo", - "friend", - "note", - "audio", - "video", - "topic", - "digest", - "stories" - ] - }, - "newsfeed_newsfeed_note": { - "type": "object", - "properties": { - "comments": { - "type": "integer", - "description": "Comments Number" - }, - "id": { - "type": "integer", - "description": "Note ID" - }, - "owner_id": { - "type": "integer", - "description": "integer" - }, - "title": { - "type": "string", - "description": "Note title" - } - } - }, - "newsfeed_newsfeed_photo": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/photos_photo" - }, - { - "properties": { - "likes": { - "$ref": "#/definitions/base_likes" - }, - "comments": { - "$ref": "#/definitions/base_object_count" - }, - "can_comment": { - "description": "Information whether current user can comment the photo", - "$ref": "#/definitions/base_bool_int" - }, - "can_repost": { - "description": "Information whether current user can repost the photo", - "$ref": "#/definitions/base_bool_int" - } - } - } - ] - }, - "notes_note": { - "type": "object", - "properties": { - "read_comments": { - "type": "integer", - "minimum": 0 - }, - "can_comment": { - "description": "Information whether current user can comment the note", - "$ref": "#/definitions/base_bool_int" - }, - "comments": { - "type": "integer", - "description": "Comments number", - "minimum": 0 - }, - "date": { - "type": "integer", - "description": "Date when the note has been created in Unixtime", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Note ID", - "minimum": 1 - }, - "owner_id": { - "type": "integer", - "description": "Note owner's ID", - "minimum": 1 - }, - "text": { - "type": "string", - "description": "Note text" - }, - "text_wiki": { - "type": "string", - "description": "Note text in wiki format" - }, - "title": { - "type": "string", - "description": "Note title" - }, - "view_url": { - "type": "string", - "format": "uri", - "description": "URL of the page with note preview" - } - }, - "required": [ - "id", - "owner_id", - "comments", - "date", - "title", - "view_url" - ], - "additionalProperties": false - }, - "notes_note_comment": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when the comment has beed added in Unixtime" - }, - "id": { - "type": "integer", - "description": "Comment ID" - }, - "message": { - "type": "string", - "description": "Comment text" - }, - "nid": { - "type": "integer", - "description": "Note ID" - }, - "oid": { - "type": "integer", - "description": "Note ID" - }, - "reply_to": { - "type": "integer", - "description": "ID of replied comment " - }, - "uid": { - "type": "integer", - "description": "Comment author's ID" - } - }, - "required": [ - "id", - "uid", - "nid", - "oid", - "date", - "message" - ], - "additionalProperties": false - }, - "notifications_feedback": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost_attachment" - } - }, - "from_id": { - "type": "integer", - "description": "Reply author's ID" - }, - "geo": { - "$ref": "#/definitions/base_geo" - }, - "id": { - "type": "integer", - "description": "Item ID" - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "text": { - "type": "string", - "description": "Reply text" - }, - "to_id": { - "type": "integer", - "description": "Wall owner's ID" - } - } - }, - "notifications_notification": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when the event has been occurred" - }, - "feedback": { - "$ref": "#/definitions/notifications_feedback" - }, - "parent": { - "$ref": "#/definitions/notifications_notification_parent" - }, - "reply": { - "$ref": "#/definitions/notifications_reply" - }, - "type": { - "type": "string", - "description": "Notification type" - } - } - }, - "notifications_notification_parent": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/wall_wallpost_to_id" - }, - { - "$ref": "#/definitions/photos_photo" - }, - { - "$ref": "#/definitions/board_topic" - }, - { - "$ref": "#/definitions/video_video" - }, - { - "$ref": "#/definitions/notifications_notifications_comment" - } - ] - }, - "notifications_notifications_comment": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when the comment has been added in Unixtime", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Comment ID", - "minimum": 1 - }, - "owner_id": { - "type": "integer", - "description": "Author ID" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "post": { - "$ref": "#/definitions/wall_wallpost" - }, - "text": { - "type": "string", - "description": "Comment text" - }, - "topic": { - "$ref": "#/definitions/board_topic" - }, - "video": { - "$ref": "#/definitions/video_video" - } - } - }, - "notifications_reply": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when the reply has been created in Unixtime" - }, - "id": { - "type": "integer", - "description": "Reply ID" - }, - "text": { - "type": "integer", - "description": "Reply text" - } - } - }, - "notifications_send_message_error": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "enum": [ - 1, - 2, - 3, - 4 - ], - "enumNames": [ - "notifications disabled", - "flood control per hour", - "flood control per day", - "app is not installed" - ], - "description": "Error code" - }, - "description": { - "type": "string", - "description": "Error description" - } - } - }, - "notifications_send_message_item": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "description": "User ID" - }, - "status": { - "type": "boolean", - "description": "Notification status" - }, - "error": { - "$ref": "#/definitions/notifications_send_message_error" - } - } - }, - "oauth_error": { - "type": "object", - "properties": { - "error": { - "type": "string", - "description": "Error type" - }, - "error_description": { - "type": "string", - "description": "Error description" - }, - "redirect_uri": { - "type": "string", - "description": "URI for validation" - } - }, - "required": [ - "error", - "error_description" - ], - "withoutRefs": true - }, - "orders_amount": { - "type": "object", - "properties": { - "amounts": { - "type": "array", - "items": { - "$ref": "#/definitions/orders_amount_item" - } - }, - "currency": { - "type": "string", - "description": "Currency name" - } - } - }, - "orders_amount_item": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "description": "Votes amount in user's currency" - }, - "description": { - "type": "string", - "description": "Amount description" - }, - "votes": { - "type": "string", - "description": "Votes number" - } - } - }, - "orders_order": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "description": "Amount" - }, - "app_order_id": { - "type": "integer", - "description": "App order ID" - }, - "cancel_transaction_id": { - "type": "integer", - "description": "Cancel transaction ID" - }, - "date": { - "type": "integer", - "description": "Date of creation in Unixtime" - }, - "id": { - "type": "integer", - "description": "Order ID" - }, - "item": { - "type": "string", - "description": "Order item" - }, - "receiver_id": { - "type": "integer", - "description": "Receiver ID" - }, - "status": { - "type": "string", - "description": "Order status" - }, - "transaction_id": { - "type": "integer", - "description": "Transaction ID" - }, - "user_id": { - "type": "integer", - "description": "User ID" - } - } - }, - "orders_subscription": { - "type": "object", - "properties": { - "cancel_reason": { - "type": "string", - "description": "Cancel reason" - }, - "create_time": { - "type": "integer", - "description": "Date of creation in Unixtime" - }, - "id": { - "type": "integer", - "description": "Subscription ID" - }, - "item_id": { - "type": "string", - "description": "Subscription order item" - }, - "next_bill_time": { - "type": "integer", - "description": "Date of next bill in Unixtime" - }, - "pending_cancel": { - "type": "boolean", - "description": "Pending cancel state" - }, - "period": { - "type": "integer", - "description": "Subscription period" - }, - "period_start_time": { - "type": "integer", - "description": "Date of last period start in Unixtime" - }, - "price": { - "type": "integer", - "description": "Subscription price" - }, - "status": { - "type": "string", - "description": "Subscription status" - }, - "test_mode": { - "type": "boolean", - "description": "Is test subscription" - }, - "trial_expire_time": { - "type": "integer", - "description": "Date of trial expire in Unixtime" - }, - "update_time": { - "type": "integer", - "description": "Date of last change in Unixtime" - } - }, - "required": [ - "id", - "item_id", - "status", - "price", - "period", - "create_time", - "update_time", - "period_start_time" - ], - "additionalProperties": false - }, - "pages_privacy_settings": { - "type": "integer", - "enum": [ - 0, - 1, - 2 - ], - "enumNames": [ - "community managers only", - "community members only", - "everyone" - ] - }, - "pages_wikipage": { - "type": "object", - "properties": { - "creator_id": { - "type": "integer", - "description": "Page creator ID" - }, - "creator_name": { - "type": "integer", - "description": "Page creator name" - }, - "editor_id": { - "type": "integer", - "description": "Last editor ID" - }, - "editor_name": { - "type": "string", - "description": "Last editor name" - }, - "group_id": { - "type": "integer", - "description": "Community ID", - "minimum": 1 - }, - "id": { - "type": "integer", - "description": "Page ID", - "minimum": 1 - }, - "title": { - "type": "string", - "description": "Page title" - }, - "views": { - "type": "integer", - "description": "Views number" - }, - "who_can_edit": { - "description": "Edit settings of the page", - "$ref": "#/definitions/pages_privacy_settings" - }, - "who_can_view": { - "description": "View settings of the page", - "$ref": "#/definitions/pages_privacy_settings" - } - }, - "required": [ - "id", - "group_id", - "title", - "views", - "who_can_view", - "who_can_edit" - ], - "additionalProperties": false - }, - "pages_wikipage_full": { - "type": "object", - "properties": { - "created": { - "type": "integer", - "description": "Date when the page has been created in Unixtime" - }, - "creator_id": { - "type": "integer", - "description": "Page creator ID" - }, - "current_user_can_edit": { - "description": "Information whether current user can edit the page", - "$ref": "#/definitions/base_bool_int" - }, - "current_user_can_edit_access": { - "description": "Information whether current user can edit the page access settings", - "$ref": "#/definitions/base_bool_int" - }, - "edited": { - "type": "integer", - "description": "Date when the page has been edited in Unixtime" - }, - "editor_id": { - "type": "integer", - "description": "Last editor ID" - }, - "group_id": { - "type": "integer", - "description": "Community ID", - "minimum": 1 - }, - "html": { - "type": "string", - "description": "Page content, HTML" - }, - "id": { - "type": "integer", - "description": "Page ID", - "minimum": 1 - }, - "source": { - "type": "string", - "description": "Page content, wiki" - }, - "title": { - "type": "string", - "description": "Page title" - }, - "view_url": { - "type": "string", - "format": "uri", - "description": "URL of the page preview" - }, - "views": { - "type": "integer", - "description": "Views number" - }, - "who_can_edit": { - "description": "Edit settings of the page", - "$ref": "#/definitions/pages_privacy_settings" - }, - "who_can_view": { - "description": "View settings of the page", - "$ref": "#/definitions/pages_privacy_settings" - } - }, - "required": [ - "id", - "group_id", - "title", - "edited", - "created", - "views", - "view_url", - "who_can_view", - "who_can_edit" - ], - "additionalProperties": false - }, - "pages_wikipage_history": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Version ID", - "minimum": 0 - }, - "length": { - "type": "integer", - "minimum": 0, - "description": "Page size in bytes" - }, - "date": { - "type": "integer", - "minimum": 0, - "description": "Date when the page has been edited in Unixtime" - }, - "editor_id": { - "type": "integer", - "description": "Last editor ID" - }, - "editor_name": { - "type": "string", - "description": "Last editor name" - } - }, - "required": [ - "id", - "length", - "date", - "editor_id", - "editor_name" - ] - }, - "photos_comment_xtr_pid": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_comment_attachment" - } - }, - "date": { - "type": "integer", - "description": "Date when the comment has been added in Unixtime", - "minimum": 0 - }, - "from_id": { - "type": "integer", - "description": "Author ID" - }, - "id": { - "type": "integer", - "description": "Comment ID", - "minimum": 1 - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "pid": { - "type": "integer", - "description": "Photo ID", - "minimum": 1 - }, - "reply_to_comment": { - "type": "integer", - "description": "Replied comment ID" - }, - "reply_to_user": { - "type": "integer", - "description": "Replied user ID" - }, - "text": { - "type": "string", - "description": "Comment text" - }, - "parents_stack": { - "type": "array", - "items": { - "type": "integer" - } - }, - "thread": { - "$ref": "#/definitions/comment_thread" - } - }, - "required": [ - "id", - "from_id", - "date", - "text", - "pid" - ], - "additionalProperties": false - }, - "photos_image": { - "type": "object", - "properties": { - "height": { - "type": "integer", - "description": "Height of the photo in px." - }, - "type": { - "$ref": "#/definitions/photos_image_type" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Photo URL." - }, - "width": { - "type": "integer", - "description": "Width of the photo in px." - } - } - }, - "photos_image_type": { - "type": "string", - "description": "Photo's type.", - "enum": [ - "s", - "m", - "x", - "o", - "p", - "q", - "r", - "y", - "z", - "w" - ] - }, - "photos_market_album_upload_response": { - "type": "object", - "properties": { - "gid": { - "type": "integer", - "description": "Community ID" - }, - "hash": { - "type": "string", - "description": "Uploading hash" - }, - "photo": { - "type": "string", - "description": "Uploaded photo data" - }, - "server": { - "type": "integer", - "description": "Upload server number" - } - }, - "withoutRefs": true - }, - "photos_market_upload_response": { - "type": "object", - "properties": { - "crop_data": { - "type": "string", - "description": "Crop data" - }, - "crop_hash": { - "type": "string", - "description": "Crop hash" - }, - "group_id": { - "type": "integer", - "description": "Community ID" - }, - "hash": { - "type": "string", - "description": "Uploading hash" - }, - "photo": { - "type": "string", - "description": "Uploaded photo data" - }, - "server": { - "type": "integer", - "description": "Upload server number" - } - }, - "withoutRefs": true - }, - "photos_message_upload_response": { - "type": "object", - "properties": { - "hash": { - "type": "string", - "description": "Uploading hash" - }, - "photo": { - "type": "string", - "description": "Uploaded photo data" - }, - "server": { - "type": "integer", - "description": "Upload server number" - } - }, - "withoutRefs": true - }, - "photos_owner_upload_response": { - "type": "object", - "properties": { - "hash": { - "type": "string", - "description": "Uploading hash" - }, - "photo": { - "type": "string", - "description": "Uploaded photo data" - }, - "server": { - "type": "integer", - "description": "Upload server number" - } - }, - "withoutRefs": true - }, - "photos_photo": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the photo" - }, - "album_id": { - "type": "integer", - "description": "Album ID" - }, - "date": { - "type": "integer", - "description": "Date when uploaded", - "minimum": 0 - }, - "height": { - "type": "integer", - "description": "Original photo height", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Photo ID", - "minimum": 0 - }, - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_image" - } - }, - "lat": { - "type": "number", - "description": "Latitude" - }, - "long": { - "type": "number", - "description": "Longitude" - }, - "owner_id": { - "type": "integer", - "description": "Photo owner's ID" - }, - "post_id": { - "type": "integer", - "description": "Post ID", - "minimum": 1 - }, - "sizes": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo_sizes" - } - }, - "text": { - "type": "string", - "description": "Photo caption" - }, - "user_id": { - "type": "integer", - "description": "ID of the user who have uploaded the photo", - "minimum": 1 - }, - "width": { - "type": "integer", - "description": "Original photo width", - "minimum": 0 - } - }, - "required": [ - "id", - "album_id", - "owner_id", - "date" - ], - "additionalProperties": false - }, - "photos_photo_album": { - "type": "object", - "properties": { - "created": { - "type": "integer", - "description": "Date when the album has been created in Unixtime", - "minimum": 0 - }, - "description": { - "type": "string", - "description": "Photo album description" - }, - "id": { - "type": "integer", - "description": "Photo album ID" - }, - "owner_id": { - "type": "integer", - "description": "Album owner's ID" - }, - "size": { - "type": "integer", - "description": "Photos number", - "minimum": 0 - }, - "thumb": { - "$ref": "#/definitions/photos_photo" - }, - "title": { - "type": "string", - "description": "Photo album title" - }, - "updated": { - "type": "integer", - "description": "Date when the album has been updated last time in Unixtime", - "minimum": 0 - } - }, - "required": [ - "id", - "owner_id", - "title", - "created", - "updated", - "size" - ], - "additionalProperties": false - }, - "photos_photo_album_full": { - "type": "object", - "properties": { - "can_upload": { - "description": "Information whether current user can upload photo to the album", - "$ref": "#/definitions/base_bool_int" - }, - "comments_disabled": { - "description": "Information whether album comments are disabled", - "$ref": "#/definitions/base_bool_int" - }, - "created": { - "type": "integer", - "description": "Date when the album has been created in Unixtime", - "minimum": 0 - }, - "description": { - "type": "string", - "description": "Photo album description" - }, - "id": { - "type": "integer", - "description": "Photo album ID" - }, - "owner_id": { - "type": "integer", - "description": "Album owner's ID" - }, - "size": { - "type": "integer", - "description": "Photos number", - "minimum": 0 - }, - "sizes": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo_sizes" - } - }, - "thumb_id": { - "type": "integer", - "description": "Thumb photo ID", - "minimum": 0 - }, - "thumb_is_last": { - "description": "Information whether the album thumb is last photo", - "$ref": "#/definitions/base_bool_int" - }, - "thumb_src": { - "type": "string", - "format": "uri", - "description": "URL of the thumb image" - }, - "title": { - "type": "string", - "description": "Photo album title" - }, - "updated": { - "type": "integer", - "description": "Date when the album has been updated last time in Unixtime", - "minimum": 0 - }, - "upload_by_admins_only": { - "description": "Information whether only community administrators can upload photos", - "$ref": "#/definitions/base_bool_int" - } - }, - "required": [ - "id", - "owner_id", - "title", - "created", - "updated", - "size" - ], - "additionalProperties": false - }, - "photos_photo_full": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the photo" - }, - "album_id": { - "type": "integer", - "description": "Album ID" - }, - "can_comment": { - "description": "Information whether current user can comment the photo", - "$ref": "#/definitions/base_bool_int" - }, - "comments": { - "$ref": "#/definitions/base_object_count" - }, - "date": { - "type": "integer", - "description": "Date when uploaded", - "minimum": 0 - }, - "height": { - "type": "integer", - "description": "Original photo height", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Photo ID", - "minimum": 0 - }, - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_image" - } - }, - "lat": { - "type": "number", - "description": "Latitude" - }, - "likes": { - "$ref": "#/definitions/base_likes" - }, - "long": { - "type": "number", - "description": "Longitude" - }, - "owner_id": { - "type": "integer", - "description": "Photo owner's ID" - }, - "post_id": { - "type": "integer", - "description": "Post ID", - "minimum": 1 - }, - "reposts": { - "$ref": "#/definitions/base_object_count" - }, - "tags": { - "$ref": "#/definitions/base_object_count" - }, - "text": { - "type": "string", - "description": "Photo caption" - }, - "user_id": { - "type": "integer", - "description": "ID of the user who have uploaded the photo", - "minimum": 1 - }, - "width": { - "type": "integer", - "description": "Original photo width", - "minimum": 0 - } - }, - "required": [ - "id", - "album_id", - "owner_id", - "date" - ], - "additionalProperties": false - }, - "photos_photo_full_xtr_real_offset": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the photo" - }, - "album_id": { - "type": "integer", - "description": "Album ID" - }, - "can_comment": { - "$ref": "#/definitions/base_bool_int" - }, - "comments": { - "$ref": "#/definitions/base_object_count" - }, - "date": { - "type": "integer", - "description": "Date when uploaded", - "minimum": 0 - }, - "height": { - "type": "integer", - "description": "Original photo height", - "minimum": 0 - }, - "hidden": { - "description": "Returns if the photo is hidden above the wall", - "$ref": "#/definitions/base_property_exists" - }, - "id": { - "type": "integer", - "description": "Photo ID", - "minimum": 0 - }, - "lat": { - "type": "number", - "description": "Latitude" - }, - "likes": { - "$ref": "#/definitions/base_likes" - }, - "long": { - "type": "number", - "description": "Longitude" - }, - "owner_id": { - "type": "integer", - "description": "Photo owner's ID" - }, - "photo_1280": { - "type": "string", - "format": "uri", - "description": "URL of image with 1280 px width" - }, - "photo_130": { - "type": "string", - "format": "uri", - "description": "URL of image with 130 px width" - }, - "photo_2560": { - "type": "string", - "format": "uri", - "description": "URL of image with 2560 px width" - }, - "photo_604": { - "type": "string", - "format": "uri", - "description": "URL of image with 604 px width" - }, - "photo_75": { - "type": "string", - "format": "uri", - "description": "URL of image with 75 px width" - }, - "photo_807": { - "type": "string", - "format": "uri", - "description": "URL of image with 807 px width" - }, - "post_id": { - "type": "integer", - "description": "Post ID", - "minimum": 1 - }, - "real_offset": { - "type": "integer", - "description": "Real position of the photo" - }, - "reposts": { - "$ref": "#/definitions/base_object_count" - }, - "sizes": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo_sizes" - } - }, - "tags": { - "$ref": "#/definitions/base_object_count" - }, - "text": { - "type": "string", - "description": "Photo caption" - }, - "user_id": { - "type": "integer", - "description": "ID of the user who have uploaded the photo", - "minimum": 1 - }, - "width": { - "type": "integer", - "description": "Original photo width", - "minimum": 0 - } - }, - "required": [ - "id", - "album_id", - "owner_id", - "date" - ], - "additionalProperties": false - }, - "photos_photo_sizes": { - "type": "object", - "properties": { - "height": { - "type": "integer", - "description": "Height in px", - "minimum": 0 - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL of the image" - }, - "type": { - "$ref": "#/definitions/photos_photo_sizes_type" - }, - "width": { - "type": "integer", - "description": "Width in px", - "minimum": 0 - } - }, - "required": [ - "url", - "width", - "height", - "type" - ], - "additionalProperties": false - }, - "photos_photo_sizes_type": { - "type": "string", - "description": "Size type", - "enum": [ - "s", - "m", - "x", - "o", - "p", - "q", - "r", - "y", - "z", - "w" - ] - }, - "photos_photo_tag": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when tag has been added in Unixtime", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Tag ID" - }, - "placer_id": { - "type": "integer", - "description": "ID of the tag creator" - }, - "tagged_name": { - "type": "string", - "description": "Tag description" - }, - "user_id": { - "type": "integer", - "description": "Tagged user ID" - }, - "viewed": { - "description": "Information whether the tag is reviewed", - "$ref": "#/definitions/base_bool_int" - }, - "x": { - "type": "number", - "description": "Coordinate X of the left upper corner" - }, - "x2": { - "type": "number", - "description": "Coordinate X of the right lower corner" - }, - "y": { - "type": "number", - "description": "Coordinate Y of the left upper corner" - }, - "y2": { - "type": "number", - "description": "Coordinate Y of the right lower corner" - } - }, - "required": [ - "user_id", - "id", - "tagged_name", - "placer_id", - "date", - "x", - "y", - "x2", - "y2", - "viewed" - ], - "additionalProperties": false - }, - "photos_photo_upload": { - "type": "object", - "properties": { - "album_id": { - "type": "integer", - "description": "Album ID" - }, - "upload_url": { - "type": "string", - "format": "uri", - "description": "URL to upload photo" - }, - "user_id": { - "type": "integer", - "description": "User ID" - } - }, - "required": [ - "upload_url", - "album_id", - "user_id" - ], - "additionalProperties": false - }, - "photos_photo_upload_response": { - "type": "object", - "properties": { - "aid": { - "type": "integer", - "description": "Album ID" - }, - "hash": { - "type": "string", - "description": "Uploading hash" - }, - "photos_list": { - "type": "string", - "description": "Uploaded photos data" - }, - "server": { - "type": "integer", - "description": "Upload server number" - } - }, - "withoutRefs": true - }, - "photos_photo_xtr_real_offset": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the photo" - }, - "album_id": { - "type": "integer", - "description": "Album ID" - }, - "date": { - "type": "integer", - "description": "Date when uploaded", - "minimum": 0 - }, - "height": { - "type": "integer", - "description": "Original photo height", - "minimum": 0 - }, - "hidden": { - "description": "Returns if the photo is hidden above the wall", - "$ref": "#/definitions/base_property_exists" - }, - "id": { - "type": "integer", - "description": "Photo ID", - "minimum": 0 - }, - "lat": { - "type": "number", - "description": "Latitude" - }, - "long": { - "type": "number", - "description": "Longitude" - }, - "owner_id": { - "type": "integer", - "description": "Photo owner's ID" - }, - "photo_1280": { - "type": "string", - "format": "uri", - "description": "URL of image with 1280 px width" - }, - "photo_130": { - "type": "string", - "format": "uri", - "description": "URL of image with 130 px width" - }, - "photo_2560": { - "type": "string", - "format": "uri", - "description": "URL of image with 2560 px width" - }, - "photo_604": { - "type": "string", - "format": "uri", - "description": "URL of image with 604 px width" - }, - "photo_75": { - "type": "string", - "format": "uri", - "description": "URL of image with 75 px width" - }, - "photo_807": { - "type": "string", - "format": "uri", - "description": "URL of image with 807 px width" - }, - "post_id": { - "type": "integer", - "description": "Post ID", - "minimum": 1 - }, - "real_offset": { - "type": "integer", - "description": "Real position of the photo" - }, - "sizes": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo_sizes" - } - }, - "text": { - "type": "string", - "description": "Photo caption" - }, - "user_id": { - "type": "integer", - "description": "ID of the user who have uploaded the photo", - "minimum": 1 - }, - "width": { - "type": "integer", - "description": "Original photo width", - "minimum": 0 - } - }, - "required": [ - "id", - "album_id", - "owner_id", - "date" - ], - "additionalProperties": false - }, - "photos_photo_xtr_tag_info": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the photo" - }, - "album_id": { - "type": "integer", - "description": "Album ID" - }, - "date": { - "type": "integer", - "description": "Date when uploaded", - "minimum": 0 - }, - "height": { - "type": "integer", - "description": "Original photo height", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Photo ID", - "minimum": 0 - }, - "lat": { - "type": "number", - "description": "Latitude" - }, - "long": { - "type": "number", - "description": "Longitude" - }, - "owner_id": { - "type": "integer", - "description": "Photo owner's ID" - }, - "photo_1280": { - "type": "string", - "format": "uri", - "description": "URL of image with 1280 px width" - }, - "photo_130": { - "type": "string", - "format": "uri", - "description": "URL of image with 130 px width" - }, - "photo_2560": { - "type": "string", - "format": "uri", - "description": "URL of image with 2560 px width" - }, - "photo_604": { - "type": "string", - "format": "uri", - "description": "URL of image with 604 px width" - }, - "photo_75": { - "type": "string", - "format": "uri", - "description": "URL of image with 75 px width" - }, - "photo_807": { - "type": "string", - "format": "uri", - "description": "URL of image with 807 px width" - }, - "placer_id": { - "type": "integer", - "description": "ID of the tag creator" - }, - "post_id": { - "type": "integer", - "description": "Post ID", - "minimum": 1 - }, - "sizes": { - "type": "array", - "items": { - "$ref": "#/definitions/photos_photo_sizes" - } - }, - "tag_created": { - "type": "integer", - "description": "Date when tag has been added in Unixtime", - "minimum": 0 - }, - "tag_id": { - "type": "integer", - "description": "Tag ID" - }, - "text": { - "type": "string", - "description": "Photo caption" - }, - "user_id": { - "type": "integer", - "description": "ID of the user who have uploaded the photo", - "minimum": 1 - }, - "width": { - "type": "integer", - "description": "Original photo width", - "minimum": 0 - } - }, - "required": [ - "id", - "album_id", - "owner_id", - "date" - ], - "additionalProperties": false - }, - "photos_wall_upload_response": { - "type": "object", - "properties": { - "hash": { - "type": "string", - "description": "Uploading hash" - }, - "photo": { - "type": "string", - "description": "Uploaded photo data" - }, - "server": { - "type": "integer", - "description": "Upload server number" - } - }, - "withoutRefs": true - }, - "polls_answer": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Answer ID", - "minimum": 0 - }, - "rate": { - "type": "number", - "description": "Answer rate in percents", - "minimum": 0 - }, - "text": { - "type": "string", - "description": "Answer text" - }, - "votes": { - "type": "integer", - "description": "Votes number", - "minimum": 0 - } - }, - "required": [ - "id", - "text", - "votes", - "rate" - ], - "additionalProperties": false - }, - "polls_poll": { - "type": "object", - "properties": { - "anonymous": { - "description": "Information whether the field is anonymous", - "type": "boolean" - }, - "answer_id": { - "type": "integer", - "description": "Current user's answer ID", - "minimum": 0 - }, - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/polls_answer" - } - }, - "created": { - "type": "integer", - "description": "Date when poll has been created in Unixtime", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Poll ID", - "minimum": 1 - }, - "owner_id": { - "type": "integer", - "description": "Poll owner's ID" - }, - "question": { - "type": "string", - "description": "Poll question" - }, - "votes": { - "type": "string", - "description": "Votes number", - "minimum": 0 - } - }, - "required": [ - "id", - "owner_id", - "created", - "question", - "votes", - "answer_id", - "answers", - "anonymous" - ], - "additionalProperties": false - }, - "polls_voters": { - "type": "object", - "properties": { - "answer_id": { - "type": "integer", - "description": "Answer ID" - }, - "users": { - "$ref": "#/definitions/polls_voters_users" - } - } - }, - "polls_voters_users": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Votes number" - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID" - } - } - } - }, - "prettyCards_prettyCard": { - "type": "object", - "properties": { - "button": { - "type": "string", - "description": "Button key" - }, - "button_text": { - "type": "string", - "description": "Button text in current language" - }, - "card_id": { - "type": "string", - "description": "Card ID (long int returned as string)" - }, - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/base_image" - } - }, - "link_url": { - "type": "string", - "description": "Link URL" - }, - "photo": { - "type": "string", - "description": "Photo ID (format \"_\")" - }, - "price": { - "type": "string", - "description": "Price if set (decimal number returned as string)" - }, - "price_old": { - "type": "string", - "description": "Old price if set (decimal number returned as string)" - }, - "title": { - "type": "string", - "description": "Title" - } - }, - "required": [ - "card_id", - "link_url", - "title", - "photo" - ] - }, - "search_hint": { - "type": "object", - "properties": { - "app": { - "$ref": "#/definitions/apps_app" - }, - "description": { - "type": "string", - "description": "Object description" - }, - "global": { - "description": "Information whether the object has been found globally", - "$ref": "#/definitions/base_bool_int" - }, - "group": { - "$ref": "#/definitions/groups_group" - }, - "profile": { - "$ref": "#/definitions/users_user_min" - }, - "section": { - "$ref": "#/definitions/search_hint_section" - }, - "type": { - "$ref": "#/definitions/search_hint_type" - } - }, - "required": [ - "type", - "section", - "description" - ] - }, - "search_hint_section": { - "type": "string", - "description": "Section title", - "enum": [ - "groups", - "events", - "publics", - "correspondents", - "people", - "friends", - "mutual_friends" - ] - }, - "search_hint_type": { - "type": "string", - "description": "Object type", - "enum": [ - "group", - "profile", - "vk_app" - ] - }, - "secure_level": { - "type": "object", - "properties": { - "level": { - "type": "integer", - "description": "Level" - }, - "uid": { - "type": "integer", - "description": "User ID" - } - } - }, - "secure_sms_notification": { - "type": "object", - "properties": { - "app_id": { - "type": "string", - "description": "Application ID" - }, - "date": { - "type": "string", - "description": "Date when message has been sent in Unixtime" - }, - "id": { - "type": "string", - "description": "Notification ID" - }, - "message": { - "type": "string", - "description": "Messsage text" - }, - "user_id": { - "type": "string", - "description": "User ID" - } - } - }, - "secure_token_checked": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Date when access_token has been generated in Unixtime" - }, - "expire": { - "type": "integer", - "description": "Date when access_token will expire in Unixtime" - }, - "success": { - "description": "Returns if successfully processed", - "$ref": "#/definitions/base_ok_response" - }, - "user_id": { - "type": "integer", - "description": "User ID" - } - } - }, - "secure_transaction": { - "type": "object", - "properties": { - "date": { - "type": "integer", - "description": "Transaction date in Unixtime" - }, - "id": { - "type": "integer", - "description": "Transaction ID" - }, - "uid_from": { - "type": "integer", - "description": "From ID" - }, - "uid_to": { - "type": "integer", - "description": "To ID" - }, - "votes": { - "type": "integer", - "description": "Votes number" - } - } - }, - "stats_activity": { - "type": "object", - "description": "Activity stats", - "properties": { - "comments": { - "type": "integer", - "minimum": 0, - "description": "Comments number" - }, - "copies": { - "type": "integer", - "minimum": 0, - "description": "Reposts number" - }, - "hidden": { - "type": "integer", - "minimum": 0, - "description": "Hidden from news count" - }, - "likes": { - "type": "integer", - "minimum": 0, - "description": "Likes number" - }, - "subscribed": { - "type": "integer", - "minimum": 0, - "description": "New subscribers count" - }, - "unsubscribed": { - "type": "integer", - "minimum": 0, - "description": "Unsubscribed count" - } - } - }, - "stats_city": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Visitors number", - "minimum": 0 - }, - "name": { - "type": "string", - "description": "City name" - }, - "value": { - "type": "integer", - "description": "City ID" - } - } - }, - "stats_country": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Country code" - }, - "count": { - "type": "integer", - "minimum": 0, - "description": "Visitors number" - }, - "name": { - "type": "string", - "description": "Country name" - }, - "value": { - "type": "integer", - "description": "Country ID" - } - } - }, - "stats_period": { - "type": "object", - "properties": { - "activity": { - "$ref": "#/definitions/stats_activity" - }, - "period_from": { - "type": "integer", - "description": "Unix timestamp" - }, - "period_to": { - "type": "integer", - "description": "Unix timestamp" - }, - "reach": { - "$ref": "#/definitions/stats_reach" - }, - "visitors": { - "$ref": "#/definitions/stats_views" - } - } - }, - "stats_reach": { - "type": "object", - "description": "Reach stats", - "properties": { - "age": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_sex_age" - } - }, - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_city" - } - }, - "countries": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_country" - } - }, - "mobile_reach": { - "type": "integer", - "minimum": 0, - "description": "Reach count from mobile devices" - }, - "reach": { - "type": "integer", - "minimum": 0, - "description": "Reach count" - }, - "reach_subscribers": { - "type": "integer", - "minimum": 0, - "description": "Subscribers reach count" - }, - "sex": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_sex_age" - } - }, - "sex_age": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_sex_age" - } - } - } - }, - "stats_sex_age": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Visitors number" - }, - "value": { - "type": "string", - "description": "Sex/age value" - } - } - }, - "stats_views": { - "type": "object", - "description": "Views stats", - "properties": { - "age": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_sex_age" - } - }, - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_city" - } - }, - "countries": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_country" - } - }, - "mobile_views": { - "type": "integer", - "minimum": 0, - "description": "Number of views from mobile devices" - }, - "sex": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_sex_age" - } - }, - "sex_age": { - "type": "array", - "items": { - "$ref": "#/definitions/stats_sex_age" - } - }, - "views": { - "type": "integer", - "minimum": 0, - "description": "Views number" - }, - "visitors": { - "type": "integer", - "minimum": 0, - "description": "Visitors number" - } - } - }, - "stats_wallpost_stat": { - "type": "object", - "properties": { - "hide": { - "type": "integer", - "description": "Hidings number" - }, - "join_group": { - "type": "integer", - "description": "People have joined the group" - }, - "links": { - "type": "integer", - "description": "Link clickthrough" - }, - "reach_subscribers": { - "type": "integer", - "description": "Subscribers reach" - }, - "reach_total": { - "type": "integer", - "description": "Total reach" - }, - "report": { - "type": "integer", - "description": "Reports number" - }, - "to_group": { - "type": "integer", - "description": "Clickthrough to community" - }, - "unsubscribe": { - "type": "integer", - "description": "Unsubscribed members" - } - } - }, - "status_status": { - "type": "object", - "properties": { - "audio": { - "$ref": "#/definitions/audio_audio" - }, - "text": { - "type": "string", - "description": "Status text" - } - } - }, - "storage_value": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "key", - "value" - ] - }, - "stories_promo_block": { - "type": "object", - "description": "Additional data for promo stories", - "properties": { - "name": { - "type": "string", - "description": "Promo story title" - }, - "photo_50": { - "type": "string", - "description": "RL of square photo of the story with 50 pixels in width" - }, - "photo_100": { - "type": "string", - "description": "RL of square photo of the story with 100 pixels in width" - }, - "not_animated": { - "type": "boolean", - "description": "Hide animation for promo story" - } - } - }, - "stories_replies": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Replies number.", - "minimum": 0 - }, - "new": { - "type": "integer", - "description": "New replies number." - } - }, - "required": [ - "count" - ] - }, - "stories_story": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for private object." - }, - "can_comment": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can comment the story (0 - no, 1 - yes)." - }, - "can_reply": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can reply to the story (0 - no, 1 - yes)." - }, - "can_see": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can see the story (0 - no, 1 - yes)." - }, - "can_share": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can share the story (0 - no, 1 - yes)." - }, - "date": { - "type": "integer", - "minimum": 0, - "description": "Date when story has been added in Unixtime." - }, - "expires_at": { - "type": "integer", - "minimum": 0, - "description": "Story expiration time. Unixtime." - }, - "id": { - "type": "integer", - "description": "Story ID." - }, - "is_deleted": { - "type": "boolean", - "description": "Information whether the story is deleted (false - no, true - yes)." - }, - "is_expired": { - "type": "boolean", - "description": "Information whether the story is expired (false - no, true - yes)." - }, - "link": { - "$ref": "#/definitions/stories_story_link" - }, - "owner_id": { - "type": "integer", - "description": "Story owner's ID." - }, - "parent_story": { - "$ref": "#/definitions/stories_story" - }, - "parent_story_access_key": { - "type": "string", - "description": "Access key for private object." - }, - "parent_story_id": { - "type": "integer", - "description": "Parent story ID." - }, - "parent_story_owner_id": { - "type": "integer", - "description": "Parent story owner's ID." - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "replies": { - "description": "Replies to current story.", - "$ref": "#/definitions/stories_replies" - }, - "seen": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user has seen the story or not (0 - no, 1 - yes)." - }, - "type": { - "$ref": "#/definitions/stories_story_type" - }, - "video": { - "$ref": "#/definitions/stories_story_video" - }, - "views": { - "type": "integer", - "minimum": 0, - "description": "Views number." - }, - "is_restricted": { - "type": "boolean", - "description": "Does author have stories privacy restrictions" - }, - "no_sound": { - "type": "boolean", - "description": "Is video without sound" - }, - "need_mute": { - "type": "boolean", - "description": "Does video need to be muted" - }, - "can_ask": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether story has question sticker and current user can send question to the author" - }, - "can_ask_anonymous": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether story has question sticker and current user can send anonymous question to the author" - } - }, - "required": [ - "id", - "owner_id" - ] - }, - "stories_story_link": { - "type": "object", - "properties": { - "text": { - "type": "string", - "description": "Link text" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Link URL" - } - }, - "required": [ - "text", - "url" - ] - }, - "stories_story_stats": { - "type": "object", - "properties": { - "answer": { - "$ref": "#/definitions/stories_story_stats_stat" - }, - "bans": { - "$ref": "#/definitions/stories_story_stats_stat" - }, - "open_link": { - "$ref": "#/definitions/stories_story_stats_stat" - }, - "replies": { - "$ref": "#/definitions/stories_story_stats_stat" - }, - "shares": { - "$ref": "#/definitions/stories_story_stats_stat" - }, - "subscribers": { - "$ref": "#/definitions/stories_story_stats_stat" - }, - "views": { - "$ref": "#/definitions/stories_story_stats_stat" - } - }, - "required": [ - "views", - "replies", - "answer", - "shares", - "subscribers", - "bans", - "open_link" - ] - }, - "stories_story_stats_stat": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stat value", - "minimum": 0 - }, - "state": { - "$ref": "#/definitions/stories_story_stats_state" - } - }, - "required": [ - "state" - ] - }, - "stories_story_stats_state": { - "type": "string", - "description": "Statistic state", - "enum": [ - "on", - "off", - "hidden" - ] - }, - "stories_story_type": { - "type": "string", - "description": "Story type.", - "enum": [ - "photo", - "video" - ] - }, - "stories_story_video": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/video_video" - }, - { - "properties": { - "is_private": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether story is private (0 - no, 1 - yes)." - } - } - } - ] - }, - "stories_upload_link_text": { - "type": "string", - "enum": [ - "to_store", - "vote", - "more", - "book", - "order", - "enroll", - "fill", - "signup", - "buy", - "ticket", - "write", - "open", - "learn_more", - "view", - "go_to", - "contact", - "watch", - "play", - "install", - "read" - ] - }, - "users_career": { - "type": "object", - "properties": { - "city_id": { - "type": "integer", - "description": "City ID" - }, - "company": { - "type": "string", - "description": "Company name" - }, - "country_id": { - "type": "integer", - "description": "Country ID" - }, - "from": { - "type": "integer", - "description": "From year" - }, - "group_id": { - "type": "integer", - "description": "Community ID" - }, - "id": { - "type": "integer", - "description": "Career ID" - }, - "position": { - "type": "string", - "description": "Position" - }, - "until": { - "type": "integer", - "description": "Till year" - } - }, - "additionalProperties": false - }, - "users_crop_photo": { - "type": "object", - "properties": { - "crop": { - "$ref": "#/definitions/users_crop_photo_crop" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "rect": { - "$ref": "#/definitions/users_crop_photo_rect" - } - } - }, - "users_crop_photo_crop": { - "type": "object", - "properties": { - "x": { - "type": "number", - "description": "Coordinate X of the left upper corner" - }, - "x2": { - "type": "number", - "description": "Coordinate X of the right lower corner" - }, - "y": { - "type": "number", - "description": "Coordinate Y of the left upper corner" - }, - "y2": { - "type": "number", - "description": "Coordinate Y of the right lower corner" - } - }, - "additionalProperties": false - }, - "users_crop_photo_rect": { - "type": "object", - "properties": { - "x": { - "type": "number", - "description": "Coordinate X of the left upper corner" - }, - "x2": { - "type": "number", - "description": "Coordinate X of the right lower corner" - }, - "y": { - "type": "number", - "description": "Coordinate Y of the left upper corner" - }, - "y2": { - "type": "number", - "description": "Coordinate Y of the right lower corner" - } - }, - "additionalProperties": false - }, - "users_exports": { - "type": "object", - "properties": { - "facebook": { - "type": "integer" - }, - "livejournal": { - "type": "integer" - }, - "twitter": { - "type": "integer" - } - } - }, - "users_fields": { - "type": "string", - "enum": [ - "photo_id", - "verified", - "sex", - "bdate", - "city", - "country", - "home_town", - "has_photo", - "photo_50", - "photo_100", - "photo_200_orig", - "photo_200", - "photo_400_orig", - "photo_max", - "photo_max_orig", - "online", - "lists", - "domain", - "has_mobile", - "contacts", - "site", - "education", - "universities", - "schools", - "status", - "last_seen", - "followers_count", - "counters", - "common_count", - "occupation", - "nickname", - "relatives", - "relation", - "personal", - "connections", - "exports", - "wall_comments", - "activities", - "interests", - "music", - "movies", - "tv", - "books", - "games", - "about", - "quotes", - "can_post", - "can_see_all_posts", - "can_see_audio", - "can_write_private_message", - "can_send_friend_request", - "is_favorite", - "is_hidden_from_feed", - "timezone", - "screen_name", - "maiden_name", - "crop_photo", - "is_friend", - "friend_status", - "career", - "military", - "blacklisted", - "blacklisted_by_me", - "can_subscribe_posts", - "descriptions", - "trending", - "mutual" - ] - }, - "users_last_seen": { - "type": "object", - "properties": { - "platform": { - "type": "integer", - "description": "Type of the platform that used for the last authorization" - }, - "time": { - "type": "integer", - "description": "Last visit date (in Unix time)" - } - }, - "additionalProperties": false - }, - "users_military": { - "type": "object", - "properties": { - "country_id": { - "type": "integer", - "description": "Country ID" - }, - "from": { - "type": "integer", - "description": "From year" - }, - "id": { - "type": "integer", - "description": "Military ID" - }, - "unit": { - "type": "string", - "description": "Unit name" - }, - "unit_id": { - "type": "integer", - "description": "Unit ID" - }, - "until": { - "type": "integer", - "description": "Till year" - } - }, - "required": [ - "unit", - "unit_id", - "country_id" - ], - "additionalProperties": false - }, - "users_occupation": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "ID of school, university, company group", - "minimum": 0 - }, - "name": { - "type": "string", - "description": "Name of occupation" - }, - "type": { - "type": "string", - "description": "Type of occupation" - } - }, - "additionalProperties": false - }, - "users_personal": { - "type": "object", - "properties": { - "alcohol": { - "type": "integer", - "description": "User's views on alcohol" - }, - "inspired_by": { - "type": "string", - "description": "User's inspired by" - }, - "langs": { - "type": "array", - "items": { - "type": "string", - "description": "User's languages" - } - }, - "life_main": { - "type": "integer", - "description": "User's personal priority in life" - }, - "people_main": { - "type": "integer", - "description": "User's personal priority in people" - }, - "political": { - "type": "integer", - "description": "User's political views" - }, - "religion": { - "type": "string", - "description": "User's religion" - }, - "religion_id": { - "type": "integer", - "description": "User's religion id" - }, - "smoking": { - "type": "integer", - "description": "User's views on smoking" - } - }, - "additionalProperties": false - }, - "users_relative": { - "type": "object", - "properties": { - "birth_date": { - "type": "string", - "description": "Date of child birthday (format dd.mm.yyyy)" - }, - "id": { - "type": "integer", - "description": "Relative ID" - }, - "name": { - "type": "string", - "description": "Name of relative" - }, - "type": { - "type": "string", - "description": "Relative type", - "enum": [ - "parent", - "child", - "grandparent", - "grandchild", - "sibling" - ] - } - }, - "required": [ - "type" - ], - "additionalProperties": false - }, - "users_school": { - "type": "object", - "properties": { - "city": { - "type": "integer", - "description": "City ID" - }, - "class": { - "type": "string", - "description": "School class letter" - }, - "country": { - "type": "integer", - "description": "Country ID" - }, - "id": { - "type": "string", - "description": "School ID" - }, - "name": { - "type": "string", - "description": "School name" - }, - "type": { - "type": "integer", - "description": "School type ID" - }, - "type_str": { - "type": "string", - "description": "School type name" - }, - "year_from": { - "type": "integer", - "description": "Year the user started to study" - }, - "year_graduated": { - "type": "integer", - "description": "Graduation year" - }, - "year_to": { - "type": "integer", - "description": "Year the user finished to study" - } - }, - "additionalProperties": false - }, - "users_subscriptions_item": { - "type": "object", - "oneOf": [ - { - "invalid_one_of": true, - "$ref": "objects.json#/definitions/users_user_xtr_type" - }, - { - "invalid_one_of": true, - "$ref": "objects.json#/definitions/groups_group_full" - } - ] - }, - "users_university": { - "type": "object", - "properties": { - "chair": { - "type": "integer", - "description": "Chair ID" - }, - "chair_name": { - "type": "string", - "description": "Chair name" - }, - "city": { - "type": "integer", - "description": "City ID" - }, - "country": { - "type": "integer", - "description": "Country ID" - }, - "education_form": { - "type": "string", - "description": "Education form" - }, - "education_status": { - "type": "string", - "description": "Education status" - }, - "faculty": { - "type": "integer", - "description": "Faculty ID" - }, - "faculty_name": { - "type": "string", - "description": "Faculty name" - }, - "graduation": { - "type": "integer", - "description": "Graduation year" - }, - "id": { - "type": "integer", - "description": "University ID" - }, - "name": { - "type": "string", - "description": "University name" - } - }, - "additionalProperties": false - }, - "users_user": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user_min" - }, - { - "properties": { - "sex": { - "$ref": "#/definitions/base_sex", - "description": "User sex" - }, - "screen_name": { - "type": "string", - "description": "Domain name of the user's page" - }, - "photo_50": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the user with 50 pixels in width" - }, - "photo_100": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the user with 100 pixels in width" - }, - "online": { - "description": "Information whether the user is online", - "$ref": "#/definitions/base_bool_int" - }, - "online_mobile": { - "description": "Information whether the user is online in mobile site or application", - "$ref": "#/definitions/base_bool_int" - }, - "online_app": { - "type": "integer", - "description": "Application ID" - }, - "verified": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether the user is verified" - }, - "trending": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether the user has a \"fire\" pictogram." - }, - "friend_status": { - "$ref": "#/definitions/friends_friend_status_status" - }, - "mutual": { - "$ref": "#/definitions/friends_requests_mutual" - } - } - } - ] - }, - "users_user_connections": { - "type": "object", - "properties": { - "skype": { - "type": "string", - "description": "User's Skype nickname" - }, - "facebook": { - "type": "string", - "description": "User's Facebook account" - }, - "facebook_name": { - "type": "string", - "description": "User's Facebook name" - }, - "twitter": { - "type": "string", - "description": "User's Twitter account" - }, - "livejournal": { - "type": "string", - "description": "User's Livejournal account" - }, - "instagram": { - "type": "string", - "description": "User's Instagram account" - } - }, - "required": [ - "facebook", - "instagram", - "twitter", - "skype" - ] - }, - "users_user_counters": { - "type": "object", - "properties": { - "albums": { - "type": "integer", - "description": "Albums number" - }, - "audios": { - "type": "integer", - "description": "Audios number" - }, - "followers": { - "type": "integer", - "description": "Followers number" - }, - "friends": { - "type": "integer", - "description": "Friends number" - }, - "gifts": { - "type": "integer", - "description": "Gifts number" - }, - "groups": { - "type": "integer", - "description": "Communities number" - }, - "notes": { - "type": "integer", - "description": "Notes number" - }, - "online_friends": { - "type": "integer", - "description": "Online friends number" - }, - "pages": { - "type": "integer", - "description": "Public pages number" - }, - "photos": { - "type": "integer", - "description": "Photos number" - }, - "subscriptions": { - "type": "integer", - "description": "Subscriptions number" - }, - "user_photos": { - "type": "integer", - "description": "Number of photos with user" - }, - "user_videos": { - "type": "integer", - "description": "Number of videos with user" - }, - "videos": { - "type": "integer", - "description": "Videos number" - } - } - }, - "users_user_full": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user" - }, - { - "properties": { - "nickname": { - "type": "string", - "description": "User nickname" - }, - "maiden_name": { - "type": "string", - "description": "User maiden name" - }, - "domain": { - "type": "string", - "description": "Domain name of the user's page" - }, - "bdate": { - "type": "string", - "description": "User's date of birth" - }, - "city": { - "$ref": "#/definitions/base_object" - }, - "country": { - "$ref": "#/definitions/base_country" - }, - "timezone": { - "type": "integer", - "description": "User's timezone" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the user with 200 pixels in width" - }, - "photo_max": { - "type": "string", - "format": "uri", - "description": "URL of square photo of the user with maximum width" - }, - "photo_200_orig": { - "type": "string", - "format": "uri", - "description": "URL of user's photo with 200 pixels in width" - }, - "photo_400_orig": { - "type": "string", - "format": "uri", - "description": "URL of user's photo with 400 pixels in width" - }, - "photo_max_orig": { - "type": "string", - "format": "uri", - "description": "URL of user's photo of maximum size" - }, - "photo_id": { - "type": "string", - "description": "ID of the user's main photo" - }, - "has_photo": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether the user has main photo" - }, - "has_mobile": { - "description": "Information whether the user specified his phone number", - "$ref": "#/definitions/base_bool_int" - }, - "is_friend": { - "description": "Information whether the user is a friend of current user", - "$ref": "#/definitions/base_bool_int" - }, - "wall_comments": { - "description": "Information whether current user can comment wall posts", - "$ref": "#/definitions/base_bool_int" - }, - "can_post": { - "description": "Information whether current user can post on the user's wall", - "$ref": "#/definitions/base_bool_int" - }, - "can_see_all_posts": { - "description": "Information whether current user can see other users' audio on the wall", - "$ref": "#/definitions/base_bool_int" - }, - "can_see_audio": { - "description": "Information whether current user can see the user's audio", - "$ref": "#/definitions/base_bool_int" - }, - "can_write_private_message": { - "description": "Information whether current user can write private message", - "$ref": "#/definitions/base_bool_int" - }, - "can_send_friend_request": { - "description": "Information whether current user can send a friend request", - "$ref": "#/definitions/base_bool_int" - }, - "mobile_phone": { - "type": "string", - "description": "Information whether current user can see" - }, - "home_phone": { - "type": "string", - "description": "User's mobile phone number" - }, - "site": { - "type": "string", - "description": "User's website" - }, - "status_audio": { - "$ref": "#/definitions/audio_audio" - }, - "status": { - "type": "string", - "description": "User's status" - }, - "activity": { - "type": "string", - "description": "User's status" - }, - "last_seen": { - "$ref": "#/definitions/users_last_seen" - }, - "exports": { - "$ref": "#/definitions/users_exports" - }, - "crop_photo": { - "$ref": "#/definitions/users_crop_photo" - }, - "followers_count": { - "type": "integer", - "description": "Number of user's followers", - "minimum": 0 - }, - "blacklisted": { - "description": "Information whether current user is in the requested user's blacklist.", - "$ref": "#/definitions/base_bool_int" - }, - "blacklisted_by_me": { - "description": "Information whether the requested user is in current user's blacklist", - "$ref": "#/definitions/base_bool_int" - }, - "is_favorite": { - "description": "Information whether the requested user is in faves of current user", - "$ref": "#/definitions/base_bool_int" - }, - "is_hidden_from_feed": { - "description": "Information whether the requested user is hidden from current user's newsfeed", - "$ref": "#/definitions/base_bool_int" - }, - "common_count": { - "type": "integer", - "description": "Number of common friends with current user", - "minimum": 0 - }, - "occupation": { - "$ref": "#/definitions/users_occupation" - }, - "career": { - "type": "array", - "items": { - "$ref": "#/definitions/users_career" - } - }, - "military": { - "type": "array", - "items": { - "$ref": "#/definitions/users_military" - } - }, - "university": { - "type": "integer", - "description": "University ID" - }, - "university_name": { - "type": "string", - "description": "University name" - }, - "faculty": { - "type": "integer", - "description": "Faculty ID" - }, - "faculty_name": { - "type": "string", - "description": "Faculty name" - }, - "graduation": { - "type": "integer", - "description": "Graduation year" - }, - "education_form": { - "type": "string", - "description": "Education form" - }, - "education_status": { - "type": "string", - "description": "User's education status" - }, - "home_town": { - "type": "string", - "description": "User hometown" - }, - "relation": { - "$ref": "#/definitions/users_user_relation", - "description": "User relationship status" - }, - "relation_partner": { - "$ref": "#/definitions/users_user_min" - }, - "personal": { - "$ref": "#/definitions/users_personal" - }, - "universities": { - "type": "array", - "items": { - "$ref": "#/definitions/users_university" - } - }, - "schools": { - "type": "array", - "items": { - "$ref": "#/definitions/users_school" - } - }, - "relatives": { - "type": "array", - "items": { - "$ref": "#/definitions/users_relative" - } - }, - "is_subscribed_podcasts": { - "description": "Information whether current user is subscribed to podcasts", - "type": "boolean" - }, - "can_subscribe_podcasts": { - "description": "Owner in whitelist or not", - "type": "boolean" - }, - "can_subscribe_posts": { - "description": "Can subscribe to wall", - "type": "boolean" - } - }, - "additionalProperties": false - } - ] - }, - "users_user_min": { - "type": "object", - "properties": { - "deactivated": { - "type": "string", - "description": "Returns if a profile is deleted or blocked" - }, - "first_name": { - "type": "string", - "description": "User first name" - }, - "hidden": { - "type": "integer", - "description": "Returns if a profile is hidden." - }, - "id": { - "type": "integer", - "description": "User ID" - }, - "last_name": { - "type": "string", - "description": "User last name" - }, - "can_access_closed": { - "type": "boolean" - }, - "is_closed": { - "type": "boolean" - } - }, - "required": [ - "id", - "first_name", - "last_name" - ], - "additionalProperties": false - }, - "users_user_relation": { - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8 - ], - "enumNames": [ - "not specified", - "single", - "in a relationship", - "engaged", - "married", - "complicated", - "actively searching", - "in love", - "in a civil union" - ] - }, - "users_user_settings_xtr": { - "type": "object", - "properties": { - "connections": { - "$ref": "#/definitions/users_user_connections" - }, - "bdate": { - "type": "string", - "description": "User's date of birth" - }, - "bdate_visibility": { - "type": "integer", - "minimum": 0, - "description": "Information whether user's birthdate are hidden" - }, - "city": { - "$ref": "#/definitions/base_city" - }, - "country": { - "$ref": "#/definitions/base_country" - }, - "first_name": { - "type": "string", - "description": "User first name" - }, - "home_town": { - "type": "string", - "description": "User's hometown" - }, - "last_name": { - "type": "string", - "description": "User last name" - }, - "maiden_name": { - "type": "string", - "description": "User maiden name" - }, - "name_request": { - "$ref": "#/definitions/account_name_request" - }, - "personal": { - "$ref": "#/definitions/users_personal" - }, - "phone": { - "type": "string", - "description": "User phone number with some hidden digits" - }, - "relation": { - "$ref": "#/definitions/users_user_relation", - "description": "User relationship status" - }, - "relation_partner": { - "$ref": "#/definitions/users_user_min" - }, - "relation_pending": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether relation status is pending" - }, - "relation_requests": { - "type": "array", - "items": { - "$ref": "#/definitions/users_user_min" - } - }, - "screen_name": { - "type": "string", - "description": "Domain name of the user's page" - }, - "sex": { - "$ref": "#/definitions/base_sex", - "description": "User sex" - }, - "status": { - "type": "string", - "description": "User status" - }, - "status_audio": { - "$ref": "#/definitions/audio_audio" - }, - "interests": { - "$ref": "objects.json#/definitions/account_user_settings_interests" - }, - "languages": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "home_town", - "status" - ] - }, - "users_user_type": { - "type": "string", - "description": "Object type", - "enum": [ - "profile" - ] - }, - "users_user_xtr_counters": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user_full" - }, - { - "properties": { - "counters": { - "$ref": "#/definitions/users_user_counters" - } - } - } - ] - }, - "users_user_xtr_type": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/users_user" - }, - { - "properties": { - "type": { - "$ref": "#/definitions/users_user_type" - } - } - } - ] - }, - "users_users_array": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Users number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID" - } - } - }, - "required": [ - "count", - "items" - ], - "additionalProperties": false - }, - "utils_domain_resolved": { - "type": "object", - "properties": { - "object_id": { - "type": "integer", - "description": "Object ID" - }, - "type": { - "$ref": "#/definitions/utils_domain_resolved_type" - } - } - }, - "utils_domain_resolved_type": { - "type": "string", - "description": "Object type", - "enum": [ - "user", - "group", - "application", - "page" - ] - }, - "utils_last_shortened_link": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for private stats" - }, - "key": { - "type": "string", - "description": "Link key (characters after vk.cc/)" - }, - "short_url": { - "type": "string", - "format": "uri", - "description": "Short link URL" - }, - "timestamp": { - "type": "integer", - "description": "Creation time in Unixtime" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Full URL" - }, - "views": { - "type": "integer", - "description": "Total views number" - } - } - }, - "utils_link_checked": { - "type": "object", - "properties": { - "link": { - "type": "string", - "format": "uri", - "description": "Link URL" - }, - "status": { - "$ref": "#/definitions/utils_link_checked_status" - } - } - }, - "utils_link_checked_status": { - "type": "string", - "description": "Link status", - "enum": [ - "not_banned", - "banned", - "processing" - ] - }, - "utils_link_stats": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Link key (characters after vk.cc/)" - }, - "stats": { - "type": "array", - "items": { - "$ref": "#/definitions/utils_stats" - } - } - } - }, - "utils_link_stats_extended": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Link key (characters after vk.cc/)" - }, - "stats": { - "type": "array", - "items": { - "$ref": "#/definitions/utils_stats_extended" - } - } - } - }, - "utils_short_link": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for private stats" - }, - "key": { - "type": "string", - "description": "Link key (characters after vk.cc/)" - }, - "short_url": { - "type": "string", - "format": "uri", - "description": "Short link URL" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Full URL" - } - } - }, - "utils_stats": { - "type": "object", - "properties": { - "timestamp": { - "type": "integer", - "description": "Start time" - }, - "views": { - "type": "integer", - "description": "Total views number" - } - } - }, - "utils_stats_city": { - "type": "object", - "properties": { - "city_id": { - "type": "integer", - "description": "City ID" - }, - "views": { - "type": "integer", - "description": "Views number" - } - } - }, - "utils_stats_country": { - "type": "object", - "properties": { - "country_id": { - "type": "integer", - "description": "Country ID" - }, - "views": { - "type": "integer", - "description": "Views number" - } - } - }, - "utils_stats_extended": { - "type": "object", - "properties": { - "cities": { - "type": "array", - "items": { - "$ref": "#/definitions/utils_stats_city" - } - }, - "countries": { - "type": "array", - "items": { - "$ref": "#/definitions/utils_stats_country" - } - }, - "sex_age": { - "type": "array", - "items": { - "$ref": "#/definitions/utils_stats_sex_age" - } - }, - "timestamp": { - "type": "integer", - "description": "Start time" - }, - "views": { - "type": "integer", - "description": "Total views number" - } - } - }, - "utils_stats_sex_age": { - "type": "object", - "properties": { - "age_range": { - "type": "string", - "description": "Age denotation" - }, - "female": { - "type": "integer", - "description": " Views by female users" - }, - "male": { - "type": "integer", - "description": " Views by male users" - } - } - }, - "video_save_result": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Video access key" - }, - "description": { - "type": "string", - "description": "Video description" - }, - "owner_id": { - "type": "integer", - "description": "Video owner ID" - }, - "title": { - "type": "string", - "description": "Video title" - }, - "upload_url": { - "type": "string", - "format": "uri", - "description": "URL for the video uploading" - }, - "video_id": { - "type": "integer", - "description": "Video ID" - } - } - }, - "video_video": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Video access key" - }, - "adding_date": { - "type": "integer", - "description": "Date when the video has been added in Unixtime" - }, - "can_add": { - "description": "Information whether current user can add the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_comment": { - "description": "Information whether current user can comment the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_edit": { - "description": "Information whether current user can edit the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_like": { - "description": "Information whether current user can like the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_repost": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can repost this video" - }, - "comments": { - "type": "integer", - "description": "Number of comments" - }, - "date": { - "type": "integer", - "description": "Date when video has been uploaded in Unixtime" - }, - "description": { - "type": "string", - "description": "Video description" - }, - "duration": { - "type": "integer", - "description": "Video duration in seconds" - }, - "files": { - "$ref": "#/definitions/video_video_files" - }, - "first_frame": { - "type": "array", - "items": { - "$ref": "#/definitions/video_video_image" - } - }, - "height": { - "type": "integer", - "minimum": 0, - "description": "Video height" - }, - "id": { - "type": "integer", - "description": "Video ID" - }, - "image": { - "type": "array", - "items": { - "$ref": "#/definitions/video_video_image" - } - }, - "is_favorite": { - "type": "boolean" - }, - "live": { - "description": "Returns if the video is a live stream", - "$ref": "#/definitions/base_property_exists" - }, - "owner_id": { - "type": "integer", - "description": "Video owner ID" - }, - "player": { - "type": "string", - "format": "uri", - "description": "URL of the page with a player that can be used to play the video in the browser." - }, - "processing": { - "description": "Returns if the video is processing", - "$ref": "#/definitions/base_property_exists" - }, - "title": { - "type": "string", - "description": "Video title" - }, - "type": { - "type": "string", - "enum": [ - "video" - ] - }, - "views": { - "type": "integer", - "description": "Number of views" - }, - "width": { - "type": "integer", - "minimum": 0, - "description": "Video width" - } - }, - "additionalProperties": false - }, - "video_video_album_full": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Total number of videos in album" - }, - "id": { - "type": "integer", - "description": "Album ID" - }, - "image": { - "type": "array", - "items": { - "$ref": "#/definitions/video_video_image" - }, - "description": "Album cover image in different sizes" - }, - "is_system": { - "type": "integer", - "description": "Information whether album is system" - }, - "owner_id": { - "type": "integer", - "description": "Album owner's ID" - }, - "title": { - "type": "string", - "description": "Album title" - }, - "updated_time": { - "type": "integer", - "description": "Date when the album has been updated last time in Unixtime", - "minimum": 0 - } - }, - "required": [ - "owner_id", - "title", - "updated_time", - "count" - ], - "additionalProperties": false - }, - "video_video_files": { - "type": "object", - "properties": { - "external": { - "type": "string", - "format": "uri", - "description": "URL of the external player" - }, - "mp4_1080": { - "type": "string", - "format": "uri", - "description": "URL of the mpeg4 file with 1080p quality" - }, - "mp4_240": { - "type": "string", - "format": "uri", - "description": "URL of the mpeg4 file with 240p quality" - }, - "mp4_360": { - "type": "string", - "format": "uri", - "description": "URL of the mpeg4 file with 360p quality" - }, - "mp4_480": { - "type": "string", - "format": "uri", - "description": "URL of the mpeg4 file with 480p quality" - }, - "mp4_720": { - "type": "string", - "format": "uri", - "description": "URL of the mpeg4 file with 720p quality" - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "video_video_full": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Video access key" - }, - "adding_date": { - "type": "integer", - "description": "Date when the video has been added in Unixtime" - }, - "can_add": { - "description": "Information whether current user can add the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_add_to_faves": { - "description": "Information whether current user can add the video to favourites", - "$ref": "#/definitions/base_bool_int" - }, - "can_comment": { - "description": "Information whether current user can comment the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_edit": { - "description": "Information whether current user can edit the video", - "$ref": "#/definitions/base_bool_int" - }, - "can_repost": { - "description": "Information whether current user can comment the video", - "$ref": "#/definitions/base_bool_int" - }, - "comments": { - "type": "integer", - "description": "Number of comments" - }, - "date": { - "type": "integer", - "description": "Date when video has been uploaded in Unixtime" - }, - "description": { - "type": "string", - "description": "Video description" - }, - "duration": { - "type": "integer", - "description": "Video duration in seconds" - }, - "files": { - "$ref": "#/definitions/video_video_files" - }, - "first_frame": { - "type": "array", - "items": { - "$ref": "#/definitions/video_video_image" - } - }, - "first_frame_640": { - "type": "string", - "format": "uri", - "description": "URL of the first frame for the corresponding width." - }, - "first_frame_1280": { - "type": "string", - "format": "uri", - "description": "URL of the first frame for the corresponding width." - }, - "id": { - "type": "integer", - "description": "Video ID" - }, - "image": { - "type": "array", - "items": { - "$ref": "#/definitions/video_video_image" - } - }, - "likes": { - "$ref": "#/definitions/base_likes" - }, - "live": { - "description": "Returns if the video is live translation", - "$ref": "#/definitions/base_property_exists" - }, - "owner_id": { - "type": "integer", - "description": "Video owner ID" - }, - "player": { - "type": "string", - "format": "uri", - "description": "URL of the page with a player that can be used to play the video in the browser." - }, - "processing": { - "description": "Returns if the video is processing", - "$ref": "#/definitions/base_property_exists" - }, - "repeat": { - "description": "Information whether the video is repeated", - "$ref": "#/definitions/base_bool_int" - }, - "title": { - "type": "string", - "description": "Video title" - }, - "views": { - "type": "integer", - "description": "Number of views" - } - } - }, - "video_video_image": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/base_image" - }, - { - "properties": { - "with_padding": { - "$ref": "#/definitions/base_bool_int" - } - } - } - ] - }, - "wall_app_post": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Application ID" - }, - "name": { - "type": "string", - "description": "Application name" - }, - "photo_130": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 130 px in width" - }, - "photo_604": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 604 px in width" - } - } - }, - "wall_attached_note": { - "type": "object", - "properties": { - "comments": { - "type": "integer", - "description": "Comments number", - "minimum": 0 - }, - "date": { - "type": "integer", - "description": "Date when the note has been created in Unixtime", - "minimum": 0 - }, - "id": { - "type": "integer", - "description": "Note ID", - "minimum": 1 - }, - "owner_id": { - "type": "integer", - "description": "Note owner's ID", - "minimum": 1 - }, - "read_comments": { - "type": "integer", - "description": "Read comments number", - "minimum": 0 - }, - "title": { - "type": "string", - "description": "Note title" - }, - "view_url": { - "type": "string", - "format": "uri", - "description": "URL of the page with note preview" - } - }, - "required": [ - "id", - "owner_id", - "comments", - "read_comments", - "date", - "title", - "view_url" - ], - "additionalProperties": false - }, - "wall_comment_attachment": { - "type": "object", - "properties": { - "audio": { - "$ref": "#/definitions/audio_audio" - }, - "doc": { - "$ref": "#/definitions/docs_doc" - }, - "link": { - "$ref": "#/definitions/base_link" - }, - "market": { - "$ref": "#/definitions/market_market_item" - }, - "market_market_album": { - "$ref": "#/definitions/market_market_album" - }, - "note": { - "$ref": "#/definitions/wall_attached_note" - }, - "page": { - "$ref": "#/definitions/pages_wikipage_full" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "sticker": { - "$ref": "#/definitions/base_sticker" - }, - "type": { - "$ref": "#/definitions/wall_comment_attachment_type" - }, - "video": { - "$ref": "#/definitions/video_video" - } - }, - "required": [ - "type" - ], - "additionalProperties": false - }, - "wall_comment_attachment_type": { - "type": "string", - "description": "Attachment type", - "enum": [ - "photo", - "audio", - "video", - "doc", - "link", - "note", - "page", - "market_market_album", - "market", - "sticker" - ] - }, - "wall_geo": { - "type": "object", - "properties": { - "coordinates": { - "type": "string", - "description": "Coordinates as string. " - }, - "place": { - "$ref": "#/definitions/base_place" - }, - "showmap": { - "type": "integer", - "description": "Information whether a map is showed" - }, - "type": { - "type": "string", - "description": "Place type" - } - } - }, - "wall_graffiti": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Graffiti ID" - }, - "owner_id": { - "type": "integer", - "description": "Graffiti owner's ID" - }, - "photo_200": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 200 px in width" - }, - "photo_586": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 586 px in width" - } - } - }, - "wall_post_source": { - "type": "object", - "properties": { - "data": { - "type": "string", - "description": "Additional data" - }, - "platform": { - "type": "string", - "description": "Platform name" - }, - "type": { - "$ref": "#/definitions/wall_post_source_type" - }, - "url": { - "type": "string", - "format": "uri", - "description": "URL to an external site used to publish the post" - } - } - }, - "wall_post_source_type": { - "type": "string", - "description": "Type of post source", - "enum": [ - "vk", - "widget", - "api", - "rss", - "sms" - ] - }, - "wall_post_type": { - "type": "string", - "description": "Post type", - "enum": [ - "post", - "copy", - "reply", - "postpone", - "suggest" - ] - }, - "wall_posted_photo": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Photo ID" - }, - "owner_id": { - "type": "integer", - "description": "Photo owner's ID" - }, - "photo_130": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 130 px in width" - }, - "photo_604": { - "type": "string", - "format": "uri", - "description": "URL of the preview image with 604 px in width" - } - } - }, - "wall_views": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Count" - } - }, - "additionalProperties": false - }, - "wall_wall_comment": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_comment_attachment" - } - }, - "date": { - "type": "integer", - "description": "Date when the comment has been added in Unixtime", - "minimum": 0 - }, - "from_id": { - "type": "integer", - "description": "Author ID" - }, - "id": { - "type": "integer", - "description": "Comment ID", - "minimum": 1 - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "real_offset": { - "type": "integer", - "description": "Real position of the comment" - }, - "reply_to_comment": { - "type": "integer", - "description": "Replied comment ID" - }, - "reply_to_user": { - "type": "integer", - "description": "Replied user ID" - }, - "text": { - "type": "string", - "description": "Comment text" - }, - "thread": { - "$ref": "#/definitions/comment_thread" - }, - "post_id": { - "type": "integer" - }, - "owner_id": { - "type": "integer" - }, - "parents_stack": { - "type": "array", - "items": { - "type": "integer" - } - }, - "deleted": { - "type": "boolean" - } - }, - "required": [ - "id", - "from_id", - "date", - "text" - ], - "additionalProperties": false - }, - "wall_wallpost": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key to private object" - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost_attachment" - } - }, - "date": { - "type": "integer", - "description": "Date of publishing in Unixtime" - }, - "edited": { - "type": "integer", - "minimum": 0, - "description": "Date of editing in Unixtime" - }, - "from_id": { - "type": "integer", - "description": "Post author ID" - }, - "geo": { - "$ref": "#/definitions/wall_geo" - }, - "id": { - "type": "integer", - "description": "Post ID" - }, - "is_archived": { - "type": "boolean", - "description": "Is post archived, only for post owners" - }, - "is_favorite": { - "type": "boolean", - "description": "Information whether the post in favorites list" - }, - "likes": { - "description": "Count of likes", - "$ref": "#/definitions/base_likes_info" - }, - "owner_id": { - "type": "integer", - "description": "Wall owner's ID" - }, - "post_source": { - "$ref": "#/definitions/wall_post_source" - }, - "post_type": { - "$ref": "#/definitions/wall_post_type" - }, - "reposts": { - "description": "Count of views", - "$ref": "#/definitions/base_reposts_info" - }, - "signer_id": { - "type": "integer", - "description": "Post signer ID" - }, - "text": { - "type": "string", - "description": "Post text" - }, - "views": { - "description": "Count of views", - "$ref": "#/definitions/wall_views" - } - } - }, - "wall_wallpost_attachment": { - "type": "object", - "properties": { - "access_key": { - "type": "string", - "description": "Access key for the audio" - }, - "album": { - "$ref": "#/definitions/photos_photo_album" - }, - "app": { - "$ref": "#/definitions/wall_app_post" - }, - "audio": { - "$ref": "#/definitions/audio_audio" - }, - "doc": { - "$ref": "#/definitions/docs_doc" - }, - "event": { - "$ref": "#/definitions/events_event_attach" - }, - "graffiti": { - "$ref": "#/definitions/wall_graffiti" - }, - "link": { - "$ref": "#/definitions/base_link" - }, - "market": { - "$ref": "#/definitions/market_market_item" - }, - "market_album": { - "$ref": "#/definitions/market_market_album" - }, - "note": { - "$ref": "#/definitions/wall_attached_note" - }, - "page": { - "$ref": "#/definitions/pages_wikipage_full" - }, - "photo": { - "$ref": "#/definitions/photos_photo" - }, - "photos_list": { - "type": "array", - "items": { - "type": "string", - "description": "String ID of photo" - } - }, - "poll": { - "$ref": "#/definitions/polls_poll" - }, - "posted_photo": { - "$ref": "#/definitions/wall_posted_photo" - }, - "type": { - "$ref": "#/definitions/wall_wallpost_attachment_type" - }, - "video": { - "$ref": "#/definitions/video_video" - } - }, - "required": [ - "type" - ], - "additionalProperties": false - }, - "wall_wallpost_attachment_type": { - "type": "string", - "description": "Attachment type", - "enum": [ - "photo", - "posted_photo", - "audio", - "video", - "doc", - "link", - "graffiti", - "note", - "app", - "poll", - "page", - "album", - "photos_list", - "market_market_album", - "market", - "event" - ] - }, - "wall_wallpost_full": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/wall_wallpost" - }, - { - "properties": { - "copy_history": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost" - } - }, - "can_edit": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can edit the post" - }, - "created_by": { - "type": "integer", - "description": "Post creator ID (if post still can be edited)" - }, - "can_delete": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can delete the post" - }, - "can_pin": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can pin the post" - }, - "is_pinned": { - "type": "integer", - "description": "Information whether the post is pinned" - }, - "comments": { - "$ref": "#/definitions/base_comments_info" - }, - "marked_as_ads": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether the post is marked as ads" - } - } - } - ] - }, - "wall_wallpost_to_id": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_wallpost_attachment" - } - }, - "comments": { - "$ref": "#/definitions/base_comments_info" - }, - "copy_owner_id": { - "type": "integer", - "description": "ID of the source post owner" - }, - "copy_post_id": { - "type": "integer", - "description": "ID of the source post" - }, - "date": { - "type": "integer", - "description": "Date of publishing in Unixtime" - }, - "from_id": { - "type": "integer", - "description": "Post author ID" - }, - "geo": { - "$ref": "#/definitions/wall_geo" - }, - "id": { - "type": "integer", - "description": "Post ID" - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "post_id": { - "type": "integer", - "description": "wall post ID (if comment)" - }, - "post_source": { - "$ref": "#/definitions/wall_post_source" - }, - "post_type": { - "$ref": "#/definitions/wall_post_type" - }, - "reposts": { - "$ref": "#/definitions/base_reposts_info" - }, - "signer_id": { - "type": "integer", - "description": "Post signer ID" - }, - "text": { - "type": "string", - "description": "Post text" - }, - "to_id": { - "type": "integer", - "description": "Wall owner's ID" - } - } - }, - "widgets_comment_media": { - "type": "object", - "properties": { - "item_id": { - "type": "integer", - "description": "Media item ID" - }, - "owner_id": { - "type": "integer", - "description": "Media owner's ID" - }, - "thumb_src": { - "type": "string", - "format": "uri", - "description": "URL of the preview image (type=photo only)" - }, - "type": { - "$ref": "#/definitions/widgets_comment_media_type" - } - } - }, - "widgets_comment_media_type": { - "type": "string", - "description": "Media type", - "enum": [ - "audio", - "photo", - "video" - ] - }, - "widgets_comment_replies": { - "type": "object", - "properties": { - "can_post": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can comment the post" - }, - "count": { - "type": "integer", - "minimum": 0, - "description": "Comments number" - }, - "replies": { - "type": "array", - "items": { - "$ref": "#/definitions/widgets_comment_replies_item" - } - } - } - }, - "widgets_comment_replies_item": { - "type": "object", - "properties": { - "cid": { - "type": "integer", - "description": "Comment ID" - }, - "date": { - "type": "integer", - "description": "Date when the comment has been added in Unixtime" - }, - "likes": { - "$ref": "#/definitions/widgets_widget_likes" - }, - "text": { - "type": "string", - "description": "Comment text" - }, - "uid": { - "type": "integer", - "description": "User ID" - }, - "user": { - "$ref": "#/definitions/users_user_full" - } - } - }, - "widgets_widget_comment": { - "type": "object", - "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/wall_comment_attachment" - } - }, - "can_delete": { - "$ref": "#/definitions/base_bool_int", - "description": "Information whether current user can delete the comment" - }, - "comments": { - "$ref": "#/definitions/widgets_comment_replies" - }, - "date": { - "type": "integer", - "description": "Date when the comment has been added in Unixtime" - }, - "from_id": { - "type": "integer", - "description": "Comment author ID" - }, - "id": { - "type": "integer", - "description": "Comment ID" - }, - "likes": { - "$ref": "#/definitions/base_likes_info" - }, - "media": { - "$ref": "#/definitions/widgets_comment_media" - }, - "post_source": { - "$ref": "#/definitions/wall_post_source" - }, - "post_type": { - "type": "integer", - "description": "Post type" - }, - "reposts": { - "$ref": "#/definitions/base_reposts_info" - }, - "text": { - "type": "string", - "description": "Comment text" - }, - "to_id": { - "type": "integer", - "description": "Wall owner" - }, - "user": { - "$ref": "#/definitions/users_user_full" - } - }, - "required": [ - "id", - "from_id", - "to_id", - "date", - "post_type", - "text" - ], - "additionalProperties": false - }, - "widgets_widget_likes": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0, - "description": "Likes number" - } - } - }, - "widgets_widget_page": { - "type": "object", - "properties": { - "comments": { - "$ref": "#/definitions/base_object_count" - }, - "date": { - "type": "integer", - "description": "Date when widgets on the page has been initialized firstly in Unixtime" - }, - "description": { - "type": "string", - "description": "Page description" - }, - "id": { - "type": "integer", - "description": "Page ID" - }, - "likes": { - "$ref": "#/definitions/base_object_count" - }, - "page_id": { - "type": "string", - "description": "page_id parameter value" - }, - "photo": { - "type": "string", - "format": "uri", - "description": "URL of the preview image" - }, - "title": { - "type": "string", - "description": "Page title" - }, - "url": { - "type": "string", - "format": "uri", - "description": "Page absolute URL" - } - } - } - } -} \ No newline at end of file diff --git a/vkapi/schemes/responses.json b/vkapi/schemes/responses.json deleted file mode 100644 index 73e0b1f..0000000 --- a/vkapi/schemes/responses.json +++ /dev/null @@ -1,6308 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "title": "responses", - "definitions": { - "account_changePassword_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "token": { - "type": "string", - "description": "New token" - }, - "secret": { - "type": "string", - "description": "New secret" - } - }, - "required": [ - "token" - ] - } - } - }, - "account_getActiveOffers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/account_offer" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "account_getAppPermissions_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Permissions mask" - } - } - }, - "account_getBanned_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "type": "integer" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "account_getCounters_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/account_account_counters" - } - } - }, - "account_getInfo_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/account_info" - } - } - }, - "account_getProfileInfo_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/account_user_settings" - } - } - }, - "account_getPushSettings_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/account_push_settings" - } - } - }, - "account_saveProfileInfo_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "changed": { - "description": "1 if changes has been processed", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "name_request": { - "$ref": "objects.json#/definitions/account_name_request" - } - } - } - } - }, - "ads_addOfficeUsers_response": { - "type": "object", - "properties": { - "response": { - "type": "boolean", - "description": "true if success" - } - } - }, - "ads_checkLink_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/ads_link_status" - } - } - }, - "ads_createAds_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "Ad ID" - } - } - } - }, - "ads_createCampaigns_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "Campaign ID" - } - } - } - }, - "ads_createClients_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "Client ID" - } - } - } - }, - "ads_createTargetGroup_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Group ID" - }, - "pixel": { - "type": "string", - "description": "Pixel code" - } - } - } - } - }, - "ads_deleteAds_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "0 if success" - } - } - } - }, - "ads_deleteCampaigns_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "0 if success" - } - } - }, - "ads_deleteClients_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "0 if sucess" - } - } - }, - "ads_getAccounts_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_account" - } - } - } - }, - "ads_getAdsLayout_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_ad_layout" - } - } - } - }, - "ads_getAdsTargeting_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_targ_settings" - } - } - } - }, - "ads_getAds_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_ad" - } - } - } - }, - "ads_getBudget_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Budget" - } - } - }, - "ads_getCampaigns_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_campaign" - } - } - } - }, - "ads_getCategories_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "v1": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_category" - }, - "description": "Old categories" - }, - "v2": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_category" - }, - "description": "Actual categories" - } - } - } - } - }, - "ads_getClients_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_client" - } - } - } - }, - "ads_getDemographics_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_demo_stats" - } - } - } - }, - "ads_getFloodStats_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/ads_flood_stats" - } - } - }, - "ads_getOfficeUsers_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_users" - } - } - } - }, - "ads_getPostsReach_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_promoted_post_reach" - } - } - } - }, - "ads_getRejectionReason_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/ads_reject_reason" - } - } - }, - "ads_getStatistics_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_stats" - } - } - } - }, - "ads_getSuggestions_cities_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_targ_suggestions_cities" - } - } - } - }, - "ads_getSuggestions_regions_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_targ_suggestions_regions" - } - } - } - }, - "ads_getSuggestions_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_targ_suggestions" - } - } - } - }, - "ads_getSuggestions_schools_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_targ_suggestions_schools" - } - } - } - }, - "ads_getTargetGroups_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/ads_target_group" - } - } - } - }, - "ads_getTargetingStats_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/ads_targ_stats" - } - } - }, - "ads_getUploadURL_response": { - "type": "object", - "properties": { - "response": { - "type": "string", - "description": "Photo upload URL" - } - } - }, - "ads_getVideoUploadURL_response": { - "type": "object", - "properties": { - "response": { - "type": "string", - "description": "Video upload URL" - } - } - }, - "ads_importTargetContacts_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Imported contacts number" - } - } - }, - "ads_removeOfficeUsers_response": { - "type": "object", - "properties": { - "response": { - "type": "boolean", - "description": "true if success" - } - } - }, - "ads_updateAds_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "Ad ID" - } - } - } - }, - "ads_updateCampaigns_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Campaign ID" - } - } - }, - "ads_updateClients_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Client ID" - } - } - }, - "apps_getCatalog_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/apps_app" - } - } - } - } - } - }, - "apps_getFriendsList_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - } - } - } - }, - "apps_getLeaderboard_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/apps_leaderboard" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - } - } - } - } - }, - "apps_getLeaderboard_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/apps_leaderboard" - } - } - } - } - } - }, - "apps_getScopes_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/apps_scope" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "apps_getScore_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Score number" - } - } - }, - "apps_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/apps_app" - } - } - } - } - } - }, - "apps_sendRequest_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Request ID" - } - } - }, - "auth_restore_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "success": { - "type": "integer", - "description": "1 if success", - "enum": [ - 1 - ], - "enumNames": [ - "ok" - ] - }, - "sid": { - "type": "string", - "description": "Parameter needed to grant access by code" - } - } - } - } - }, - "base_bool_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "base_getUploadServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/base_upload_server" - } - } - }, - "board_addTopic_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Topic ID" - } - } - }, - "board_createComment_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Comment ID" - } - } - }, - "board_getComments_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/board_topic_comment" - } - }, - "poll": { - "$ref": "objects.json#/definitions/board_topic_poll" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "board_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/board_topic_comment" - } - }, - "poll": { - "$ref": "objects.json#/definitions/board_topic_poll" - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "board_getTopics_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/board_topic" - } - }, - "default_order": { - "$ref": "objects.json#/definitions/board_default_order" - }, - "can_add_topics": { - "description": "Information whether current user can add topic", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - } - }, - "required": [ - "count", - "items", - "default_order", - "can_add_topics", - "profiles" - ] - } - } - }, - "board_getTopics_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/board_topic" - } - }, - "default_order": { - "$ref": "objects.json#/definitions/board_default_order" - }, - "can_add_topics": { - "description": "Information whether current user can add topic", - "$ref": "objects.json#/definitions/base_bool_int" - } - }, - "required": [ - "count", - "items", - "default_order", - "can_add_topics" - ] - } - } - }, - "database_getChairs_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_object" - } - } - } - } - } - }, - "database_getCitiesById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_object" - } - } - } - }, - "database_getCities_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_city" - } - } - } - } - } - }, - "database_getCountriesById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_country" - } - } - } - }, - "database_getCountries_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_country" - } - } - } - } - } - }, - "database_getFaculties_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_faculty" - } - } - } - } - } - }, - "database_getMetroStationsById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_station" - } - } - } - }, - "database_getMetroStations_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_station" - } - } - } - } - } - }, - "database_getRegions_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_region" - } - } - } - } - } - }, - "database_getSchoolClasses_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": [ - "string", - "integer" - ], - "description": "Class ID or letter" - } - } - } - } - }, - "database_getSchools_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_school" - } - } - } - } - } - }, - "database_getUniversities_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/database_university" - } - } - } - } - } - }, - "docs_add_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Doc ID" - } - } - } - } - }, - "docs_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/docs_doc" - } - } - } - }, - "docs_getTypes_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/docs_doc_types" - } - } - } - } - } - }, - "docs_getUploadServer": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/base_upload_server" - } - } - }, - "docs_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/docs_doc" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "docs_save_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "type": { - "$ref": "objects.json#/definitions/docs_doc_attachment_type" - }, - "audio_message": { - "$ref": "objects.json#/definitions/messages_audio_message" - }, - "doc": { - "$ref": "objects.json#/definitions/docs_doc" - }, - "graffiti": { - "$ref": "objects.json#/definitions/messages_graffiti" - } - }, - "required": [ - "response" - ] - } - } - }, - "docs_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/docs_doc" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "fave_addTag_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/fave_tag" - } - } - }, - "fave_getPages_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/fave_page" - } - } - } - } - } - }, - "fave_getTags_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/fave_tag" - } - } - } - } - } - }, - "fave_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/fave_bookmark" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - } - } - } - }, - "fave_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/fave_bookmark" - } - } - } - } - } - }, - "friends_addList_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "list_id": { - "type": "integer", - "description": "List ID", - "minimum": 1 - } - }, - "required": [ - "list_id" - ] - } - } - }, - "friends_add_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Friend request status", - "enum": [ - 1, - 2, - 4 - ], - "enumNames": [ - "SEND", - "APPROVED", - "RESEND" - ] - } - } - }, - "friends_areFriends_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_friend_status" - } - } - } - }, - "friends_delete_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "success": { - "$ref": "objects.json#/definitions/base_ok_response" - }, - "friend_deleted": { - "type": "integer", - "description": "Returns 1 if friend has been deleted", - "enum": [ - 1 - ], - "enumNames": [ - "ok" - ] - }, - "out_request_deleted": { - "type": "integer", - "description": "Returns 1 if out request has been canceled", - "enum": [ - 1 - ], - "enumNames": [ - "ok" - ] - }, - "in_request_deleted": { - "type": "integer", - "description": "Returns 1 if incoming request has been declined", - "enum": [ - 1 - ], - "enumNames": [ - "ok" - ] - }, - "suggestion_deleted": { - "type": "integer", - "description": "Returns 1 if suggestion has been declined", - "enum": [ - 1 - ], - "enumNames": [ - "ok" - ] - } - }, - "required": [ - "success" - ], - "maxProperties": 2 - } - } - }, - "friends_getAppUsers_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - } - }, - "friends_getByPhones_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_user_xtr_phone" - } - } - }, - "required": [ - "response" - ] - }, - "friends_getLists_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_friends_list" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "friends_getMutual_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - } - }, - "friends_getMutual_target_uids_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_mutual_friend" - } - } - } - }, - "friends_getOnline_online_mobile_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "online": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "online_mobile": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - } - } - } - }, - "friends_getOnline_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - } - }, - "friends_getRecent_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - } - }, - "friends_getRequests_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total requests number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_requests_xtr_message" - } - } - } - } - } - }, - "friends_getRequests_need_mutual_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total requests number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_requests" - } - } - } - } - } - }, - "friends_getRequests_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total requests number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - }, - "count_unread": { - "type": "integer", - "description": "Total unread requests number" - } - } - } - } - }, - "friends_getSuggestions_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total results number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "friends_get_fields_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total friends number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/friends_user_xtr_lists" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "friends_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total friends number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "friends_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "gifts_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/gifts_gift" - } - } - } - } - } - }, - "groups_addCallbackServer_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "server_id": { - "type": "integer", - "minimum": 0 - } - } - } - } - }, - "groups_addLink_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_group_link" - } - } - }, - "groups_add_address_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_address" - } - } - }, - "groups_create_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "groups_editAddress_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/groups_address" - } - } - }, - "groups_getAddresses_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total count of addresses", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_address" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getBanned_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total users number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_banned_item" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - } - }, - "groups_getCallbackConfirmationCode_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Confirmation code" - } - } - } - } - }, - "groups_getCallbackServers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_callback_server" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getCallbackSettings_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_callback_settings" - } - } - }, - "groups_getCatalogInfo_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "enabled": { - "type": "integer", - "description": "Information whether catalog is enabled for current user" - }, - "categories": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_category_full" - } - } - }, - "required": [ - "enabled" - ] - } - } - }, - "groups_getCatalogInfo_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "enabled": { - "type": "integer", - "description": "Information whether catalog is enabled for current user" - }, - "categories": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_category" - } - } - }, - "required": [ - "enabled" - ] - } - } - }, - "groups_getCatalog_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getInvitedUsers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getInvites_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_xtr_invited_by" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "groups_getInvites_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_xtr_invited_by" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getLongPollServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_long_poll_server" - } - } - }, - "groups_getLongPollSettings_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_long_poll_settings" - } - } - }, - "groups_getMembers_fields_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total members number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_user_xtr_role" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getMembers_filter_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total members number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_member_role" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getMembers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total members number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 0 - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getRequests_fields_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getRequests_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_getSettings_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/groups_group_settings" - } - } - }, - "groups_getTokenPermissions_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "mask": { - "type": "integer", - "minimum": 0 - }, - "permissions": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_token_permission_setting" - } - } - }, - "required": [ - "mask", - "permissions" - ] - } - } - }, - "groups_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number" - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "Community ID", - "minimum": 0 - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "groups_isMember_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "member": { - "description": "Information whether user is a member of the group", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "invitation": { - "description": "Information whether user has been invited to the group", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "can_invite": { - "description": "Information whether user can be invited", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "can_recall": { - "description": "Information whether user's invite to the group can be recalled", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "request": { - "description": "Information whether user has sent request to the group", - "$ref": "objects.json#/definitions/base_bool_int" - } - }, - "required": [ - "member" - ] - } - } - }, - "groups_isMember_response": { - "type": "object", - "properties": { - "response": { - "description": "Information whether user is a member of the group", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "groups_isMember_user_ids_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_member_status_full" - } - } - } - }, - "groups_isMember_user_ids_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_member_status" - } - } - } - }, - "groups_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total communities number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "leads_checkUser_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/leads_checked" - } - } - }, - "leads_complete_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/leads_complete" - } - } - }, - "leads_getStats_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/leads_lead" - } - } - }, - "leads_getUsers_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/leads_entry" - } - } - } - }, - "leads_metricHit_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "result": { - "type": "boolean", - "description": "Information whether request has been processed successfully" - }, - "redirect_link": { - "type": "string", - "description": "Redirect link" - } - } - } - } - }, - "leads_start_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/leads_start" - } - } - }, - "likes_add_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "likes": { - "type": "integer", - "description": "Total likes number" - } - }, - "required": [ - "likes" - ] - } - } - }, - "likes_delete_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "likes": { - "type": "integer", - "description": "Total likes number" - } - }, - "required": [ - "likes" - ] - } - } - }, - "likes_getList_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "likes_getList_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "likes_isLiked_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "liked": { - "description": "Information whether user liked the object", - "$ref": "objects.json#/definitions/base_bool_int" - }, - "copied": { - "description": "Information whether user reposted the object", - "$ref": "objects.json#/definitions/base_bool_int" - } - }, - "required": [ - "liked", - "copied" - ] - } - } - }, - "market_addAlbum_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "market_album_id": { - "type": "integer", - "description": "Album ID" - } - } - } - } - }, - "market_add_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "market_item_id": { - "type": "integer", - "description": "Item ID" - } - } - } - } - }, - "market_createComment_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Comment ID" - } - } - }, - "market_deleteComment_response": { - "type": "object", - "properties": { - "response": { - "description": "Returns 1 if request has been processed successfully (0 if the comment is not found)", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "market_getAlbumById_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_album" - } - } - } - } - } - }, - "market_getAlbums_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_album" - } - } - } - } - } - }, - "market_getById_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_item_full" - } - } - } - } - } - }, - "market_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_item" - } - } - } - } - } - }, - "market_getCategories_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_category" - } - } - } - } - } - }, - "market_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - } - } - } - } - }, - "market_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_item_full" - } - } - } - } - } - }, - "market_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_item" - } - } - } - } - } - }, - "market_restoreComment_response": { - "type": "object", - "properties": { - "response": { - "description": "Returns 1 if request has been processed successfully (0 if the comment is not found)", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "market_search_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_item_full" - } - } - } - } - } - }, - "market_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/market_market_item" - } - } - } - } - } - }, - "messages_createChat_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Chat ID" - } - } - }, - "messages_deleteChatPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "message_id": { - "type": "integer", - "description": "Service message ID" - }, - "chat": { - "$ref": "objects.json#/definitions/messages_chat" - } - } - } - } - }, - "messages_deleteConversation_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "last_deleted_id": { - "type": "integer", - "minimum": 0, - "description": "Id of the last message, that was deleted" - } - }, - "required": [ - "last_deleted_id" - ] - } - } - }, - "messages_delete_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "patternProperties": { - "^[0-9]+$": { - "$ref": "objects.json#/definitions/base_bool_int" - } - } - } - } - }, - "messages_edit_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "messages_getByConversationMessageId_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_message" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_getById_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_message" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles" - ] - } - } - }, - "messages_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_message" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_getChatPreview_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "preview": { - "$ref": "objects.json#/definitions/message_chat_preview" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - } - } - }, - "required": [ - "preview" - ] - }, - "messages_getChat_chat_ids_fields_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_chat_full" - } - } - } - }, - "messages_getChat_chat_ids_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_chat" - } - } - } - }, - "messages_getChat_fields_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/messages_chat_full" - } - } - }, - "messages_getChat_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/messages_chat" - } - } - }, - "messages_getConversationMembers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Chat members count", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_conversation_member" - } - }, - "chat_restrictions": { - "$ref": "objects.json#/definitions/messages_chat_restrictions" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "items", - "count" - ] - } - } - }, - "messages_getConversationsById_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_conversation" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_getConversationsById_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_conversation" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_getConversations_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "unread_count": { - "type": "integer", - "description": "Unread dialogs number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_conversation_with_message" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_getHistoryAttachments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_history_attachment" - } - }, - "next_from": { - "type": "string", - "description": "Value for pagination" - } - } - } - } - }, - "messages_getHistory_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_message" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_getInviteLink_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "link": { - "type": "string" - } - } - } - }, - "required": [ - "link" - ] - }, - "messages_getLastActivity_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/messages_last_activity" - } - } - }, - "messages_getLongPollHistory_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "history": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "Longpoll event value" - } - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - }, - "messages": { - "$ref": "objects.json#/definitions/messages_longpoll_messages" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "chats": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_chat" - } - }, - "new_pts": { - "type": "integer", - "description": "Persistence timestamp" - }, - "more": { - "type": "boolean", - "description": "Has more" - }, - "conversations": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_conversation" - } - } - } - } - } - }, - "messages_getLongPollServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/messages_longpoll_params" - } - } - }, - "messages_isMessagesFromGroupAllowed_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "is_allowed": { - "$ref": "objects.json#/definitions/base_bool_int" - } - } - } - } - }, - "messages_joinChatByInviteLink_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "chat_id": { - "type": "integer" - } - } - } - }, - "required": [ - "link" - ] - }, - "messages_markAsImportant_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "Messages IDs" - } - } - } - }, - "messages_pin_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/messages_pinned_message" - } - }, - "required": [ - "count", - "items" - ] - }, - "messages_searchConversations_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total results number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_conversation" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - } - } - } - }, - "messages_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/messages_message" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "messages_send_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Message ID" - } - } - }, - "messages_send_user_ids_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "object", - "properties": { - "peer_id": { - "type": "integer" - }, - "message_id": { - "type": "integer", - "minimum": 0 - }, - "error": { - "$ref": "objects.json#/definitions/base_message_error" - } - } - }, - "required": [ - "peer_id", - "message_id" - ] - } - } - }, - "messages_setChatPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "message_id": { - "type": "integer", - "description": "Service message ID" - }, - "chat": { - "$ref": "objects.json#/definitions/messages_chat" - } - } - } - } - }, - "newsfeed_getBanned_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - } - } - } - }, - "newsfeed_getBanned_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "type": "integer", - "description": "Community ID" - } - }, - "members": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID" - } - } - } - } - } - }, - "newsfeed_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_newsfeed_item" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - }, - "next_from": { - "type": "string", - "description": "New from value" - } - }, - "required": [ - "items", - "profiles", - "groups" - ] - } - } - }, - "newsfeed_getLists_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_list_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "newsfeed_getLists_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_list" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "newsfeed_getMentions_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_to_id" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "newsfeed_getRecommended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_newsfeed_item" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - }, - "new_offset": { - "type": "string", - "description": "New offset value" - }, - "next_from": { - "type": "string", - "description": "Next from value" - } - } - } - } - }, - "newsfeed_getSuggestedSources_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "allOf": [ - { - "$ref": "objects.json#/definitions/groups_group_full" - }, - { - "$ref": "objects.json#/definitions/users_user_xtr_type" - } - ] - } - } - } - } - } - }, - "newsfeed_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/newsfeed_newsfeed_item" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - }, - "next_from": { - "type": "string", - "description": "New from value" - } - } - } - } - }, - "newsfeed_saveList_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "List ID" - } - } - }, - "newsfeed_search_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - }, - "count": { - "type": "integer", - "minimum": 0, - "description": "Filtered number" - }, - "total_count": { - "type": "integer", - "description": "Total number", - "minimum": 0 - }, - "next_from": { - "type": "string" - } - } - } - } - }, - "newsfeed_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - }, - "suggested_queries": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "notes_add_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Note ID" - } - } - }, - "notes_createComment_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Comment ID" - } - } - }, - "notes_getById_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/notes_note" - } - } - }, - "notes_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/notes_note_comment" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "notes_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/notes_note" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "notifications_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": [] - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - }, - "last_viewed": { - "type": "integer", - "description": "Time when user has been checked notifications last time" - }, - "photos": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - }, - "videos": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video" - } - }, - "apps": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/apps_app" - } - }, - "next_from": { - "type": "string" - }, - "ttl": { - "type": "integer" - } - } - } - } - }, - "notifications_markAsViewed_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "notifications_sendMessage_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/notifications_send_message_item" - } - } - } - }, - "ok_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/base_ok_response" - } - } - }, - "orders_cancelSubscription_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "orders_changeState_response": { - "type": "object", - "properties": { - "response": { - "type": "string", - "description": "New state" - } - } - }, - "orders_getAmount_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/orders_amount" - } - } - }, - "orders_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/orders_order" - } - } - } - }, - "orders_getUserSubscriptionById_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/orders_subscription" - } - } - }, - "orders_getUserSubscriptions_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/orders_subscription" - } - } - } - } - } - }, - "orders_get_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/orders_order" - } - } - } - }, - "orders_updateSubscription_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "pages_getHistory_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/pages_wikipage_history" - } - } - } - }, - "pages_getTitles_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/pages_wikipage" - } - } - } - }, - "pages_getVersion_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/pages_wikipage_full" - } - } - }, - "pages_get_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/pages_wikipage_full" - } - } - }, - "pages_parseWiki_response": { - "type": "object", - "properties": { - "response": { - "type": "string", - "description": "HTML source" - } - } - }, - "pages_saveAccess_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Page ID" - } - } - }, - "pages_save_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Page ID" - } - } - }, - "photos_copy_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Photo ID", - "minimum": 1 - } - } - }, - "photos_createAlbum_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/photos_photo_album_full" - } - } - }, - "photos_createComment_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Created comment ID" - } - } - }, - "photos_deleteComment_response": { - "type": "object", - "properties": { - "response": { - "description": "Returns 1 if request has been processed successfully, 0 if the comment is not found", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "photos_getAlbumsCount_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Albums number", - "minimum": 0 - } - } - }, - "photos_getAlbums_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_album_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "photos_getAllComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_comment_xtr_pid" - } - } - } - } - } - }, - "photos_getAll_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_full_xtr_real_offset" - } - }, - "more": { - "description": "Information whether next page is presented", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - } - } - }, - "photos_getAll_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_xtr_real_offset" - } - }, - "more": { - "description": "Information whether next page is presented", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - } - } - }, - "photos_getById_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_full" - } - } - } - }, - "photos_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - }, - "photos_getComments_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "real_offset": { - "type": "integer", - "description": "Real offset of the comments", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "photos_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "real_offset": { - "type": "integer", - "description": "Real offset of the comments", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - } - } - } - } - }, - "photos_getMarketUploadServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/base_upload_server" - } - } - }, - "photos_getMessagesUploadServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/photos_photo_upload" - } - } - }, - "photos_getNewTags_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_xtr_tag_info" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "photos_getTags_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_tag" - } - } - } - }, - "photos_getUploadServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/photos_photo_upload" - } - } - }, - "photos_getUserPhotos_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "photos_getUserPhotos_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "photos_getWallUploadServer_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/photos_photo_upload" - } - } - }, - "photos_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "photos_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "photos_putTag_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Created tag ID" - } - } - }, - "photos_restoreComment_response": { - "type": "object", - "properties": { - "response": { - "description": "Returns 1 if request has been processed successfully, 0 if the comment is not found", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "photos_saveMarketAlbumPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - }, - "photos_saveMarketPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - }, - "photos_saveMessagesPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - }, - "photos_saveOwnerCoverPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/base_image" - } - } - } - }, - "photos_saveOwnerPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "photo_hash": { - "type": "string", - "description": "Photo hash" - }, - "photo_src": { - "type": "string", - "description": "Uploaded image url" - }, - "photo_src_big": { - "type": "string", - "description": "Uploaded image url" - }, - "photo_src_small": { - "type": "string", - "description": "Uploaded image url" - }, - "saved": { - "type": "integer", - "description": "Returns 1 if profile photo is saved" - }, - "post_id": { - "type": "integer", - "description": "Created post ID" - } - }, - "required": [ - "photo_hash", - "photo_src" - ] - } - } - }, - "photos_saveWallPhoto_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - }, - "photos_save_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - }, - "photos_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/photos_photo" - } - } - } - } - } - }, - "polls_addVote_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "polls_create_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/polls_poll" - } - } - }, - "polls_deleteVote_response": { - "type": "object", - "properties": { - "response": { - "description": "Result", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "polls_getById_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/polls_poll" - } - } - }, - "polls_getVoters_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/polls_voters" - } - } - } - }, - "prettyCards_create_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "owner_id": { - "type": "integer", - "description": "Owner ID of created pretty card" - }, - "card_id": { - "type": "string", - "description": "Card ID of created pretty card" - } - }, - "required": [ - "owner_id", - "card_id" - ] - } - } - }, - "prettyCards_delete_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "owner_id": { - "type": "integer", - "description": "Owner ID of deleted pretty card" - }, - "card_id": { - "type": "string", - "description": "Card ID of deleted pretty card" - }, - "error": { - "type": "string", - "description": "Error reason if error happened" - } - }, - "required": [ - "owner_id", - "card_id" - ] - } - } - }, - "prettyCards_edit_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "owner_id": { - "type": "integer", - "description": "Owner ID of edited pretty card" - }, - "card_id": { - "type": "string", - "description": "Card ID of edited pretty card" - } - }, - "required": [ - "owner_id", - "card_id" - ] - } - } - }, - "prettyCards_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/prettyCards_prettyCard" - } - } - } - }, - "prettyCards_getUploadURL_response": { - "type": "object", - "properties": { - "response": { - "type": "string", - "description": "Upload URL" - } - } - }, - "prettyCards_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/prettyCards_prettyCard" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "search_getHints_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/search_hint" - } - }, - "suggested_queries": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "secure_checkToken_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/secure_token_checked" - } - } - }, - "secure_getAppBalance_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "App balance" - } - } - }, - "secure_getSMSHistory_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/secure_sms_notification" - } - } - } - }, - "secure_getTransactionsHistory_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/secure_transaction" - } - } - } - }, - "secure_getUserLevel_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/secure_level" - } - } - } - }, - "secure_giveEventSticker_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "integer" - }, - "status": { - "type": "string" - } - } - } - } - } - }, - "secure_sendNotification_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID" - } - } - } - }, - "stats_getPostReach_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stats_wallpost_stat" - } - } - } - }, - "stats_get_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stats_period" - } - } - } - }, - "status_get_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/status_status" - } - } - }, - "storage_getKeys_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "string", - "description": "Key name" - } - } - } - }, - "storage_get_keys_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/storage_value" - } - } - } - }, - "storage_get_response": { - "type": "object", - "properties": { - "response": { - "type": "string", - "description": "Value of key" - } - } - }, - "stories_getBanned_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "Owner ID" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "stories_getBanned_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "Owner ID" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "stories_getById_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stories_story" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "stories_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stories_story" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "stories_getPhotoUploadServer_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "upload_url": { - "type": "string", - "description": "Upload URL" - }, - "user_ids": { - "type": "array", - "description": "Users ID who can to see story.", - "items": { - "type": "integer", - "minimum": 0 - } - } - }, - "required": [ - "upload_url", - "user_ids" - ] - } - } - }, - "stories_getReplies_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stories_story" - } - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "stories_getReplies_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stories_story" - } - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "stories_getStats_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/stories_story_stats" - } - } - }, - "stories_getVideoUploadServer_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "upload_url": { - "type": "string", - "description": "Upload URL" - }, - "user_ids": { - "type": "array", - "description": "Users ID who can to see story.", - "items": { - "type": "integer", - "minimum": 0 - } - } - }, - "required": [ - "upload_url", - "user_ids" - ] - } - } - }, - "stories_getViewers_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Viewers count" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "stories_getViewers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Viewers count" - }, - "items": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "stories_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stories_story" - } - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "stories_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Stories count" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/stories_story" - } - }, - "promo_data": { - "$ref": "objects.json#/definitions/stories_promo_block" - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "stories_upload_response": { - "withoutRefs": true, - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "story": { - "$ref": "objects.json#/definitions/stories_story" - } - }, - "required": [ - "story" - ] - } - } - }, - "streaming_getServerUrl_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "description": "Server host" - }, - "key": { - "type": "string", - "description": "Access key" - } - } - } - } - }, - "users_getFollowers_fields_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number of available results", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "users_getFollowers_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total friends number", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "type": "integer", - "description": "User ID", - "minimum": 1 - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "users_getSubscriptions_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number of available results", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_subscriptions_item" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "users_getSubscriptions_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "users": { - "$ref": "objects.json#/definitions/users_users_array" - }, - "groups": { - "$ref": "objects.json#/definitions/groups_groups_array" - } - }, - "required": [ - "users", - "groups" - ] - } - } - }, - "users_get_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_xtr_counters" - } - } - } - }, - "users_isAppUser_response": { - "type": "object", - "properties": { - "response": { - "description": "Information whether the user have installed an app", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "users_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number of available results" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - } - } - } - } - }, - "utils_checkLink_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/utils_link_checked" - } - } - }, - "utils_getLastShortenedLinks_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number of available results", - "minimum": 0 - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/utils_last_shortened_link" - } - } - } - } - } - }, - "utils_getLinkStats_extended_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/utils_link_stats_extended" - } - } - }, - "utils_getLinkStats_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/utils_link_stats" - } - } - }, - "utils_getServerTime_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Time as Unixtime" - } - } - }, - "utils_getShortLink_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/utils_short_link" - } - } - }, - "utils_resolveScreenName_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/utils_domain_resolved" - } - } - }, - "video_addAlbum_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "album_id": { - "type": "integer", - "description": "Created album ID" - } - }, - "required": [ - "album_id" - ] - } - } - }, - "video_createComment_response": { - "type": "object", - "properties": { - "response": { - "type": "integer", - "description": "Created comment ID" - } - } - }, - "video_getAlbumById_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/video_video_album_full" - } - } - }, - "video_getAlbumsByVideo_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video_album_full" - } - } - } - } - } - }, - "video_getAlbumsByVideo_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "type": "integer", - "description": "Album ID" - } - } - } - }, - "video_getAlbums_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video_album_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "video_getAlbums_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video_album_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "video_getComments_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "groups", - "profiles" - ] - } - } - }, - "video_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "video_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "video_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "video_restoreComment_response": { - "type": "object", - "properties": { - "response": { - "description": "Returns 1 if request has been processed successfully, 0 if the comment is not found", - "$ref": "objects.json#/definitions/base_bool_int" - } - } - }, - "video_save_response": { - "type": "object", - "properties": { - "response": { - "$ref": "objects.json#/definitions/video_save_result" - } - } - }, - "video_search_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_min" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "video_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/video_video" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "wall_createComment_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "comment_id": { - "type": "integer", - "description": "Created comment ID" - } - }, - "required": [ - "comment_id" - ] - } - } - }, - "wall_edit_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "post_id": { - "type": "integer", - "description": "Edited post ID", - "minimum": 0 - } - }, - "required": [ - "post_id" - ] - } - } - }, - "wall_getById_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "items", - "profiles", - "groups" - ] - } - } - }, - "wall_getById_response": { - "type": "object", - "properties": { - "response": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - } - } - }, - "wall_getComments_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - }, - "show_reply_button": { - "type": "boolean" - }, - "can_post": { - "type": "boolean", - "description": "Information whether current user can comment the post" - }, - "groups_can_post": { - "type": "boolean", - "description": "Information whether groups can comment the post" - }, - "current_level_count": { - "type": "integer", - "description": "Count of replies of current level" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "wall_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wall_comment" - } - }, - "can_post": { - "type": "boolean", - "description": "Information whether current user can comment the post" - }, - "groups_can_post": { - "type": "boolean", - "description": "Information whether groups can comment the post" - }, - "current_level_count": { - "type": "integer", - "description": "Count of replies of current level" - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "wall_getReposts_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group" - } - } - }, - "required": [ - "items", - "profiles", - "groups" - ] - } - } - }, - "wall_get_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "wall_get_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "wall_postAdsStealth_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "post_id": { - "type": "integer", - "description": "Created post ID" - } - }, - "required": [ - "post_id" - ] - } - } - }, - "wall_post_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "post_id": { - "type": "integer", - "description": "Created post ID" - } - }, - "required": [ - "post_id" - ] - } - } - }, - "wall_repost_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "success": { - "$ref": "objects.json#/definitions/base_ok_response" - }, - "post_id": { - "type": "integer", - "description": "Created post ID" - }, - "reposts_count": { - "type": "integer", - "description": "Reposts number", - "minimum": 1 - }, - "likes_count": { - "type": "integer", - "description": "Reposts number", - "minimum": 0 - } - }, - "required": [ - "success", - "post_id", - "reposts_count", - "likes_count" - ] - } - } - }, - "wall_search_extended_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - }, - "profiles": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/users_user_full" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/groups_group_full" - } - } - }, - "required": [ - "count", - "items", - "profiles", - "groups" - ] - } - } - }, - "wall_search_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "items": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/wall_wallpost_full" - } - } - }, - "required": [ - "count", - "items" - ] - } - } - }, - "widgets_getComments_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "posts": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/widgets_widget_comment" - } - } - }, - "required": [ - "count", - "posts" - ] - } - } - }, - "widgets_getPages_response": { - "type": "object", - "properties": { - "response": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number" - }, - "pages": { - "type": "array", - "items": { - "$ref": "objects.json#/definitions/widgets_widget_page" - } - } - }, - "required": [ - "count", - "pages" - ] - } - } - } - } -} \ No newline at end of file diff --git a/vkapi/schemes/schema.json b/vkapi/schemes/schema.json deleted file mode 100644 index 29c3c2a..0000000 --- a/vkapi/schemes/schema.json +++ /dev/null @@ -1,394 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "API", - "description": "API declaration", - "type": "object", - "definitions": { - "jsonReference": { - "type": "object", - "required": [ - "$ref" - ], - "additionalProperties": false, - "properties": { - "$ref": { - "type": "string" - } - } - }, - "parameterArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "parameterTypes": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "string" - ] - }, - "responseTypes": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "string", - "object" - ] - }, - "responsePropertyTypes": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "string" - ] - }, - "itemTypes": { - "type": "string", - "enum": [ - "boolean", - "integer", - "number", - "string" - ] - }, - "parameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Parameter name" - }, - "format": { - "type": "string", - "enum": [ - "json" - ] - }, - "type": { - "$ref": "#/definitions/parameterTypes", - "description": "Parameter type" - }, - "items": { - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "type": { - "$ref": "#/definitions/itemTypes" - }, - "maximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "enumNames": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - } - }, - "oneOf": [ - { - "required": [ - "type" - ] - }, - { - "required": [ - "$ref" - ] - } - ], - "additionalProperties": false - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "maximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "enumNames": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "default": [], - "required": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "description": { - "type": "string", - "description": "Parameter description" - }, - "deprecated_from_version": { - "type": "string", - "description": "Property deprecated from version" - }, - "from_version": { - "type": "string", - "description": "Property implemented from version" - } - }, - "required": [ - "name", - "type" - ], - "additionalProperties": false - }, - "responseProperty": { - "type": "object", - "oneOf": [ - { - "required": [ - "type" - ] - }, - { - "required": [ - "$ref" - ] - } - ], - "properties": { - "type": { - "$ref": "#/definitions/responseTypes" - }, - "description": { - "type": "string" - } - } - }, - "response": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "deprecated_from_version": { - "type": "string" - }, - "from_version": { - "type": "string" - }, - "items": { - "oneOf": [ - { - "type": "array" - }, - { - "type": "object", - "properties": { - "$ref": { - "type": "string" - } - } - } - ] - }, - "required": { - "type": "array" - }, - "title": { - "type": "string" - }, - "oneOf": { - "type": "array" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "properties": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9_]+$": { - "$ref": "#/definitions/responseProperty" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "error": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Error name" - }, - "code": { - "type": "integer", - "description": "Error code", - "minimum": 0 - }, - "description": { - "type": "string", - "description": "Error description" - }, - "deprecated_from_version": { - "type": "string" - }, - "from_version": { - "type": "string" - } - }, - "required": [ - "name", - "code", - "description" - ], - "additionalProperties": false - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/error" - }, - "description": "Possible errors" - }, - "method": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Method name" - }, - "description": { - "type": "string", - "description": "Method description" - }, - "deprecated_from_version": { - "type": "string" - }, - "from_version": { - "type": "string" - }, - "access_token_type": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "open", - "user", - "group", - "service" - ], - "description": "Access token type" - }, - "description": "Input parameters for method" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/parameter" - }, - "description": "Input parameters for method" - }, - "responses": { - "type": "object", - "patternProperties": { - "^([a-zA-Z0-9_]+)?[rR]esponse$": { - "$ref": "#/definitions/response" - } - }, - "additionalProperties": true, - "description": "References to response objects" - }, - "emptyResponse": { - "type": "boolean", - "default": false - }, - "errors": { - "$ref": "#/definitions/errors" - } - }, - "required": [ - "name", - "access_token_type", - "responses" - ], - "additionalProperties": false - } - }, - "properties": { - "errors": { - "$ref": "#/definitions/errors" - }, - "methods": { - "type": "array", - "items": { - "$ref": "#/definitions/method" - } - }, - "definitions": { - "patternProperties": { - "^([a-zA-Z0-9_]+)?[rR]esponse$": { - "$ref": "#/definitions/response" - } - } - }, - "$schema": { - "type": "string", - "format": "uri-reference" - }, - "title": { - "type": "string" - } - }, - "additionalProperties": false -} \ No newline at end of file