SearchEngineUrl
public struct SearchEngineUrl
extension SearchEngineUrl: Equatable, Hashable
Defines an individual search engine URL.
-
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: String
-
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: String, /** * 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: SearchEngineUrl, rhs: SearchEngineUrl) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)