{"id":15017611,"url":"https://github.com/emcifuntik/vk-fast-longpoll","last_synced_at":"2025-09-02T15:44:26.725Z","repository":{"id":41902344,"uuid":"86808488","full_name":"emcifuntik/vk-fast-longpoll","owner":"emcifuntik","description":"The best lib for vk API.","archived":false,"fork":false,"pushed_at":"2019-01-31T18:45:07.000Z","size":1705,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T20:43:53.628Z","etag":null,"topics":["bot","bots","longpoll","vk","vk-api","vk-app","vk-bot","vkapi","vkbot","vkontakte","vkontakte-api","vkontakte-client","vkontakte-sdk"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emcifuntik.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-31T10:39:40.000Z","updated_at":"2023-11-23T20:01:04.000Z","dependencies_parsed_at":"2022-08-24T18:40:41.920Z","dependency_job_id":null,"html_url":"https://github.com/emcifuntik/vk-fast-longpoll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcifuntik%2Fvk-fast-longpoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcifuntik%2Fvk-fast-longpoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcifuntik%2Fvk-fast-longpoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcifuntik%2Fvk-fast-longpoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emcifuntik","download_url":"https://codeload.github.com/emcifuntik/vk-fast-longpoll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248566804,"owners_count":21125728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","bots","longpoll","vk","vk-api","vk-app","vk-bot","vkapi","vkbot","vkontakte","vkontakte-api","vkontakte-client","vkontakte-sdk"],"created_at":"2024-09-24T19:50:45.359Z","updated_at":"2025-04-12T12:33:43.668Z","avatar_url":"https://github.com/emcifuntik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vk-fast-longpoll\n\u003e RU | Мощный инструмент для работы с VK API, который работает в 25 раз быстрее обычных вызовов API методов.\n\n\u003e EN | Powerfull tool for VK api that works 25 times faster then usual api calls\n\n[![NPM version](https://img.shields.io/npm/v/vk-fast-longpoll.svg)](https://www.npmjs.com/package/vk-fast-longpoll)\n[![NPM downloads](https://img.shields.io/npm/dt/vk-fast-longpoll.svg)](https://www.npmjs.com/package/vk-fast-longpoll)\n\n# Русский\n## Установка и начало работы\n### Установка\n```shell\nnpm install vk-fast-longpoll --save\n```\n### Инициализация\n```javascript\nconst VK = require('vk-fast-longpoll');\nconst group = new VK('token here');\n```\n### Запуск longpoll соединения\n```javascript\ngroup.longpoll.start();\n```\n### Начинаем слушать сообщения\n```javascript\ngroup.longpoll.on('message', (message) =\u003e {\n    if(!message.isOutbox)\n    {\n        //Отвечаем на сообщение\n    }\n});\n```\n### Вызов API методов\nВсе методы VK должны вызываться с префиксом api например\n```javascript\ngroup.api.messages.send({user_id: 1, message: 'Привет, Паша'});\n```\nМетоды возвращают Promise-ы, поэтому стоит добавлять обработчик ошибок к каждому вызову.\n```javascript\ngroup.api.messages.send({user_id: 1, message: 'Привет, Паша'}).catch(console.error);\n```\nВсе названия методов, а также названия полей полностью соответсвуют названиям из [документации VK](https://vk.com/dev/methods)\n\n### Echo пример\n```javascript\nconst VK = require('vk-fast-longpoll');\nconst group = new VK('token here');\n\ngroup.longpoll.start();\n\ngroup.longpoll.on('message', (message) =\u003e {\n    if(!message.isOutbox)\n    {\n        group.api.messages.send({user_id: message.sender, message: message.text}).then(() =\u003e {\n            console.log(message.text);\n        }).catch(console.error);\n    }\n});\n```\n\n### Загрузка файлов\n```javascript\n//В разработке\n```\n\n# English\n## Installing and getting started\n### Installing\n```shell\nnpm install vk-io --save\n```\n### Initializing\n```javascript\nconst VK = require('vk-fast-longpoll');\nconst group = new VK('token here');\n```\n### Longpoll connection start\n```javascript\ngroup.longpoll.start();\n```\n### Listen to messages\n```javascript\ngroup.longpoll.on('message', (message) =\u003e {\n    if(!message.isOutbox)\n    {\n        //Reply message\n    }\n});\n```\n### API method calls\nAll VK Api methods must be called with `api` prefix\n```javascript\ngroup.api.messages.send({user_id: 1, message: 'Hello, Pasha'});\n```\nAll methods return Promises, therefor you need to catch errors in every api call.\n```javascript\ngroup.api.messages.send({user_id: 1, message: 'Hello, Pasha'}).catch(console.error);\n```\nAll methods names and fields names are equal as [VK Api docs](https://vk.com/dev/methods)\n\n### Echo example\n```javascript\nconst VK = require('vk-fast-longpoll');\nconst group = new VK('token here');\n\ngroup.longpoll.start();\n\ngroup.longpoll.on('message', (message) =\u003e {\n    if(!message.isOutbox)\n    {\n        group.api.messages.send({user_id: message.sender, message: message.text}).then(() =\u003e {\n            console.log(message.text);\n        }).catch(console.error);\n    }\n});\n```\n\n### File uploading\n```javascript\n//In development\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcifuntik%2Fvk-fast-longpoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femcifuntik%2Fvk-fast-longpoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcifuntik%2Fvk-fast-longpoll/lists"}