qwant

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Info = engines.Info{
	Domain:         "www.qwant.com",
	Name:           engines.QWANT,
	URL:            "https://api.qwant.com/v3/search/web?q=",
	ResultsPerPage: 10,
}
View Source
var Support = engines.SupportedSettings{
	Locale:                  true,
	SafeSearch:              true,
	Mobile:                  true,
	RequestedResultsPerPage: true,
}

Functions

This section is empty.

Types

type Engine added in v0.14.1

type Engine struct{}

func New added in v0.14.1

func New() Engine

func (Engine) Search added in v0.14.1

func (e Engine) Search(ctx context.Context, query string, relay *bucket.Relay, options engines.Options, settings config.Settings, timings config.CategoryTimings, salt string, nEnabledEngines int) []error

type QwantMainlineItems

type QwantMainlineItems struct {
	Type  string         `json:"type"`
	Items []QwantResults `json:"items"`
}

type QwantResponse

type QwantResponse struct {
	Status string `json:"status"`
	Data   struct {
		Res struct {
			Items struct {
				Mainline []QwantMainlineItems `json:"mainline"`
			} `json:"items"`
		} `json:"result"`
	} `json:"data"`
}

type QwantResults

type QwantResults struct {
	Title       string `json:"title"`
	URL         string `json:"url"` //there is also a source field, what is it?
	Description string `json:"desc"`
}

Jump to

Keyboard shortcuts

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