Skip to content

一个简易且实验性的适用于网易云音乐的 GO API。

License

Notifications You must be signed in to change notification settings

jixunmoe-go/netease

Repository files navigation

网易云音乐 API

License: MIT Go Version GoDoc

一个很简单的 POC package。

使用

直接引入即可 (应该);如果需要手动安装,执行 go get -u github.com/jixunmoe-go/netease

package main

import (
	"fmt"
	"github.com/jixunmoe-go/netease"
)

func main() {
	api := netease.New()
	resp, err := api.Song(37460604)
	if err == nil && resp != nil {
		song := resp.Songs[0]
		fmt.Printf("Song: %s (album: %s), singer: %s\n", song.Name, song.Album.Name, song.Artists[0].Name)
	} else {
		fmt.Printf("Could not fetch song info: %s", err)
	}
}

在 repl.it 试试

致谢

本项目参考了以下仓库里的代码与内容:

About

一个简易且实验性的适用于网易云音乐的 GO API。

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages