egg-netease-cloud-music
v1.0.0
Published
NeteaseCloudMusicApi for egg
Downloads
2
Readme
egg-netease-cloud-music
egg for neteaseCloudMusicApi
Install
build a server with neteaseCloudMusicApi
install this plugin
$ npm i egg-netease-cloud-music --save
Usage
// {app_root}/config/plugin.js
exports.neteaseCloudMusic = {
enable: true,
package: 'egg-netease-cloud-music',
};
Configuration
// {app_root}/config/config.default.js
exports.neteaseCloudMusic = {
};
see config/config.default.js for more detail.
Example
// search music by keyword
const musicList = await this.app.neteaseCloudMusic.searchMusic('天使的翅膀')
// get music url by netease id
const musicUrl = await this.app.neteaseCloudMusic.getMusicUrl(27747330)
// download music to local location
const musicDownload = await this.app.neteaseCloudMusic.downloadMusic(27747330, '/test.mp3')
Questions & Suggestions
Please open an issue here.