url2png

package module
v0.0.0-...-9c33bc0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

README

url2png

Documentation is here.

License

3-clause BSD. A copy is included with the source.

Documentation

Overview

Package url2png uses the url2png service to take screenshots of websites.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Key    string
	Secret string
	Base   *http.Client
}

Client holds the API key and secret for a given url2png account.

func (Client) Screenshot

func (c Client) Screenshot(website string, options *Options) (io.ReadCloser, error)

Screenshot submits a request to the url2png service, returning a stream of the PNG data, or an error.

func (Client) ScreenshotWithContext

func (c Client) ScreenshotWithContext(ctx context.Context, website string, options *Options) (io.ReadCloser, error)

ScreenshotWithContext submits a request with context to the url2png service, returning a stream of the PNG data, or an error.

type Options

type Options struct {
	ThumbnailMaxWidth uint
	Viewport          [2]int
	Fullpage          bool
	Unique            string
	CustomCSSURL      string
	SayCheese         bool
	TTL               time.Duration
	AcceptLanguages   string
	UserAgent         string
}

Options represents the options that can be provided to the url2png screenshot API.

Jump to

Keyboard shortcuts

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