Documentation ¶
Index ¶
- type APIClient
- type APIResp
- type ClientExtension
- type EAPIClientImpl
- type LinuxClientImpl
- type NetEase
- func (n *NetEase) Album(id uint64) (*types.AlbumResp, error)
- func (n *NetEase) Artist(id, limit uint64) (*types.ArtistResp, error)
- func (n *NetEase) Lyric(id uint64) (*types.LyricResp, error)
- func (n *NetEase) Playlist(id uint64) (*types.PlayListResp, error)
- func (n *NetEase) Request(ext ClientExtension, action, path, data string) ([]byte, error)
- func (n *NetEase) Search(keyword string, category search.Type, offset, limit uint) (*types.SearchResp, error)
- func (n *NetEase) SetRandomIP()
- func (n *NetEase) Song(ids ...uint64) (*types.SongResp, error)
- func (n *NetEase) SongURL(bitrate int, ids ...uint64) (*types.SongURLResp, error)
- func (n *NetEase) SongURLv1(level, encodeType string, ids ...uint64) (*types.SongURLResp, error)
- func (n *NetEase) UseEAPIClient()
- func (n *NetEase) UseLinuxClient()
- func (n *NetEase) UseWEAPIClient()
- type WEAPIClientImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientExtension ¶
type EAPIClientImpl ¶
type EAPIClientImpl struct{}
func (*EAPIClientImpl) ExtendRequest ¶
func (c *EAPIClientImpl) ExtendRequest(n *NetEase, req *http.Request)
type LinuxClientImpl ¶
type LinuxClientImpl struct{}
func (*LinuxClientImpl) ExtendRequest ¶
func (c *LinuxClientImpl) ExtendRequest(n *NetEase, req *http.Request)
type NetEase ¶
type NetEase struct { BaseURL string TunnelURL string Cookie string FakeIP string UserAgent string Client APIClient }
NetEase struct is useful.
func (*NetEase) Artist ¶
func (n *NetEase) Artist(id, limit uint64) (*types.ArtistResp, error)
Artist can get information about a specific artist. limit: the number of "hot" songs to return. a reasonable limit would be 50.
func (*NetEase) Request ¶
func (n *NetEase) Request(ext ClientExtension, action, path, data string) ([]byte, error)
func (*NetEase) Search ¶
func (n *NetEase) Search(keyword string, category search.Type, offset, limit uint) (*types.SearchResp, error)
Search for a song. keyword: the search phrase category: search category offset: the page to search (starting from 0) limit: the number of items per page
func (*NetEase) SetRandomIP ¶
func (n *NetEase) SetRandomIP()
func (*NetEase) SongURL ¶
SongURL requests for the MP3 url of a list of song ids. bitrate can be one of the following: 128000, 192000, 320000. Other undocumented bitrate *might* be available (999000 = flac format?).
func (*NetEase) SongURLv1 ¶
SongURL requests for the url of a list of song ids. level: "standard" (128k?), "exhigh" (320k?) encodeType: "aac", "mp3"
func (*NetEase) UseEAPIClient ¶
func (n *NetEase) UseEAPIClient()
func (*NetEase) UseLinuxClient ¶
func (n *NetEase) UseLinuxClient()
func (*NetEase) UseWEAPIClient ¶
func (n *NetEase) UseWEAPIClient()
type WEAPIClientImpl ¶
type WEAPIClientImpl struct{}
func (*WEAPIClientImpl) ExtendRequest ¶
func (c *WEAPIClientImpl) ExtendRequest(n *NetEase, req *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.