{"id":13340608,"url":"https://github.com/chipslays/vk-music","last_synced_at":"2025-04-30T22:14:44.621Z","repository":{"id":62501840,"uuid":"381552421","full_name":"chipslays/vk-music","owner":"chipslays","description":"🎵 A simple wrapper for VK Music API.","archived":false,"fork":false,"pushed_at":"2021-06-30T10:05:53.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T22:14:38.861Z","etag":null,"topics":["audio","library","music","vk","vk-audio","vk-music"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/chipslays.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-30T02:28:09.000Z","updated_at":"2024-02-27T14:45:18.000Z","dependencies_parsed_at":"2022-11-02T12:01:49.162Z","dependency_job_id":null,"html_url":"https://github.com/chipslays/vk-music","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fvk-music","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fvk-music/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fvk-music/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipslays%2Fvk-music/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chipslays","download_url":"https://codeload.github.com/chipslays/vk-music/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789618,"owners_count":21644086,"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":["audio","library","music","vk","vk-audio","vk-music"],"created_at":"2024-07-29T19:23:37.543Z","updated_at":"2025-04-30T22:14:44.601Z","avatar_url":"https://github.com/chipslays.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎵 VK Music API for PHP\n\nA simple wrapper for VK Music API.\n\n\u003e For use this library, first you need get a token and user-agent.\n\u003e\n\u003e See for more [`vodka2/vk-audio-token`](https://github.com/vodka2/vk-audio-token).\n\n## Installation\n\n```bash\ncomposer require chipslays/vk-music\n```\n\n## Usage\n\n```php\nuse Chipslays\\VkMusic\\Client;\n\n$client = new Client('YOUR_TOKEN', 'YOUR_USERAGENT');\n\n$response = $client-\u003esearch('Justin Bieber - Baby');\n\nprint_r($response-\u003etoArray());\n\n// Array\n// (\n//     [count] =\u003e 3693\n//     [items] =\u003e Array\n//         (\n//            [0] =\u003e ...\n//            [1] =\u003e ...\n//            [2] =\u003e ...\n//         )\n// )\n```\n\nYou can get the value using dot notation by [`chipslays/collection`](https://github.com/chipslays/collection).\n\n```php\nprint_r($response-\u003eget('items.0.artist'));\n```\n\n## Methods\n\n\u003e **NOTICE:** Optional parameter `$extra` is a array of parameters with `key =\u003e value`.\n\n#### `search(string $q, int $count = 10, int $offset = 0, array $extra = []): Collection`\n```php\n$client-\u003esearch('Justin Bieber - Baby');\n```\n\n#### `getById(string|array $audios): Collection`\n```php\n$client-\u003egetById(['371745461_456289486', '-41489995_202246189']);\n```\n\n#### `get($owner_id, int $count = 10, int $offset = 0, $extra = []): Collection`\n```php\n$client-\u003eget('371745461');\n```\n\n#### `getPlaylists($owner_id, int $count = 10): Collection`\n```php\n$client-\u003egetPlaylists('371745461');\n```\n\n#### `getRecommendations(int $count = 10): Collection`\n```php\n$client-\u003egetRecommendations();\n```\n\n#### `getPopular(int $count = 10): Collection`\n```php\n$client-\u003egetPopular();\n```\n\n#### `method(string $method, array $params): Collection`\n```php\n$client-\u003emethod('audio.search', [\n    'q' =\u003e 'Justin Bieber - Baby',\n    'count' =\u003e '10',\n]);\n```\n\n## Helpers\n\nYou can use `vk_music` helper instead `Client` class.\n\n```php\n$client = vk_music('YOUR_TOKEN', 'YOUR_USERAGENT');\n```\n\n## Todo\n\n* Write tests 😴💤\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipslays%2Fvk-music","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchipslays%2Fvk-music","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipslays%2Fvk-music/lists"}