{"id":15134132,"url":"https://github.com/qucals/vk-api","last_synced_at":"2025-10-23T09:31:24.919Z","repository":{"id":47692358,"uuid":"282927191","full_name":"qucals/VK-API","owner":"qucals","description":"C++ Library for working with VK API","archived":false,"fork":false,"pushed_at":"2022-10-25T01:30:15.000Z","size":2414,"stargazers_count":6,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T17:38:32.198Z","etag":null,"topics":["api","callback-api","cmake","cpp","cxx","longpoll","streaming-api","vk","vk-api","vk-bot","vkapi","vkontakte","vkontakte-api"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qucals.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["paypal.me/qucals"]}},"created_at":"2020-07-27T14:47:12.000Z","updated_at":"2024-09-06T15:38:50.000Z","dependencies_parsed_at":"2023-01-20T10:47:06.079Z","dependency_job_id":null,"html_url":"https://github.com/qucals/VK-API","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qucals%2FVK-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qucals%2FVK-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qucals%2FVK-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qucals%2FVK-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qucals","download_url":"https://codeload.github.com/qucals/VK-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237807472,"owners_count":19369597,"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":["api","callback-api","cmake","cpp","cxx","longpoll","streaming-api","vk","vk-api","vk-bot","vkapi","vkontakte","vkontakte-api"],"created_at":"2024-09-26T05:02:56.176Z","updated_at":"2025-10-23T09:31:24.552Z","avatar_url":"https://github.com/qucals.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"\" rel=\"noopener\"\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eVK API Library\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Status](https://img.shields.io/badge/status-active-success.svg)]()\n[![CodeFactor](https://www.codefactor.io/repository/github/qucals/VK-API/badge/master)](https://www.codefactor.io/repository/github/qucals/VK-API/overview/master)\n\u003cbr\u003e\n[![Workflow](https://github.com/qucals/VK-API/actions/workflows/macos.yml/badge.svg)]()\n[![Workflow](https://github.com/qucals/VK-API/actions/workflows/ubuntu.yml/badge.svg)]()\n[![Workflow](https://github.com/qucals/VK-API/actions/workflows/windows.yml/badge.svg)]()\n\u003cbr\u003e\n[![GitHub Issues](https://img.shields.io/github/issues/qucals/VK-API.svg)](https://github.com/qucals/VK-API/issues)\n[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/qucals/VK-API.svg)](https://github.com/qucals/VK-API/pulls)\n[![License](https://img.shields.io/github/license/qucals/VK-API)](/LICENSE)\n\n\u003c/div\u003e\n\n---\n\n\u003cp align=\"center\"\u003e The easiest C++ library to use for working with the VK API.\n    \u003cbr\u003e \n\u003c/p\u003e\n\n## 📝 Table of Contents\n\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Deployment](#deployment)\n- [Usage](#usage)\n- [Built Using](#built_using)\n- [Authors](#authors)\n  \n## 🧐 About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nThis is a library for easy work with the VK API. It contains all the standard queries that are defined by VK. This makes it easier to access LongPollServer VK.\n\n## 🏁 Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.\n\nSteps \u003ca name = \"steps\"\u003e\u003c/a\u003e:\n1. Copy this repository to your computer;\n2. Open terminal in a directory where you copied the repository;\n3. Change a main directory: `cd build`;\n4. Enter the following command with your replacements: `cmake ..`;\n5. Build the project by the next command: `cmake --build .`.\n\n### Prerequisites\n\nThe library using 2 additional dependencies:\n1. [curlpp](https://www.curlpp.org/) - A library for working with requests;\n2. [json](https://github.com/nlohmann/json) - A library for working with json.\n\nNote that you also can install it by `vcpkg` on Windows.\n\n### Installing \u003ca name = \"installing\"\u003e\u003c/a\u003e\n\nFor connection this library to yours you need to follow the next steps:\n1. Copy this repository to your computer;\n2. Open terminal in a directory where you copied the repository;\n3. Change a main directory: `cd build`;\n4. Enter the following command with your replacements: `cmake ..`;\n5. Build and install the project by the next command: `cmake --build . --target install --config Release`;\n6. If building and install is ended successfully you can see there are `include` and `lib`'s directories in `install`'s directory.\n\nAfter the above steps you will have a static library and include's files that you can connection to your project.\n\n## 🎈 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nThere are two base examples.\n\nAuthorization for Bot:\n\n```CXX\n#include \"Bot.hpp\"\n\nint main(int argc, const char** argv)\n{\n    std::string access_token = \"your_token_there\";\n    std::string group_id = \"your_group_id_there\";\n\n    vk::base::bot::Bot bot(group_id);\n\n    if (bot.Auth(access_token) == true) {\n        // The further behaviour\n    } else {\n        // The further behaviour\n    }\n\n    return 0;\n}\n```\n\nAuthorization for User:\n\n```CXX\n#include \"User.hpp\"\n\nint main(int argc, const char** argv)\n{\n    std::string app_id = \"your_app_id_there\";\n    std::string app_secure_key = \"your_app_secure_key_there\";\n    std::string login = \"your_login_there\";\n    std::string password = \"your_password_there\";\n    std::string access_token = \"your_access_token_there\";\n\n    vk::base::user::User user(app_id, app_secure_key);\n    \n    if(user.Auth(login, password) == true) {\n        // The further behaviour\n    } else {\n        // The further behaviour\n    }\n\n    // or\n\n    if (user.Auth(access_token) == true) {\n        // The further behaviour\n    } else {\n        // The further behaviour\n    }\n\n    return 0;\n}\n```\n\nThere are other examples of using this library in the `examples` directory.\n\n## 🚀 Deployment \u003ca name = \"deployment\"\u003e\u003c/a\u003e\n\n### CMake\n\nIf you use CMake you make use the `find_package` instruction.\nAfter [installing](#installing) the project you can find vkapiConfig.cmake in the `lib/cmake` directory. For connection this library to your project you need to add the following code to your cmake file:\n```CMake\n    set(CMAKE_CXX_FLAGS \" -lcurl\")\n    set(VKAPI_DIR *path_to_vkapiconfig.cmake*)\n    find_package(VKAPI CONFIG REQUIRED)\n    target_link_libraries(${PROJECT_NAME} VKAPI::VKAPI)\n```\nReplace: \n`*path_to_vkapiconfig.cmake*` to the path to directory `lib/cmake`;\n\n### Others\n\nIf you use another building system you need to connection include's files and lib file which is located `bin\\include` and `lib` directories.\n\n## ⛏️ Built Using \u003ca name = \"built_using\"\u003e\u003c/a\u003e\n\n- [CMake](https://cmake.org/) - Cross-platform family of tools designed to build\n\n## ✍️ Authors \u003ca name = \"authors\"\u003e\u003c/a\u003e\n\n- [@qucals](https://github.com/qucals) - Idea \u0026 Initial work\n","funding_links":["paypal.me/qucals"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqucals%2Fvk-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqucals%2Fvk-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqucals%2Fvk-api/lists"}