项目作者: song940

项目描述 :
Netease Music SDK in Node.js
高级语言: JavaScript
项目地址: git://github.com/song940/163-music.git
创建时间: 2018-08-28T12:48:10Z
项目社区:https://github.com/song940/163-music

开源协议:MIT License

下载


163-music

Netease Music SDK in Node.js

163-music
Build Status

Installation

  1. $ npm install 163-music

Example

  1. const NeteaseMusic = require('163-music');
  2. const nm = new NeteaseMusic({
  3. cookie: '__Your_Cookies__'
  4. })
  5. nm.search('Love Song').then(({ result }) => {
  6. const { songs } = result;
  7. songs.forEach(song => {
  8. console.log(`search(#${song.id}):`, song.name);
  9. });
  10. })
  11. nm.playlist('751387161').then(data => {
  12. console.log('歌单', data)
  13. })
  14. nm.picture('19124905253588326', 400).then(data => {
  15. console.log('图片地址', data)
  16. })
  17. nm.artist('4130').then(data => {
  18. console.log('艺术家', data)
  19. })
  20. nm.album('35327877').then(data => {
  21. console.log('歌单', data)
  22. })
  23. nm.lyric('479403027').then(data => {
  24. console.log('歌词', data)
  25. })
  26. nm.url('82360').then(({ data: resources }) => {
  27. resources.forEach(resource => {
  28. const { id, url } = resource;
  29. console.log(`song(#${id}):`, url);
  30. });
  31. })
  32. nm.song('479403027').then(data => {
  33. console.log('歌曲详情', data)
  34. })

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

MIT

This work is licensed under the MIT license.