beatmap

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMapsetNotFound  = errors.New("mapset not found")
	ErrBeatmapNotFound = errors.New("map not found")
)

Functions

This section is empty.

Types

type Chimu

type Chimu struct {
	Options Options
}

func (Chimu) GetMapset

func (c Chimu) GetMapset(id int) (Mapset, error)

func (Chimu) GetMapsetData

func (c Chimu) GetMapsetData(id int) (*http.Response, error)

func (Chimu) GetMapsetFromMap

func (c Chimu) GetMapsetFromMap(id int) (Mapset, error)

func (Chimu) Search

func (c Chimu) Search(query string) ([]Mapset, error)

func (*Chimu) SetMode

func (c *Chimu) SetMode(mode Mode)

func (*Chimu) SetStatus

func (c *Chimu) SetStatus(status Status)

type Kitsu

type Kitsu struct {
	Options Options
}

func (Kitsu) GetMapset

func (k Kitsu) GetMapset(id int) (Mapset, error)

func (Kitsu) GetMapsetData

func (k Kitsu) GetMapsetData(id int) (*http.Response, error)

func (Kitsu) GetMapsetFromMap

func (k Kitsu) GetMapsetFromMap(id int) (Mapset, error)

func (Kitsu) Search

func (k Kitsu) Search(query string) ([]Mapset, error)

func (*Kitsu) SetMode

func (k *Kitsu) SetMode(mode Mode)

func (*Kitsu) SetStatus

func (k *Kitsu) SetStatus(status Status)

type Mapset

type Mapset struct {
	SetID  int
	Artist string
	Title  string
	Mapper string `json:"Creator"`
	Status int    `json:"RankedStatus"`
}

type Mirror

type Mirror interface {
	GetMapset(id int) (Mapset, error)
	GetMapsetFromMap(id int) (Mapset, error)
	Search(query string) ([]Mapset, error)
	GetMapsetData(id int) (*http.Response, error)
	SetMode(mode Mode)
	SetStatus(status Status)
}

type Mode

type Mode int
const (
	ModeStandard Mode = iota
	ModeTaiko
	ModeCatch
	ModeMania
	ModeAny Mode = 727 // :)
)

func (Mode) String

func (m Mode) String() string

type Options

type Options struct {
	NoVideo    bool
	MaxResults int
	Mode       Mode
	Status     Status
}

type Status

type Status int
const (
	StatusGraveyard Status = iota - 2
	StatusWIP
	StatusPending
	StatusRanked
	StatusApproved
	StatusQualified
	StatusLoved
	StatusAny Status = 727
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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