xapi

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBookmarkAuditInventory added in v0.7.0

func NewBookmarkAuditInventory(opts BookmarkOptions) audit.UpstreamInventory

NewBookmarkAuditInventory constructs a read-only full X bookmark inventory. Browser cookie access is deferred until Inventory is explicitly invoked.

Types

type BookmarkOptions

type BookmarkOptions struct {
	Limit          int
	Force          bool
	PageSize       int
	MaxPages       int
	StalePageLimit int
	Browser        string
	Profile        string
	CT0            string
	AuthToken      string
	Timeout        time.Duration
	Logger         *slog.Logger
}

type BookmarkStats

type BookmarkStats struct {
	PagesFetched  int    `json:"pages_fetched"`
	Processed     int    `json:"processed"`
	Created       int    `json:"created"`
	Updated       int    `json:"updated"`
	Unchanged     int    `json:"unchanged"`
	Rendered      int    `json:"rendered"`
	StalePages    int    `json:"stale_pages"`
	StoppedReason string `json:"stopped_reason"`
}

func RunBookmarks

func RunBookmarks(ctx context.Context, cfg config.Config, st *store.Store, opts BookmarkOptions) (BookmarkStats, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) FetchBookmarksPage

func (c *Client) FetchBookmarksPage(ctx context.Context, cursor string, count int) (bookmarkPage, error)

func (*Client) FetchPost

func (c *Client) FetchPost(ctx context.Context, tweetID string) (model.XHydration, error)

type Options

type Options struct {
	Limit        int
	Force        bool
	QuoteOnly    bool
	Concurrency  int
	Browser      string
	Profile      string
	CT0          string
	AuthToken    string
	Timeout      time.Duration
	MediaTimeout time.Duration
	Logger       *slog.Logger
}

type Stats

type Stats struct {
	Candidates      int `json:"candidates"`
	Requested       int `json:"requested"`
	Hydrated        int `json:"hydrated"`
	Missing         int `json:"missing"`
	APIErrors       int `json:"api_errors"`
	Rendered        int `json:"rendered"`
	Unchanged       int `json:"unchanged"`
	MediaCandidates int `json:"media_candidates"`
	MediaRequested  int `json:"media_requested"`
	MediaDownloaded int `json:"media_downloaded"`
	MediaGone       int `json:"media_gone"`
	MediaErrors     int `json:"media_errors"`
	MediaBlocked    int `json:"media_blocked"`
}

func Run

func Run(ctx context.Context, cfg config.Config, st *store.Store, opts Options) (Stats, error)

Jump to

Keyboard shortcuts

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