Documentation ¶
Index ¶
- Variables
- func UnmarshalResponse(resp *types.Response, v any) error
- type Error
- type LeaguePlayer
- type LeagueRecord
- type NoUserError
- type RankRange
- type SearchError
- type Session
- func (s Session) GetLeagueLB(ctx context.Context, country string) ([]types.LeagueUser, error)
- func (s Session) GetLeagueLBGlobal(ctx context.Context) ([]types.LeagueUser, error)
- func (s Session) GetMatches(ctx context.Context, userID string) ([]LeagueRecord, error)
- func (s Session) GetUser(ctx context.Context, name string) (*types.FullUser, error)
- func (s Session) SearchUser(ctx context.Context, discordID uint64) (types.PartialUser, error)
- func (s Session) Send(ctx context.Context, path string) (*types.Response, error)
- type StatusError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAmbiguousRecord = errors.New("tetrio: record has no winner or loser")
View Source
var ErrNonMultiRecord = errors.New("tetrio: not a multiplayer record")
View Source
var Upstream = "https://ch.tetr.io/api"
Functions ¶
Types ¶
type LeaguePlayer ¶
type LeaguePlayer struct { User types.PartialUser Wins int Inputs int PiecesPlaced int Handling types.Handling Stats types.VersusStats RoundStats []types.VersusStats }
type LeagueRecord ¶
type LeagueRecord struct { ReplayID string TS time.Time IsForfeit bool Winner LeaguePlayer Loser LeaguePlayer }
func (*LeagueRecord) UnmarshalJSON ¶
func (g *LeagueRecord) UnmarshalJSON(data []byte) error
type NoUserError ¶
type NoUserError struct { UID string // contains filtered or unexported fields }
func (NoUserError) Error ¶
func (e NoUserError) Error() string
func (NoUserError) Unwrap ¶
func (e NoUserError) Unwrap() error
type RankRange ¶
type RankRange struct { Rank string Percentile float64 Top *types.LeagueUser Bottom *types.LeagueUser }
type SearchError ¶
type SearchError uint64
func (SearchError) Error ¶
func (e SearchError) Error() string
type Session ¶
type Session struct { ID string // contains filtered or unexported fields }
func (Session) GetLeagueLB ¶
func (Session) GetLeagueLBGlobal ¶
func (Session) GetMatches ¶
func (Session) SearchUser ¶
type StatusError ¶
func (StatusError) Error ¶
func (e StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.