Documentation ¶
Index ¶
Constants ¶
View Source
const ( SERPEndpoint = "https://api.webit.live/api/v1/realtime/serp" LoginEndpoint = "https://api.nimbleway.com/api/v1/account/login" JSONContentType = "application/json" ContentHeader = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Token string Secrets SecretsFile }
func (*Client) Serp ¶
func (c *Client) Serp(ctx context.Context, req *SERPRequest) (*SERPResults, error)
Serp executes a SERP request
type Entities ¶
type Entities struct { OrganicResult []OrganicResult `json:"OrganicResult"` Pagination []Pagination `json:"Pagination"` RelatedSearch []RelatedSearch `json:"RelatedSearch"` SearchInformation []SearchInformation `json:"SearchInformation"` }
type EntitiesCount ¶
type OrganicResult ¶
type Pagination ¶
type ParsedResults ¶
type ParsedResults struct { Status string `json:"status"` Entities Entities `json:"entities"` TotalEntitiesCount int `json:"total_entities_count"` EntitiesCount EntitiesCount `json:"entities_count"` Metrics map[string]interface{} `json:"metrics"` }
type RelatedSearch ¶
type SERPRequest ¶
type SERPRequest struct { SearchEngine string `json:"search_engine"` Country string `json:"country"` Locale string `json:"locale"` Query string `json:"query"` Parse bool `json:"parse"` }
func NewRequest ¶
func NewRequest(query string) *SERPRequest
NewRequest instantiates a default request with the provided string
type SERPResults ¶
type SERPResults struct { HtmlContent string `json:"html_content"` Status string `json:"status"` Parsing ParsedResults `json:"parsing"` URL string `json:"url"` }
type SearchInformation ¶
type SecretsFile ¶
type TokenResponse ¶
type TokenResponse struct {
Token string `json: "token"`
}
Click to show internal directories.
Click to hide internal directories.