Documentation ¶
Index ¶
- Constants
- func Encrypt(origData []byte) (params, encSecKey string, err error)
- type Album
- type AlbumParams
- type AlbumRequest
- type AlbumResponse
- type Artist
- type ArtistParams
- type ArtistRequest
- type ArtistResponse
- type LoginParams
- type LoginRequest
- type LoginResponse
- type Playlist
- type PlaylistParams
- type PlaylistRequest
- type PlaylistResponse
- type Song
- type SongParams
- type SongRequest
- type SongResponse
- type SongURL
- type SongURLParams
- type SongURLRequest
- type SongURLResponse
- type TrackId
Constants ¶
View Source
const ( WeAPI = "https://music.163.com/weapi" Login = WeAPI + "/login/cellphone" GetSongURL = WeAPI + "/song/enhance/player/url" GetSong = WeAPI + "/v3/song/detail" GetArtist = WeAPI + "/v1/artist" GetAlbum = WeAPI + "/v1/album" GetPlaylist = WeAPI + "/v3/playlist/detail" BatchSongsCount = 1000 )
View Source
const ( Base62 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" PresetKey = "0CoJUm6Qyw8W8jud" IV = "0102030405060708" DefaultRSAPublicKeyModulus = "" /* 256-byte string literal not displayed */ DefaultRSAPublicKeyExponent = 0x10001 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlbumParams ¶
type AlbumParams struct{}
type AlbumRequest ¶
type AlbumRequest struct { Id int Params AlbumParams Response AlbumResponse }
func NewAlbumRequest ¶
func NewAlbumRequest(id int) *AlbumRequest
func (*AlbumRequest) Do ¶
func (a *AlbumRequest) Do() error
func (*AlbumRequest) Login ¶
func (a *AlbumRequest) Login() error
func (*AlbumRequest) RequireLogin ¶
func (a *AlbumRequest) RequireLogin() bool
type AlbumResponse ¶
type AlbumResponse struct { SongResponse Album Album `json:"album"` }
type ArtistParams ¶
type ArtistParams struct{}
type ArtistRequest ¶
type ArtistRequest struct { Id int Params ArtistParams Response ArtistResponse }
func NewArtistRequest ¶
func NewArtistRequest(id int) *ArtistRequest
func (*ArtistRequest) Do ¶
func (a *ArtistRequest) Do() error
func (*ArtistRequest) Login ¶
func (a *ArtistRequest) Login() error
func (*ArtistRequest) RequireLogin ¶
func (a *ArtistRequest) RequireLogin() bool
type ArtistResponse ¶
type LoginParams ¶
type LoginRequest ¶
type LoginRequest struct { Params LoginParams Response LoginResponse }
func NewLoginRequest ¶
func NewLoginRequest(phone, password string) *LoginRequest
func (*LoginRequest) Do ¶
func (l *LoginRequest) Do() error
type LoginResponse ¶
type PlaylistParams ¶
type PlaylistParams struct {
Id int `json:"id"`
}
type PlaylistRequest ¶
type PlaylistRequest struct { Params PlaylistParams Response PlaylistResponse }
func NewPlaylistRequest ¶
func NewPlaylistRequest(id int) *PlaylistRequest
func (*PlaylistRequest) Do ¶
func (p *PlaylistRequest) Do() error
func (*PlaylistRequest) Login ¶
func (p *PlaylistRequest) Login() error
func (*PlaylistRequest) RequireLogin ¶
func (p *PlaylistRequest) RequireLogin() bool
type PlaylistResponse ¶
type SongParams ¶
type SongParams struct {
C string `json:"c"`
}
type SongRequest ¶
type SongRequest struct { Params SongParams Response SongResponse }
func NewSongRequest ¶
func NewSongRequest(ids ...int) *SongRequest
func (*SongRequest) Do ¶
func (s *SongRequest) Do() error
func (*SongRequest) Login ¶
func (s *SongRequest) Login() error
func (*SongRequest) RequireLogin ¶
func (s *SongRequest) RequireLogin() bool
type SongResponse ¶
type SongURLParams ¶
type SongURLRequest ¶
type SongURLRequest struct { Params SongURLParams Response SongURLResponse }
func NewSongURLRequest ¶
func NewSongURLRequest(ids ...int) *SongURLRequest
func (*SongURLRequest) Do ¶
func (s *SongURLRequest) Do() error
type SongURLResponse ¶
Click to show internal directories.
Click to hide internal directories.