JsonEngineUrl

data class JsonEngineUrl(var base: String?, var method: JsonEngineMethod?, var params: List<SearchUrlParam>?, var searchTermParamName: String?, var displayNameMap: Map<String, String>?, var isNewUntil: String?, var excludePartnerCodeFromTelemetry: Boolean, var acceptedContentTypes: List<String>?)

Defines an individual search engine URL. This is defined separately to types::SearchEngineUrl as various fields may be optional in the supplied configuration.

Constructors

Link copied to clipboard
constructor(base: String?, method: JsonEngineMethod?, params: List<SearchUrlParam>?, searchTermParamName: String?, displayNameMap: Map<String, String>?, isNewUntil: String?, excludePartnerCodeFromTelemetry: Boolean, acceptedContentTypes: List<String>?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

If this URL performs searches only for certain MIME types, they should be listed here. If this value is None, then it's assumed the content type is irrelevant. This field is intended to be used for URLs like visual search, which might support certain image types and not others. Consumers can use it to determine whether search UI corresponding to the URL should be shown to the user in a given context.

Link copied to clipboard
var base: String?

The PrePath and FilePath of the URL. May include variables for engines which have a variable FilePath, e.g. {searchTerms} for when a search term is within the path of the url.

Link copied to clipboard

A map from locale codes to display names of the URL. This is useful if the URL corresponds to a brand name distinct from the engine's brand name. Since brand names can be localized, this is a map rather than a URL. The client will fall back to the special locale code "default" when its locale is not present in the map.

Link copied to clipboard

Whether the engine's partner code should be excluded from telemetry when this URL is visited.

Link copied to clipboard

Indicates the date until which the URL is considered new (format: YYYY-MM-DD).

Link copied to clipboard

The HTTP method to use to send the request (GET or POST). If the engine definition has not specified the method, it defaults to GET.

Link copied to clipboard

The parameters for this URL.

Link copied to clipboard

The name of the query parameter for the search term. Automatically appended to the end of the query. This may be skipped if {searchTerms} is included in the base.