Documentation ¶
Index ¶
- Constants
- 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, artistId string, page int, pageSize int) (*api.Collection, error)
- func (a *API) GetArtistInfoRaw(ctx context.Context, artistId string) (*ArtistInfoResponse, error)
- func (a *API) GetArtistSongsRaw(ctx context.Context, artistId 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) GetPlaylistDetailRaw(ctx context.Context, playlistId string, page int, pageSize int) (*PlaylistDetailResponse, error)
- func (a *API) GetPlaylistSongsRaw(ctx context.Context, playlistId string, page int, pageSize int) (*PlaylistSongsResponse, 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, songId string) (*api.Song, error)
- func (a *API) GetSongDetailRaw(ctx context.Context, songId string) (*SongDetailResponse, error)
- func (a *API) GetSongLyric(ctx context.Context, songId string) (string, error)
- func (a *API) GetSongLyricRaw(ctx context.Context, songId string) (*SongLyricResponse, error)
- func (a *API) GetSongsRaw(ctx context.Context, songIds ...string) (*SongsResponse, error)
- func (a *API) LoginRaw(ctx context.Context, account string, password string) (*LoginResponse, error)
- func (a *API) SearchSongs(ctx context.Context, keyword string, page int, pageSize int) ([]*api.Song, error)
- func (a *API) SearchSongsRaw(ctx context.Context, keyword string, page int, pageSize int) (*SearchSongsResponse, error)
- func (a *API) SendRequest(req *ghttp.Request) (*ghttp.Response, error)
- type Album
- type AlbumResponse
- type Artist
- type ArtistInfoResponse
- type ArtistSongsResponse
- type CommonResponse
- type ListenFile
- type LoginResponse
- type PagingVO
- type PlaylistDetailResponse
- type PlaylistSongsResponse
- type SearchSongsResponse
- type Song
- type SongDetailResponse
- type SongLyricResponse
- type SongsResponse
Constants ¶
View Source
const (
APPKey = "23649156"
)
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, artistId string, page int, pageSize int) (*ArtistSongsResponse, error)
获取歌手歌曲
func (*API) GetPlayLists ¶
func (*API) GetPlaylist ¶
func (*API) GetPlaylistDetailRaw ¶
func (a *API) GetPlaylistDetailRaw(ctx context.Context, playlistId string, page int, pageSize int) (*PlaylistDetailResponse, error)
获取歌单详情,包含歌单信息跟歌曲
func (*API) GetPlaylistSongsRaw ¶
func (a *API) GetPlaylistSongsRaw(ctx context.Context, playlistId string, page int, pageSize int) (*PlaylistSongsResponse, error)
获取歌单歌曲,不包含歌单信息
func (*API) GetRankList ¶
func (*API) GetSongDetailRaw ¶
获取歌曲详情
func (*API) GetSongLyric ¶
func (*API) GetSongLyricRaw ¶
获取歌词
func (*API) GetSongsRaw ¶
批量获取歌曲,上限200首
func (*API) LoginRaw ¶
func (a *API) LoginRaw(ctx context.Context, account string, password string) (*LoginResponse, error)
登录接口,account 可为邮箱/手机号码
func (*API) SearchSongs ¶
func (*API) SearchSongsRaw ¶
func (a *API) SearchSongsRaw(ctx context.Context, keyword string, page int, pageSize int) (*SearchSongsResponse, error)
SearchSongsRaw 搜索歌曲
type AlbumResponse ¶
type AlbumResponse struct { CommonResponse Data struct { Data struct { AlbumDetail struct { Album Songs []*Song `json:"songs"` } `json:"albumDetail"` } `json:"data"` } `json:"data"` }
func (*AlbumResponse) String ¶
func (a *AlbumResponse) String() string
type ArtistInfoResponse ¶
type ArtistInfoResponse struct { CommonResponse Data struct { Data struct { ArtistDetailVO Artist `json:"artistDetailVO"` } `json:"data"` } `json:"data"` }
func (*ArtistInfoResponse) String ¶
func (a *ArtistInfoResponse) String() string
type ArtistSongsResponse ¶
type ArtistSongsResponse struct { CommonResponse Data struct { Data struct { PagingVO PagingVO `json:"pagingVO"` Songs []*Song `json:"songs"` } `json:"data"` } `json:"data"` }
func (*ArtistSongsResponse) String ¶
func (a *ArtistSongsResponse) String() string
type CommonResponse ¶
type ListenFile ¶
type LoginResponse ¶
type LoginResponse struct { CommonResponse Data struct { Data struct { AccessToken string `json:"accessToken"` Expires string `json:"expires"` NickName string `json:"nickName"` RefreshExpires string `json:"refreshExpires"` RefreshToken string `json:"refreshToken"` UserId string `json:"userId"` } `json:"data"` } `json:"data"` }
func (*LoginResponse) String ¶
func (l *LoginResponse) String() string
type PlaylistDetailResponse ¶
type PlaylistDetailResponse struct { CommonResponse Data struct { Data struct { CollectDetail struct { ListId string `json:"listId"` CollectName string `json:"collectName"` CollectLogo string `json:"collectLogo"` SongCount string `json:"songCount"` AllSongs []string `json:"allSongs"` Songs []*Song `json:"songs"` PagingVO PagingVO `json:"pagingVO"` } `json:"collectDetail"` } `json:"data"` } `json:"data"` }
func (*PlaylistDetailResponse) String ¶
func (p *PlaylistDetailResponse) String() string
type PlaylistSongsResponse ¶
type PlaylistSongsResponse struct { CommonResponse Data struct { Data struct { Songs []*Song `json:"songs"` PagingVO PagingVO `json:"pagingVO"` } `json:"data"` } `json:"data"` }
func (*PlaylistSongsResponse) String ¶
func (p *PlaylistSongsResponse) String() string
type SearchSongsResponse ¶
type SearchSongsResponse struct { CommonResponse Data struct { Data struct { PagingVO PagingVO `json:"pagingVO"` Songs []*Song `json:"songs"` } `json:"data"` } `json:"data"` }
func (*SearchSongsResponse) String ¶
func (s *SearchSongsResponse) String() string
type Song ¶
type Song struct { Album SongId string `json:"songId"` SongStringId string `json:"songStringId"` SongName string `json:"songName"` Singers string `json:"singers"` SingerVOs []Artist `json:"singerVOs"` ListenFile string `json:"listenFile,omitempty"` ListenFiles []ListenFile `json:"listenFiles"` Lyric string `json:"-"` }
type SongDetailResponse ¶
type SongDetailResponse struct { CommonResponse Data struct { Data struct { SongDetail Song `json:"songDetail"` } `json:"data"` } `json:"data"` }
func (*SongDetailResponse) String ¶
func (s *SongDetailResponse) String() string
type SongLyricResponse ¶
type SongLyricResponse struct { CommonResponse Data struct { Data struct { Lyrics []struct { Content string `json:"content"` FlagOfficial string `json:"flagOfficial"` LyricURL string `json:"lyricUrl"` Type string `json:"type"` } `json:"lyrics"` } `json:"data"` } `json:"data"` }
type SongsResponse ¶
type SongsResponse struct { CommonResponse Data struct { Data struct { Songs []*Song `json:"songs"` } `json:"data"` } `json:"data"` }
func (*SongsResponse) String ¶
func (s *SongsResponse) String() string
Click to show internal directories.
Click to hide internal directories.