sonrac/yandex-music-api
Composer 安装命令:
composer require sonrac/yandex-music-api
包简介
Yandex Music Api wrapper
关键字:
README 文档
README
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]);
统计信息
- 总下载量: 68
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-06-02