structs

package
v0.0.0-...-87db3fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	Id      int64    `json:"id"`
	Name    string   `json:"name"`
	PicUrl  string   `json:"pic_url"`
	Artists []Artist `json:"artists"`
}

func NewAlbumFromAlbumJson

func NewAlbumFromAlbumJson(json []byte) (Album, error)

NewAlbumFromAlbumJson 从Album列表获取专辑信息

func NewAlbumFromJson

func NewAlbumFromJson(json []byte) (Album, error)

NewAlbumFromJson 获取歌曲列表的专辑信息

func (Album) ArtistName

func (a Album) ArtistName() string

type Artist

type Artist struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

func NewArtist

func NewArtist(json []byte) (Artist, error)

type DjCategory

type DjCategory struct {
	Id   int64
	Name string
}

func NewDjCategoryFromJson

func NewDjCategoryFromJson(json []byte) (DjCategory, error)

NewDjCategoryFromJson 初始化分类

type DjRadio

type DjRadio struct {
	Id     int64  `json:"id"`
	Name   string `json:"name"`
	PicUrl string `json:"pic_url"`
	Dj     User   `json:"dj"`
}

func NewDjRadioFromJson

func NewDjRadioFromJson(json []byte) (DjRadio, error)

NewDjRadioFromJson 从Json中初始化 DjRadio

type Playlist

type Playlist struct {
	Id   int64
	Name string
}

func NewPlaylistFromJson

func NewPlaylistFromJson(json []byte) (Playlist, error)

NewPlaylistFromJson 获取歌单信息

type Rank

type Rank struct {
	Id        int64  `json:"id"`
	Name      string `json:"name"`
	Frequency string `json:"updateFrequency"` // 更新频率
}

func NewRankFromJson

func NewRankFromJson(jsonBytes []byte) (Rank, error)

NewRankFromJson 获取排行榜信息

type Song

type Song struct {
	Id       int64         `json:"id"`
	Name     string        `json:"name"`
	Duration time.Duration `json:"duration"`
	Artists  []Artist      `json:"artists"`
	Album    `json:"album"`
}

func NewSongFromAlbumSongsJson

func NewSongFromAlbumSongsJson(json []byte) (Song, error)

NewSongFromAlbumSongsJson 从专辑获取数据

func NewSongFromArtistSongsJson

func NewSongFromArtistSongsJson(json []byte) (Song, error)

NewSongFromArtistSongsJson 从歌手获取数据

func NewSongFromCloudJson

func NewSongFromCloudJson(json []byte) (Song, error)

NewSongFromCloudJson 从DjRadio节目中获取数据

func NewSongFromDjRadioProgramJson

func NewSongFromDjRadioProgramJson(json []byte) (Song, error)

NewSongFromDjRadioProgramJson 从DjRadio节目中获取数据

func NewSongFromDjRankProgramJson

func NewSongFromDjRankProgramJson(json []byte) (Song, error)

NewSongFromDjRankProgramJson 从DjRadio节目中获取数据

func NewSongFromFmJson

func NewSongFromFmJson(json []byte) (Song, error)

NewSongFromFmJson 从私人FM获取数据

func NewSongFromIntelligenceJson

func NewSongFromIntelligenceJson(json []byte) (Song, error)

NewSongFromIntelligenceJson 心动模式获取数据

func NewSongFromShortNameSongsJson

func NewSongFromShortNameSongsJson(json []byte) (Song, error)

NewSongFromShortNameSongsJson 从歌单获取数据

func (Song) ArtistName

func (s Song) ArtistName() string

type User

type User struct {
	UserId           int64  `json:"user_id"`
	MyLikePlaylistID int64  `json:"my_like_playlist_id"`
	Nickname         string `json:"nickname"`
	AvatarUrl        string `json:"avatar_url"`
	AccountId        int64  `json:"account_id"`
}

func NewUserFromJson

func NewUserFromJson(json []byte) (User, error)

func NewUserFromLocalJson

func NewUserFromLocalJson(json []byte) (User, error)

func NewUserFromSearchResultJson

func NewUserFromSearchResultJson(json []byte) (User, error)

NewUserFromSearchResultJson 从搜索结果json中获取用户信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL