NeteaseCloudMusicApi
一个调用网易云音乐 API 的 node 模块
Start
npm install NeteaseCloudMusicApi
Usage
var api = require('NeteaseCloudMusicApi').api
api.search('年度之歌',function(data){
console.log(data)
})
or
import {api} from 'NeteaseCloudMusicApi'
api.search('年度之歌',data => {
console.log(data)
})
API
search
api.search(name:String,[callback:function,onlySong:Boolean default:true,limit:Number default:3, offset:Number default:0])
说明:onlySong默认为true,如果为false,则返回一个对象,包含songs和mvs,songs和mvs均为数组
lrc
api.lrc(id:Number,[callback:function,lv:Number default:-1])
song
api.song(id:Number,[callback:function])
getArtistAlbums
api.getArtistAlbums(id:Number,[callback:function,limit:Number default:3, offset:Number default:0])
getAlbums
api.getAlbums(id:Number,[callback:function])
getPlaylists
api.Playlists(id:Number,[callback:function])
License
The MIT License (MIT)