{"id":15134096,"url":"https://github.com/swedesjs/vk_library","last_synced_at":"2025-09-29T03:30:33.629Z","repository":{"id":56841755,"uuid":"419077127","full_name":"swedesjs/vk_library","owner":"swedesjs","description":" VK SDK for Dart with support for all public VK api methods, Bots Longpoll, User Longpoll, etc.","archived":true,"fork":false,"pushed_at":"2022-05-21T10:33:49.000Z","size":793,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-16T17:20:46.290Z","etag":null,"topics":["api","dart","dartlang","flutter","library","sdk","vk","vk-api","vk-bot","vk-sdk","vkapi","vkcom","vkontakte","vkontakte-api"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swedesjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-19T20:12:39.000Z","updated_at":"2024-01-15T16:17:08.000Z","dependencies_parsed_at":"2022-08-29T05:01:32.258Z","dependency_job_id":null,"html_url":"https://github.com/swedesjs/vk_library","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swedesjs%2Fvk_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swedesjs%2Fvk_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swedesjs%2Fvk_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swedesjs%2Fvk_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swedesjs","download_url":"https://codeload.github.com/swedesjs/vk_library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234583683,"owners_count":18856280,"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","dart","dartlang","flutter","library","sdk","vk","vk-api","vk-bot","vk-sdk","vkapi","vkcom","vkontakte","vkontakte-api"],"created_at":"2024-09-26T05:02:37.641Z","updated_at":"2025-09-29T03:30:28.123Z","avatar_url":"https://github.com/swedesjs.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vk_library\n[![Pub](https://img.shields.io/pub/v/vk_library?color=blue\u0026style=flat-square)](https://pub.dev/packages/vk_library)\n\nVK SDK for Dart with support for all public VK api methods, Bots Longpoll, User Longpoll, etc.\n## Get Started\n\n### Add Dependency\n\n```yaml\ndependencies:\n  vk_library: 1.0.4\n```\n\n### Create a base class to work with\n```dart\nfinal vk = VK(options: VKOptions(token: 'token'));\n```\n\n## Content\n\n- [Examples](#examples)\n- [Error processing](#error-processing)\n- [Flaws and bugs](#flaws-and-bugs)\n\n## Examples\n\nAPI request:\n\n```dart\nfinal request = await vk.api.users.get(userIds: ['durov']);\n\nprint(request['response']);\n```\n\u003e The same with the rest of the vk methods, syntax: `vk.api.\u003cmethod_name\u003e`\n\nAPI request via native function:\n\n```dart\nfinal request = await vk.api.request('users.get', {'user_ids': ['durov']});\n\nprint(request['response']);\n```\n\nReceive longpoll updates:\n\n```dart\nfinal longpoll = GroupLongpoll(vk.api);\n\nlongpoll.onUpdate().listen((event) {\n  print(event.toJson());\n});\n\nlongpoll.start();\n```\n\nReceive user longpoll updates:\n\n```dart\nfinal longpoll = UserLongpoll(vk.api);\n\nlongpoll.onUpdate().listen((event) {\n  print(event);\n});\n\nlongpoll.start();\n```\n## Error processing\n\nAPI request may result in an APIException:\n\n```dart\ntry {\n  await vk.api.groups.getById();\n} on APIException catch (e) {\n  print('Message: ${e.message}');\n  print('Code: ${e.code}');\n  print(e.requestParams.map((e) =\u003e e.toJson()).toList());\n    \n  rethrow;\n}\n```\n\n## Flaws and bugs\nFound a bug or a bug? - [issues tracker](https://github.com/swedesjs/vk_library/issues).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswedesjs%2Fvk_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswedesjs%2Fvk_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswedesjs%2Fvk_library/lists"}