Documentation
¶
Overview ¶
Package verhist provides a client and utilities for working with the Chrome version history API.
See: https://developer.chrome.com/docs/web-platform/versionhistory/guide
Example ¶
package main
import (
"context"
"fmt"
"github.com/chromedp/verhist"
)
func main() {
userAgent, err := verhist.UserAgent(context.Background(), "linux", "stable")
if err != nil {
panic(err)
}
fmt.Println(userAgent != "")
}
Output: true
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseURL = "https://versionhistory.googleapis.com"
BaseURL is the base URL.
View Source
var DefaultTransport = http.DefaultTransport
DefaultTransport is the default transport.
Functions ¶
Types ¶
type Client ¶
type Client struct {
Transport http.RoundTripper
}
Client is a version history client.
type Option ¶
type Option func(*Client)
Option is a version history client option.
func WithLogf ¶
WithLogf is a version history client option to set a log handler for HTTP requests and responses.
func WithTransport ¶
func WithTransport(transport http.RoundTripper) Option
WithTransport is a version history client option to set the http transport.
type Version ¶
type Version struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
}
Version contains information about a chrome release.
type VersionsResponse ¶
type VersionsResponse struct {
Versions []Version `json:"versions,omitempty"`
NextPageToken string `json:"nextPageToken,omitempty"`
}
VersionsResponse wraps the versions API response.
Click to show internal directories.
Click to hide internal directories.