Versions in this module Expand all Collapse all v2 v2.1.0 Nov 30, 2023 v2.0.1 Nov 24, 2023 v2.0.0 Nov 24, 2023 Changes in this version + var ErrAmbiguousRecord = errors.New("tetrio: record has no winner or loser") + var ErrNonMultiRecord = errors.New("tetrio: not a multiplayer record") + var Upstream = "https://ch.tetr.io/api" + func UnmarshalResponse(resp *types.Response, v any) error + type Error string + func (e Error) Error() string + type LeaguePlayer struct + Handling types.Handling + Inputs int + PiecesPlaced int + RoundStats []types.VersusStats + Stats types.VersusStats + User types.PartialUser + Wins int + type LeagueRecord struct + IsForfeit bool + Loser LeaguePlayer + ReplayID string + TS time.Time + Winner LeaguePlayer + func (g *LeagueRecord) UnmarshalJSON(data []byte) error + type NoUserError struct + UID string + func (e NoUserError) Error() string + func (e NoUserError) Unwrap() error + type RankRange struct + Bottom *types.LeagueUser + Percentile float64 + Rank string + Top *types.LeagueUser + func Cutoffs(lb []types.LeagueUser) ([]RankRange, error) + func (r RankRange) Includes(TR float64) bool + type SearchError uint64 + func (e SearchError) Error() string + type Session struct + ID string + func New() 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 struct + Code int + Content []byte + func (e StatusError) Error() string Other modules containing this package github.com/gkaply532/tetrio