bestdori

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BandAllJson

type BandAllJson map[int]BandAllJsonItem

func (BandAllJson) Convert

func (p BandAllJson) Convert() (bandList BandNameMap)

type BandAllJsonItem

type BandAllJsonItem struct {
	BandName []*string `json:"bandName"`
}

type BandNameMap

type BandNameMap map[int]string

type BandoriPost

type BandoriPost struct {
	MusicTitle  []*string `json:"musicTitle"`
	BandID      int       `json:"bandId"`
	BgmFile     string    `json:"bgmFile"`
	JacketImage []string  `json:"jacketImage"`
	Description []*string `json:"Description"`
	PublishedAt []*string `json:"publishedAt"`
	Difficulty  map[int]struct {
		PlayLevel int `json:"playLevel"`
	} `json:"difficulty"`
}

func (*BandoriPost) AudioUrl

func (p *BandoriPost) AudioUrl(musicID int) string

func (*BandoriPost) Content

func (p *BandoriPost) Content() string

func (*BandoriPost) CoverUrl

func (p *BandoriPost) CoverUrl(musicID int) string

func (*BandoriPost) GetRegion

func (p *BandoriPost) GetRegion() string

func (*BandoriPost) Time

func (p *BandoriPost) Time() int64

func (*BandoriPost) Title

func (p *BandoriPost) Title() string

type BestdoriPost

type BestdoriPost struct {
	Result bool `json:"result"`
	Post   struct {
		CategoryName string `json:"categoryName"`
		CategoryId   string `json:"categoryId"`
		Title        string `json:"title"`
		Artists      string `json:"artists"`
		Diff         int    `json:"diff"`
		Level        int    `json:"level"`
		Time         int64  `json:"time"`
		Author       struct {
			Username string `json:"username"`
			Nickname string `json:"nickname"`
		} `json:"author"`
		Song struct {
			Type  string `json:"type"`
			Audio string `json:"audio"`
			Cover string `json:"cover"`
			ID    int    `json:"id"`
		}
		Chart   V2Chart `json:"chart"`
		Content []struct {
			Data string `json:"data"`
			Type string `json:"type"`
		} `json:"content"`
	} `json:"post"`
}

func (*BestdoriPost) GetArtists

func (p *BestdoriPost) GetArtists() string

func (*BestdoriPost) GetContent

func (p *BestdoriPost) GetContent() (content string)

func (*BestdoriPost) GetNickname

func (p *BestdoriPost) GetNickname() string

func (*BestdoriPost) GetTitle

func (p *BestdoriPost) GetTitle() string

func (*BestdoriPost) GetUsername

func (p *BestdoriPost) GetUsername() string

func (*BestdoriPost) IsChart

func (p *BestdoriPost) IsChart() bool

type LLSifAllJson

type LLSifAllJson map[int]LLSifAllJsonItem

type LLSifAllJsonItem

type LLSifAllJsonItem struct {
	LiveIconAsset string `json:"live_icon_asset"`
	SoundAsset    string `json:"sound_asset"`
}

func (LLSifAllJsonItem) AudioUrl

func (p LLSifAllJsonItem) AudioUrl() string

func (LLSifAllJsonItem) CoverUrl

func (p LLSifAllJsonItem) CoverUrl() string

type ListRequestBody

type ListRequestBody struct {
	Following    bool   `json:"following"`
	CategoryName string `json:"categoryName,omitempty"`
	CategoryId   string `json:"categoryId,p,omitempty"`
	Order        string `json:"order"`
	Limit        uint64 `json:"limit"`
	Offset       uint64 `json:"offset"`
	Username     string `json:"username,omitempty"`
}

type ListResponseBody

type ListResponseBody struct {
	Result bool   `json:"result"`
	Count  uint64 `json:"count"`
	Posts  []struct {
		CategoryName string `json:"categoryName,omitempty"`
		CategoryId   string `json:"categoryId,omitempty"`
		Id           int    `json:"id"`
	} `json:"posts"`
}

type OfficialPostAllJson

type OfficialPostAllJson map[int]interface{}

type V2Chart

type V2Chart []V2Note

func ChartCheck added in v1.0.3

func ChartCheck(chart V2Chart) (newChart V2Chart, err error)

ChartCheck 尝试检查并修复谱面,并将官谱转化为自制谱格式

func (V2Chart) Len

func (chart V2Chart) Len() int

func (V2Chart) Less

func (chart V2Chart) Less(i, j int) bool

func (V2Chart) Swap

func (chart V2Chart) Swap(i, j int)

type V2Connection

type V2Connection struct {
	Beat   *float64 `json:"beat,omitempty"`
	Lane   *float64 `json:"lane,omitempty"`
	Flick  bool     `json:"flick,omitempty"`
	Hidden bool     `json:"hidden,omitempty"`
}

type V2Note

type V2Note struct {
	Beat        *float64       `json:"beat,omitempty"`
	Lane        *float64       `json:"lane,omitempty"`
	Flick       bool           `json:"flick,omitempty"`
	Type        string         `json:"type"`
	BPM         float64        `json:"bpm,omitempty"`
	Connections []V2Connection `json:"connections,omitempty"`
	Direction   string         `json:"direction,omitempty"`
	Width       int            `json:"width,omitempty"`
}

func (*V2Note) GetBeat

func (note *V2Note) GetBeat() (value float64)

func (*V2Note) GetLane

func (note *V2Note) GetLane() (value float64)

Jump to

Keyboard shortcuts

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