JsonEngineUrl
public struct JsonEngineUrl
extension JsonEngineUrl: Equatable, Hashable
Defines an individual search engine URL. This is defined separately to
types::SearchEngineUrl
as various fields may be optional in the supplied
configuration.
-
The PrePath and FilePath of the URL. May include variables for engines which have a variable FilePath, e.g.
{searchTerm}
for when a search term is within the path of the url.Declaration
Swift
public var base: String?
-
The HTTP method to use to send the request (
GET
orPOST
). If the engine definition has not specified the method, it defaults to GET.Declaration
Swift
public var method: JsonEngineMethod?
-
The parameters for this URL.
Declaration
Swift
public var params: [SearchUrlParam]?
-
The name of the query parameter for the search term. Automatically appended to the end of the query. This may be skipped if
{searchTerm}
is included in the base.Declaration
Swift
public var searchTermParamName: String?
-
Declaration
Swift
public init( /** * The PrePath and FilePath of the URL. May include variables for engines * which have a variable FilePath, e.g. `{searchTerm}` for when a search * term is within the path of the url. */base: String?, /** * 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. */method: JsonEngineMethod?, /** * The parameters for this URL. */params: [SearchUrlParam]?, /** * The name of the query parameter for the search term. Automatically * appended to the end of the query. This may be skipped if `{searchTerm}` * is included in the base. */searchTermParamName: String?)
-
Declaration
Swift
public static func == (lhs: JsonEngineUrl, rhs: JsonEngineUrl) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)