api

package
v0.0.0-...-69f4c14 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	Id     string  `json:"id"`
	Name   string  `json:"name"`
	PicURL string  `json:"pic_url"`
	Songs  []*Song `json:"songs"`
}

func (*Collection) String

func (c *Collection) String() string

type Provider

type Provider interface {
	SearchSongs(ctx context.Context, keyword string) ([]*Song, error)
	GetSong(ctx context.Context, songId string) (*Song, error)
	GetArtist(ctx context.Context, artistId string) (*Collection, error)
	GetAlbum(ctx context.Context, albumId string) (*Collection, error)
	GetPlaylist(ctx context.Context, playlistId string) (*Collection, error)
	SendRequest(req *ghttp.Request) (*ghttp.Response, error)
}

type Song

type Song struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Artist    string `json:"artist"`
	Album     string `json:"album"`
	PicURL    string `json:"pic_url,omitempty"`
	Lyric     string `json:"lyric,omitempty"`
	ListenURL string `json:"listen_url,omitempty"`
}

func (*Song) String

func (s *Song) String() string

Jump to

Keyboard shortcuts

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