Versions in this module Expand all Collapse all v0 v0.1.0 Oct 29, 2026 Changes in this version + const StatusAbandoned + const StatusBroken + const StatusOK + const StatusObsolete + const StatusOptional + const StatusUnofficial + var ErrEmptyLog = errors.New("the log is empty") + var ErrLogRejected = errors.New("smapi.io did not accept the log") + var ErrLogTooLarge = errors.New("the log is too large to upload") + var ErrNoLogLink = errors.New("smapi.io did not return a log link") + type Client struct + CompatURL string + HTTP *http.Client + IndexURL string + LogURL string + PageBase string + UpdatesURL string + func (c *Client) CompatList(ctx context.Context) (CompatIndex, error) + func (c *Client) Index(ctx context.Context) (map[string][]Ref, error) + func (c *Client) Page(ctx context.Context, id int) (Page, error) + func (c *Client) Updates(ctx context.Context, req UpdateRequest) ([]UpdateResult, error) + func (c *Client) UploadLog(ctx context.Context, text string, maxBytes int) (string, error) + type CompatEntry struct + BrokeIn string + Replacement string + Status string + Summary string + UnofficialURL string + UnofficialVersion string + func (e CompatEntry) BrokenOn(gameVersion string) bool + type CompatIndex struct + ByID map[string]CompatEntry + ByNexus map[int]CompatEntry + GitHubToID map[string]string + NexusToID map[int]string + func (idx CompatIndex) Lookup(uniqueID string, nexusID int) (CompatEntry, bool) + type Dependency struct + MinimumVersion string + Required bool + UniqueID string + type File struct + FileName string + ID int64 + Mods []Mod + SizeInBytes int64 + Type string + Version string + type InstalledMod struct + ID string + UpdateKeys []string + Version string + type Mod struct + Dependencies []Dependency + Name string + UniqueID string + UpdateKeys []string + Version string + type Page struct + Author string + Downloads []File + ID int + Name string + PageURL string + Version string + type Ref struct + ID int + Site string + type Update struct + Source string + URL string + Version string + type UpdateRequest struct + APIVersion string + GameVersion string + Mods []InstalledMod + Platform string + type UpdateResult struct + BrokeIn string + Compatibility string + CompatibilitySummary string + GitHubRepo string + ID string + Known bool + Suggested *Update + Unofficial *Update