google

package
v0.0.0-...-9336e07 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Title   string
	URL     string
	Content string
}

type SearchReq

type SearchReq struct {
	Query      string `json:"q"`
	Offset     int    `json:"off"`
	Language   string `json:"lang"`
	Country    string `json:"country"`
	SafeSearch bool   `json:"safe"`
}

type SearchResp

type SearchResp struct {
	Total   uint
	Results []Result
}

type Service

type Service struct {
	providers.HTTPClient

	UseLocalDomain bool
}

func New

func New() *Service

func (*Service) ContinueSearch

func (s *Service) ContinueSearch(ctx context.Context, tok search.Token) search.ResultIterator

func (*Service) ID

func (*Service) ID() string

func (*Service) Languages

func (s *Service) Languages(ctx context.Context) ([]search.Language, error)

func (*Service) Regions

func (s *Service) Regions(ctx context.Context) ([]search.Region, error)

func (*Service) Search

func (*Service) SearchRaw

func (s *Service) SearchRaw(ctx context.Context, r SearchReq) (*SearchResp, error)

Jump to

Keyboard shortcuts

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