Versions in this module Expand all Collapse all v0 v0.1.3 Jun 15, 2026 Changes in this version type Article + Cover string type Hot + ID string + Type string v0.1.2 Jun 14, 2026 Changes in this version type Article + Pinned bool type Comment + Avatar string + ParentNick string type Hot + Avatar string + Cover string type SearchHit + Collects int64 + Published string + Tags []string v0.1.1 Jun 14, 2026 Changes in this version + const Host + var ErrNotFound = errors.New("not found") + var ErrWalled = errors.New(...) + func BaseIdentity() kit.Identity + func Defaults(c *kit.Config) + func MapErr(err error) error + func ParseArticleID(in string) (string, error) + func ParseArticleRef(in string) (username, id string, err error) + func ParseUsername(in string) (string, error) + func Register(app *kit.App) type Article + Collects int64 + Content string + ID string + Likes int64 + Published string + Summary string + Tags []string + Updated string + Username string type Client + func (c *Client) ArticleByRef(ctx context.Context, username, id string) (Article, error) + func (c *Client) Comments(ctx context.Context, articleID string, limit int) ([]Comment, error) + func (c *Client) GetHTML(ctx context.Context, fullURL, referer string) ([]byte, error) + func (c *Client) GetJSON(ctx context.Context, fullURL, referer string) ([]byte, error) + func (c *Client) Posts(ctx context.Context, username string, limit int) ([]Article, error) + func (c *Client) Raw(ctx context.Context, url string) ([]byte, error) + func (c *Client) UserAgent() string + func (c *Client) UserByName(ctx context.Context, username string) (User, error) + type Comment struct + ArticleID string + Author string + ID string + Likes int64 + Nickname string + ParentID string + PostTime string + Region string + Text string + URL string + type Domain struct + func (Domain) Classify(input string) (uriType, id string, err error) + func (Domain) Info() kit.DomainInfo + func (Domain) Locate(uriType, id string) (string, error) + func (Domain) Register(app *kit.App) + type Hot struct + Author string + Comments int64 + Favors int64 + Rank int + Score int64 + Title string + URL string + Username string + Views int64 + type SearchHit struct + Author string + Comments int64 + ID string + Likes int64 + Summary string + Title string + Type string + URL string + Username string + Views int64 + type Session struct + Client *Client + Quiet bool + func (s *Session) Progressf(format string, args ...any) + type User struct + AskCount int64 + Avatar string + BlogCount int64 + CodeAge string + ColumnCount int64 + Company string + DownloadCount int64 + Fans int64 + Follows int64 + Gender string + Intro string + Level string + LoyalFans int64 + Nickname string + OriginalCount int64 + Rank int64 + Region string + Registered string + School string + TotalViews int64 + URL string + Username string + VIP bool v0.1.0 Jun 14, 2026 Changes in this version + const DefaultUserAgent + type Article struct + Author string + Collections string + Comments string + Date string + Rank int + Title string + URL string + Views string + type Client struct + func NewClient(cfg Config) *Client + func (c *Client) Hot(ctx context.Context, page, pageSize int) ([]HotArticle, error) + func (c *Client) Search(ctx context.Context, opts SearchOpts) ([]Article, int, error) + type Config struct + BaseURL string + HotBaseURL string + Rate time.Duration + Retries int + Timeout time.Duration + UserAgent string + func DefaultConfig() Config + type HotArticle struct + Author string + Comments string + Favorites string + Rank int + Score string + Title string + URL string + Views string + type SearchOpts struct + Page int + PageSize int + Query string + Sort int + Type string