Documentation
¶
Index ¶
Constants ¶
View Source
const API_URL = "https://customsearch.googleapis.com/customsearch/v1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client uses Google's custom search REST API See https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list
type Error ¶
type Error struct {
Error ErrorError `json:"error"`
}
type ErrorElement ¶
type ErrorError ¶
type ErrorError struct {
Code int64 `json:"code"`
Message string `json:"message"`
Errors []ErrorElement `json:"errors"`
Status string `json:"status"`
}
func (ErrorError) Error ¶
func (e ErrorError) Error() string
type Item ¶
type Item struct {
//Kind string `json:"kind"`
Title string `json:"title"`
HTMLTitle string `json:"htmlTitle"`
Link string `json:"link"`
DisplayLink string `json:"displayLink"`
Snippet string `json:"snippet"`
HTMLSnippet string `json:"htmlSnippet"`
//CacheID string `json:"cacheId"`
FormattedURL string `json:"formattedUrl"`
HTMLFormattedURL string `json:"htmlFormattedUrl"`
}
type Queries ¶
type Queries struct {
Request []RequestInfo `json:"request"`
NextPage []RequestInfo `json:"nextPage"`
}
type RequestInfo ¶
type RequestInfo struct {
//Title string `json:"title"`
TotalResults string `json:"totalResults"`
//SearchTerms string `json:"searchTerms"`
Count int64 `json:"count"`
StartIndex int64 `json:"startIndex"`
//Language string `json:"language"`
Safe string `json:"safe"`
DisableCNTwTranslation string `json:"disableCnTwTranslation"`
Hl string `json:"hl"`
}
type Result ¶
type Result struct {
//URL URL `json:"url"`
Queries Queries `json:"queries"`
SearchInformation SearchInformation `json:"searchInformation"`
Items []Item `json:"items"`
}
type SearchInformation ¶
Click to show internal directories.
Click to hide internal directories.