Documentation ¶
Index ¶
- type API
- func (a *API) GetAlbum(ctx context.Context, albumId string) (*api.Collection, error)
- func (a *API) GetAlbumRaw(ctx context.Context, albumId string) (*AlbumResponse, error)
- func (a *API) GetArtist(ctx context.Context, singerId string, page int, pageSize int) (*api.Collection, error)
- func (a *API) GetArtistInfoRaw(ctx context.Context, singerId string) (*ArtistInfoResponse, error)
- func (a *API) GetArtistSongsRaw(ctx context.Context, singerId string, page int, pageSize int) (*ArtistSongsResponse, error)
- func (a *API) GetPlayLists(ctx context.Context, page int, pageSize int) ([]*api.Playlist, error)
- func (a *API) GetPlaylist(ctx context.Context, playlistId string) (*api.Collection, error)
- func (a *API) GetPlaylistRaw(ctx context.Context, playlistId string) (*PlaylistResponse, error)
- func (a *API) GetRank(ctx context.Context) ([]*api.Rank, error)
- func (a *API) GetRankList(ctx context.Context, bangId string, page int, pageSize int) ([]*api.Song, error)
- func (a *API) GetSong(ctx context.Context, id string) (*api.Song, error)
- func (a *API) GetSongId(ctx context.Context, copyrightId string) (string, error)
- func (a *API) GetSongIdRaw(ctx context.Context, copyrightId string) (*SongIdResponse, error)
- func (a *API) GetSongLyric(ctx context.Context, copyrightId string) (string, error)
- func (a *API) GetSongLyricRaw(ctx context.Context, copyrightId string) (*SongLyricResponse, error)
- func (a *API) GetSongPic(ctx context.Context, songId string) (string, error)
- func (a *API) GetSongPicRaw(ctx context.Context, songId string) (*SongPicResponse, error)
- func (a *API) GetSongRaw(ctx context.Context, songId string) (*SongResponse, error)
- func (a *API) GetSongURL(ctx context.Context, contentId, resourceType string) (string, error)
- func (a *API) GetSongURLRaw(ctx context.Context, contentId, resourceType string) (*SongURLResponse, error)
- func (a *API) SearchSongs(ctx context.Context, keyword string, page int, pageSize int) ([]*api.Song, error)
- func (a *API) SearchSongsRawV1(ctx context.Context, keyword string, page int, pageSize int) (*SearchSongsResponse, error)
- func (a *API) SearchSongsRawV2(ctx context.Context, keyword string, page int, pageSize int) (ghttp.H, error)
- func (a *API) SendRequest(req *ghttp.Request) (*ghttp.Response, error)
- type Album
- type AlbumResponse
- type ArtistInfo
- type ArtistInfoResponse
- type ArtistSongsResponse
- type CommonResponse
- type ImgItem
- type Playlist
- type PlaylistResponse
- type SearchSongsResponse
- type SearchSongsResult
- type Song
- type SongIdResponse
- type SongLyricResponse
- type SongPicResponse
- type SongResponse
- type SongURLResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
func (*API) GetAlbumRaw ¶
获取专辑
func (*API) GetArtistInfoRaw ¶
获取歌手信息
func (*API) GetArtistSongsRaw ¶
func (a *API) GetArtistSongsRaw(ctx context.Context, singerId string, page int, pageSize int) (*ArtistSongsResponse, error)
获取歌手歌曲,page: 页码;pageSize: 每页数量
func (*API) GetPlayLists ¶
func (*API) GetPlaylist ¶
func (*API) GetPlaylistRaw ¶
获取歌单
func (*API) GetRankList ¶
func (*API) GetSongIdRaw ¶
根据版权id获取歌曲id
func (*API) GetSongLyric ¶
func (*API) GetSongLyricRaw ¶
获取歌词
func (*API) GetSongPic ¶
func (*API) GetSongPicRaw ¶
获取歌曲专辑封面
func (*API) GetSongRaw ¶
获取歌曲详情
func (*API) GetSongURL ¶
func (*API) GetSongURLRaw ¶
func (a *API) GetSongURLRaw(ctx context.Context, contentId, resourceType string) (*SongURLResponse, error)
获取歌曲播放地址
func (*API) SearchSongs ¶
func (*API) SearchSongsRawV1 ¶
func (a *API) SearchSongsRawV1(ctx context.Context, keyword string, page int, pageSize int) (*SearchSongsResponse, error)
搜索歌曲
type AlbumResponse ¶
type AlbumResponse struct { CommonResponse Resource []Album `json:"resource"` }
func (*AlbumResponse) String ¶
func (a *AlbumResponse) String() string
type ArtistInfo ¶
type ArtistInfoResponse ¶
type ArtistInfoResponse struct { CommonResponse Resource []ArtistInfo `json:"resource"` }
func (*ArtistInfoResponse) String ¶
func (a *ArtistInfoResponse) String() string
type ArtistSongsResponse ¶
type ArtistSongsResponse struct { CommonResponse Data struct { ContentItemList []struct { ItemList []struct { Song Song `json:"song"` } `json:"itemList"` } `json:"contentItemList"` } `json:"data"` }
func (*ArtistSongsResponse) String ¶
func (a *ArtistSongsResponse) String() string
type CommonResponse ¶
type PlaylistResponse ¶
type PlaylistResponse struct { CommonResponse Resource []Playlist `json:"resource"` }
func (*PlaylistResponse) String ¶
func (p *PlaylistResponse) String() string
type SearchSongsResponse ¶
type SearchSongsResponse struct { CommonResponse SongResultData struct { TotalCount string `json:"totalCount"` Result []*SearchSongsResult `json:"result"` } `json:"songResultData"` }
func (*SearchSongsResponse) String ¶
func (s *SearchSongsResponse) String() string
type SearchSongsResult ¶
type SearchSongsResult struct { ResourceType string `json:"resourceType"` ContentId string `json:"contentId"` CopyrightId string `json:"copyrightId"` Id string `json:"id"` Name string `json:"name"` Singers []struct { Id string `json:"id"` Name string `json:"name"` } `json:"singers"` Albums []struct { Id string `json:"id"` Name string `json:"name"` } `json:"albums"` }
type Song ¶
type Song struct { ResourceType string `json:"resourceType"` ContentId string `json:"contentId"` CopyrightId string `json:"copyrightId"` SongId string `json:"songId"` SongName string `json:"songName"` SingerId string `json:"singerId"` Singer string `json:"singer"` AlbumId string `json:"albumId"` Album string `json:"album"` AlbumImgs []ImgItem `json:"albumImgs"` LrcURL string `json:"lrcUrl"` PicURL string `json:"-"` Lyric string `json:"-"` URL string `json:"-"` }
type SongIdResponse ¶
type SongIdResponse struct { ReturnCode string `json:"returnCode"` Msg string `json:"msg,omitempty"` Items []struct { SongId string `json:"songId"` } `json:"items"` }
func (*SongIdResponse) String ¶
func (s *SongIdResponse) String() string
type SongLyricResponse ¶
type SongLyricResponse struct { ReturnCode string `json:"returnCode"` Msg string `json:"msg"` Lyric string `json:"lyric"` }
func (*SongLyricResponse) String ¶
func (s *SongLyricResponse) String() string
type SongPicResponse ¶
type SongPicResponse struct { ReturnCode string `json:"returnCode"` Msg string `json:"msg"` SmallPic string `json:"smallPic"` MediumPic string `json:"mediumPic"` LargePic string `json:"largePic"` }
func (*SongPicResponse) String ¶
func (s *SongPicResponse) String() string
type SongResponse ¶
type SongResponse struct { CommonResponse Resource []*Song `json:"resource"` }
func (*SongResponse) String ¶
func (s *SongResponse) String() string
type SongURLResponse ¶
type SongURLResponse struct { CommonResponse Data struct { URL string `json:"url"` } `json:"data"` }
func (*SongURLResponse) String ¶
func (s *SongURLResponse) String() string
Click to show internal directories.
Click to hide internal directories.