{"id":15017622,"url":"https://github.com/mamantoha/vkontakte_client","last_synced_at":"2025-08-11T16:03:31.842Z","repository":{"id":965148,"uuid":"756749","full_name":"mamantoha/vkontakte_client","owner":"mamantoha","description":"VKontakte API Client for Ruby","archived":false,"fork":false,"pushed_at":"2025-05-19T13:03:01.000Z","size":157,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-26T06:26:36.162Z","etag":null,"topics":["ruby","vk","vkontakte"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mamantoha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-07-04T20:28:56.000Z","updated_at":"2025-05-19T13:03:07.000Z","dependencies_parsed_at":"2025-04-12T12:33:44.560Z","dependency_job_id":"13f4013c-6e1b-497f-8cbe-b1fa76be0849","html_url":"https://github.com/mamantoha/vkontakte_client","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mamantoha/vkontakte_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fvkontakte_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fvkontakte_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fvkontakte_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fvkontakte_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/vkontakte_client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fvkontakte_client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269915102,"owners_count":24495645,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ruby","vk","vkontakte"],"created_at":"2024-09-24T19:50:46.055Z","updated_at":"2025-08-11T16:03:31.832Z","avatar_url":"https://github.com/mamantoha.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vkontakte Client\n\n[![Gem Version](https://img.shields.io/gem/v/vkontakte_client.svg?style=flat)](https://rubygems.org/gems/vkontakte_client)\n\nRuby library for authorization of client applications and for access to the VK API\n\n## Installing\n\nAdd to your `Gemfile`:\n\n```ruby\ngem 'vkontakte_client'\n```\n\nThen `bundle install`\n\n## Usage\n\n``` ruby\nrequire 'vkontakte_client'\n```\n\n## Application registration\n\nYou must register your application in order to use all the capabilities of API VKontakte.\n\nOpen the page “Managed apps” in the left menu, then press “Create an app”. You will be directed to the page \u003chttps://vk.com/editapp?act=create\u003e.\n\nYou need to choose _Standalone-app_.\n\nAfter confirming the action, you will be redirected to the page with information about the app. Open the page \"Settings\" in the left-hand menu and you will see the field \"ID applications\", in which a number will be located. For example, `5490057`. This number is the application identification, a.k.a. `API_ID`, `APP_ID`, `client_id`, and you will need it for your future work.\n\n### Initialize Vkontakte client\n\nWith client authorization, the access key to the API `access_token`.\nThe constructor takes only one argument - the VK application ID - `CLIENT_ID`.\n\n``` ruby\nvk = Vkontakte::Client.new(CLIENT_ID)\n```\n\n### Login and password authorization\n\nIn general, for API identification, a special access key is used which is called `access_token`. This token is a string of numbers and Latin letters which you send to the server along with the request.\n\nThis library supports the [Implicit flow](https://vk.com/dev/implicit_flow_user) way to obtain an OAuth 2.0 access key:\nth 2.0:\n\nThe `login!` method takes the following arguments:\n\n* `email`: user login\n* `pass`: user password\n* `permissions`: request [application permissions](https://vk.com/dev/permissions)\n\n``` ruby\nvk.login!(email, pass, permissions: 'friends')\n```\n\n### API Requests\n\nAfter successful authorization, you can [make requests to the API](https://vk.com/dev/api_requests) using the method name from the [API function list](https://vk.com/dev/methods).\n\nThe parameters of the corresponding API method are passed as `Hash`.\nNote that a method like `friends.get` needs to be passed as `friends_get`.\n\n``` ruby\nvk.api.friends_get(fields: 'online', order: 'name', name_case: 'dat')\n```\n\nTo avoid errors, you can pre-check the status of the user using the `account.getInfo` method.\n\n```ruby\nvk.api.account_getInfo\n```\n\n### Token Authorization\n\nIt is useful to save the received `access_token` (and, if necessary, the `user_id`) to reuse them\n\n``` ruby\naccess_token = vk.access_token\nuser_id = vk.user_id\n```\n\n``` ruby\napi = Vkontakte::API.new(access_token)\napi.friends_get(fields: 'online', order: 'name', name_case: 'dat')\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/vkontakte_client/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## License\n\nCopyright: 2010-2025 Anton Maminov (anton.maminov@gmail.com)\n\nThis library is distributed under the MIT license. Please see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fvkontakte_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fvkontakte_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fvkontakte_client/lists"}