SuggestClientProtocol
public protocol SuggestClientProtocol : AnyObject, Sendable
A client for the merino suggest endpoint.
Use [SuggestClient::new] to create an instance, then call
[SuggestClient::get_suggestions] to fetch suggestions for a query.
-
Fetches suggestions from the merino suggest endpoint for the given query.
Returns the raw JSON response body as a string, or
Noneif the server returned HTTP 204 (no suggestions available for weather).Declaration
Swift
func getSuggestions(query: String, options: SuggestOptions) throws -> String?