msc

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(config DownloadConfig)

Download music

Types

type Artists

type Artists struct {
	// contains filtered or unexported fields
}

type DownloadConfig added in v0.0.5

type DownloadConfig struct {
	Name     string
	Platform Platform
}

type Platform added in v0.0.5

type Platform int

Platform the music service provider

const (
	NetEasyP Platform = 1
	KuWoP    Platform = 2
)

type Request

type Request interface {
	// Execute request get songs
	Execute() ([]Songs, int, error)
	// contains filtered or unexported methods
}

type Songs

type Songs struct {
	// the song Name
	Name string `json:"name"`
	// the song author
	Artists []Artists `json:"artists"`
	// the song download url
	DownloadUrl string `json:"downloadUrl"`
	// the song Size(unit is byte)
	Size int64 `json:"size"`
	// the song EncodeType
	// e.g: .mp3
	EncodeType string `json:"encodeType"`
}

func Collect added in v0.0.9

func Collect(mappers []SongsMapper) []Songs

Collect songs async call SongsMapper#mapper() converted to Songs

func (Songs) Prompt

func (s Songs) Prompt(i int) string

type SongsMapper added in v0.0.5

type SongsMapper interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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