Documentation ¶
Index ¶
Constants ¶
View Source
const ( NEBase = "http://music.163.com" NEApiBase = NEBase + "/api" NESongInfo = NEApiBase + "/song/detail?ids=[%d]" NESongCDN = "http://m%d.music.126.net/%s/%d.mp3" NESongURL = "http://music.163.com/#/song?id=%d" NESearchApiParams = "s=%s&limit=20&type=1&offset=0" NERetOK = 200 DEBUG = 1 )
NEBase Netease basic URL NEApiBase Netease Api basic URL
Variables ¶
This section is empty.
Functions ¶
func InitHTTPClient ¶
func InitHTTPClient()
Types ¶
type NeteaseAlbumSubRet ¶
type NeteaseAlbumSubRet struct { Name string `json:"name"` ID int64 `json:"id"` PicURL string `json:"picUrl"` }
NeteaseAlbumSubRet defines a album return structure
type NeteaseArtistSubRet ¶
type NeteaseArtistSubRet struct { Name string `json:"name"` ID int64 `json:"id"` PicURL string `json:"picUrl"` Songnum int64 `json:"musicSize"` Albumnum int64 `json:"albumSize"` }
NeteaseArtistSubRet defines a artist structure for main ret
type NeteaseMusicInfo ¶
NeteaseMusicInfo defines an mp3 file
type NeteaseSearchRet ¶
type NeteaseSearchRet struct { Result NeteaseSearchSongResSubRet `json:"result"` Code uint `json:"code"` }
NeteaseSearchRet a structure to receive the search result json
type NeteaseSearchSongResSubRet ¶
type NeteaseSearchSongResSubRet struct { SongNum uint `json:"songCount"` Songs []NeteaseSongSubRet `json:"songs"` }
type NeteaseSongListRet ¶
type NeteaseSongListRet struct { Songs []NeteaseSongSubRet `json:"songs"` Code uint `json:"code"` }
NeteaseSongListRet Main return result for json, only Code 200 is OK
type NeteaseSongSubRet ¶
type NeteaseSongSubRet struct { Stared bool `json:"starred"` Mp3URL string `json:"mp3Url"` Name string `json:"name"` ID int64 `json:"id"` Duration int64 `json:"duration"` Artists []NeteaseArtistSubRet `json:"artists"` HMusic NeteaseMusicInfo `json:"hMusic"` MMusic NeteaseMusicInfo `json:"mMusic"` LMusic NeteaseMusicInfo `json:"lMusic"` Album NeteaseAlbumSubRet `json:"album"` }
NeteaseSongSubRet defines a single song return structure
Click to show internal directories.
Click to hide internal directories.