Skip to content

sonrac/yandex-music-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial Music Yandex Api PHP Wrapper

Install

composer require sonrac/yandex-music-api 

or add to your composer.json to require section

{
  "sonrac/yandex-music-api": "1.0"
}

Usages

  • Create instance
use sonrac\YandexMusic\Yandex;

$api = new Yandex('username', 'password');
  • Create instance with proxy. Proxy getting from gimmeProxy
use sonrac\YandexMusic\Yandex;

$api = new Yandex('username', 'password', true);

Api methods

  • Get account status
$accountStatus = $api->getAccountStatus();
  • Get feed
$feed = $api->getFeed();
  • Get genres
$genres = $api->getGenres();
  • Search
$searchResult = $api->search('text', 0);
  • Get user play lists
// For current user
$playLists = $api->getUserPlayLists();

// For some user with uid 1000
$playLists = $api->getUserPlayLists(1000);

* Get play list

```php
$playlist = $api->getPlayList(100);
  • Get play lists
$playlists = $api->getPlayLists([1003, 1010]);
  • Get play lists
$playlists = $api->getPlayLists([1003, 1010]);
  • Remove play list
$resultRemove = $api->removePlaylist(1003);
  • Rename play list
$resultRename = $api->renamePlaylist(1003, 'new playlist');
  • Add tracks to play list
$resultRename = $api->addTrackToPlaylist(1003, [1,2,3,4]);
  • Remove tracks from play list
$resultRename = $api->removeTracksFromPlaylist(1003, [1,2,3,4]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages