Documentation ¶
Index ¶
- Constants
- func Encrypt(origData []byte) (params, encSecKey string, err error)
- func ExtractMP3List(songs []Song, savePath string) ([]*resource.MP3, error)
- func Parse(url string) (req common.MusicRequest, err error)
- type Album
- type AlbumParams
- type AlbumRequest
- type AlbumResponse
- type Artist
- type ArtistParams
- type ArtistRequest
- type ArtistResponse
- type DJParams
- type DJRequest
- type DJResponse
- type DjradioParams
- type DjradioProgram
- type DjradioRequest
- type DjradioResponse
- 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" SongUrlAPI = "https://music.163.com/weapi/song/enhance/player/url" SongAPI = "https://music.163.com/weapi/v3/song/detail" ArtistAPI = "https://music.163.com/weapi/v1/artist" AlbumAPI = "https://music.163.com/weapi/v1/album" PlaylistAPI = "https://music.163.com/weapi/v3/playlist/detail" DjradioAPI = "https://music.163.com/weapi/dj/program/byradio" DJAPI = "https://music.163.com/weapi/dj/program/detail" )
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 (s *AlbumRequest) Do() error
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 (r *ArtistRequest) Do() error
type ArtistResponse ¶
type DJRequest ¶
type DJRequest struct { Params DJParams Response DJResponse }
func NewDJRequest ¶
type DJResponse ¶
type DJResponse struct { Code int `json:"code"` Msg string `json:"msg"` Program *DjradioProgram `json:"program"` }
type DjradioParams ¶
type DjradioProgram ¶
type DjradioProgram struct { MainSong struct { Name string `json:"name"` ID int `json:"id"` } `json:"mainSong"` Dj struct { Nickname string `json:"nickname"` Signature string `json:"signature"` Brand string `json:"brand"` } `json:"dj"` BlurCoverURL string `json:"blurCoverUrl"` Name string `json:"name"` ID int64 `json:"id"` }
type DjradioRequest ¶
type DjradioRequest struct { Id int Params DjradioParams Response DjradioResponse }
func NewDjradioRequest ¶
func NewDjradioRequest(id int) *DjradioRequest
func (*DjradioRequest) Do ¶
func (s *DjradioRequest) Do() error
type DjradioResponse ¶
type DjradioResponse struct { Code int `json:"code"` Msg string `json:"msg"` Programs []*DjradioProgram `json:"programs"` }
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 (s *PlaylistRequest) Do() error
type PlaylistResponse ¶
type Song ¶
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
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.