Versions in this module Expand all Collapse all v0 v0.1.0 Jul 15, 2026 Changes in this version + var ErrAPI = errors.New("screenshotscout: API error") + var ErrConfiguration = errors.New("screenshotscout: configuration error") + var ErrResponseDecoding = errors.New("screenshotscout: response decoding error") + var ErrSerialization = errors.New("screenshotscout: serialization error") + var ErrTransport = errors.New("screenshotscout: transport error") + type APIError struct + ErrorCode *string + ErrorMessage *string + Errors []any + RawResponse RawResponse + ResponseBody any + StatusCode int + func (e *APIError) Error() string + func (e *APIError) Is(target error) bool + type BinaryCaptureResponse struct + Bytes []byte + CacheStatus *string + ScreenshotURL *string + ScreenshotURLExpiresAt *string + type CaptureColorScheme string + const CaptureColorSchemeAuto + const CaptureColorSchemeDark + const CaptureColorSchemeLight + type CaptureFormat string + const CaptureFormatGIF + const CaptureFormatJPEG + const CaptureFormatJPG + const CaptureFormatPDF + const CaptureFormatPNG + const CaptureFormatTIFF + const CaptureFormatWEBP + type CaptureHTTPMethod string + const CaptureHTTPMethodGET + const CaptureHTTPMethodPOST + type CaptureImageAnchor string + const CaptureImageAnchorBottom + const CaptureImageAnchorBottomLeft + const CaptureImageAnchorBottomRight + const CaptureImageAnchorCenter + const CaptureImageAnchorLeft + const CaptureImageAnchorRight + const CaptureImageAnchorTop + const CaptureImageAnchorTopLeft + const CaptureImageAnchorTopRight + type CaptureImageMode string + const CaptureImageModeFill + const CaptureImageModeFit + const CaptureImageModeStretch + type CaptureMediaType string + const CaptureMediaTypePrint + const CaptureMediaTypeScreen + type CaptureOptions struct + BlockAds *bool + BlockChatWidgets *bool + BlockCookieBanners *bool + BypassCSP *bool + Cache *bool + CacheKey *string + CacheTTL *int + ClickAllSelectors []string + ClickSelectors []string + ClipHeight *int + ClipWidth *int + ClipX *int + ClipY *int + ColorScheme *CaptureColorScheme + Cookies []string + Country *string + Delay *int + Device *string + DeviceHasTouch *bool + DeviceIsMobile *bool + DeviceScaleFactor *float64 + DeviceUserAgent *string + DeviceViewportHeight *int + DeviceViewportWidth *int + Format *CaptureFormat + FullPage *bool + FullPageMaxHeight *int + FullPagePreScroll *bool + FullPagePreScrollStep *int + FullPagePreScrollStepDelay *int + GeolocationAccuracy *float64 + GeolocationLatitude *float64 + GeolocationLongitude *float64 + Headers []string + HideSelectors []string + ImageAllowUpscale *bool + ImageAnchor *CaptureImageAnchor + ImageBackground *string + ImageHeight *int + ImageMode *CaptureImageMode + ImageQuality *int + ImageWidth *int + InjectCSS []string + InjectJS []string + MediaType *CaptureMediaType + NavigationTimeout *int + PDFLandscape *bool + PDFMargin *string + PDFMarginBottom *string + PDFMarginLeft *string + PDFMarginRight *string + PDFMarginTop *string + PDFPaperFormat *CapturePDFPaperFormat + PDFPrintBackground *bool + PDFScale *float64 + Proxy *string + ReducedMotion *bool + ResponseType *CaptureResponseType + Selector *string + StorageBucket *string + StorageEndpoint *string + StorageMode *CaptureStorageMode + StorageObjectKey *string + StorageRegion *string + Timeout *int + Timezone *string + WaitUntil *CaptureWaitUntil + type CapturePDFPaperFormat string + const CapturePDFPaperFormatA3 + const CapturePDFPaperFormatA4 + const CapturePDFPaperFormatContent + const CapturePDFPaperFormatLegal + const CapturePDFPaperFormatLetter + const CapturePDFPaperFormatTabloid + type CaptureResponse struct + Binary *BinaryCaptureResponse + JSON *JSONCaptureResponse + Kind CaptureResponseKind + RawResponse RawResponse + type CaptureResponseKind string + const CaptureResponseKindBinary + const CaptureResponseKindJSON + type CaptureResponseType string + const CaptureResponseTypeBinary + const CaptureResponseTypeJSON + type CaptureResult struct + AdditionalFields map[string]any + CacheStatus *string + ScreenshotURL *string + ScreenshotURLExpiresAt *string + type CaptureStorageMode string + const CaptureStorageModeExternal + const CaptureStorageModeManaged + type CaptureWaitUntil string + const CaptureWaitUntilDOMContentLoaded + const CaptureWaitUntilLoad + const CaptureWaitUntilNetworkIdle0 + const CaptureWaitUntilNetworkIdle2 + type Client struct + func NewClient(accessKey string, options *ClientOptions) (*Client, error) + func (client *Client) BuildCaptureURL(targetURL string, options *CaptureOptions) (string, error) + func (client *Client) Capture(ctx context.Context, targetURL string, options *CaptureOptions, ...) (*CaptureResponse, error) + type ClientOptions struct + HTTPClient *http.Client + SecretKey string + type ConfigurationError struct + Cause error + Message string + func (e *ConfigurationError) Error() string + func (e *ConfigurationError) Is(target error) bool + func (e *ConfigurationError) Unwrap() error + type JSONCaptureResponse struct + Result CaptureResult + type RawResponse struct + Body []byte + ContentType string + Headers http.Header + Status string + StatusCode int + type ResponseDecodingError struct + Cause error + Message string + RawResponse RawResponse + func (e *ResponseDecodingError) Error() string + func (e *ResponseDecodingError) Is(target error) bool + func (e *ResponseDecodingError) Unwrap() error + type SerializationError struct + Cause error + Message string + Option string + func (e *SerializationError) Error() string + func (e *SerializationError) Is(target error) bool + func (e *SerializationError) Unwrap() error + type TransportError struct + Cause error + Message string + func (e *TransportError) Error() string + func (e *TransportError) Is(target error) bool + func (e *TransportError) Unwrap() error v0.1.0-rc.1 Jul 15, 2026