AI-generated Key Takeaways
-
ContextualSearchRuntime enables issuing contextual search requests and can be reused throughout the app's lifecycle.
-
It provides methods for retrieving search suggestions based on input options.
-
It allows fetching trending searches using optional input parameters.
-
Developers can get search content by specifying search options through this runtime.
ContextualSearchRuntime
@interface ContextualSearchRuntime : NSObject
Runtime for issuing contextual search requests. The runtime can be reused across the app after it is initialized.
-
Creates a new Search Runtime. The Search Runtime can be created at app startup and only needs to be created once. It can be reused throuhgout the app’s lifecycle.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Gets search suggestions. \param withOptions The input options used to generate search suggestions.
Declaration
Objective-C
- (void)getSearchSuggestionsWithOptions: (GetSearchSuggestionsOptions *_Nonnull)getSearchSuggestionsOptions completionHandler: (void (^_Nonnull)(SearchSuggestions *_Nullable, NSError *_Nullable)) completionHandler;
-
Gets trending searches. \param withOptions The input options used to generate trending searches.
Declaration
Objective-C
- (void)getTrendingSearchesWithOptions: (GetTrendingSearchesOptions *_Nullable)getTrendingSearchesOptions completionHandler: (void (^_Nonnull)(SearchSuggestions *_Nullable, NSError *_Nullable)) completionHandler;
-
Gets search content. \param withOptions The input options used to generate search content.
Declaration
Objective-C
- (void)getSearchContentWithOptions:(GetSearchContentOptions *_Nonnull)options completionHandler: (void (^_Nonnull)(SearchContents *_Nullable, NSError *_Nullable))completionHandler;