Request Builders

The request builder is a class responsible for constructing a SearchRequest object which will be sent to the Hawksearch Search API. It provides a Fluent API.

Base class: BaseRequestBuilder<TBuilder>


Methods:

public TBuilder ForLanguage(string languageCode)
  • Instructs the request to be made for this specific language code

 

public TBuilder InCatalog(int catalogId)
  • Instructs the request to be made for this specific catalog

 

public TBuilder InMarket(string marketId)
  • Instructs the request to be made for this specific market

 

  • Instructs the request to be made for Optimizely published content only

 

Search

Class: SearchRequestBuilder

 

Methods:

  • Constructs the final search request based on the provided SearchQuery object.

 

 

Example:

 

Autocomplete

Class: AutocompleteRequestBuilder

 

Methods:

  • Constructs the final search request based on the provided keyword.

 


Example:

Â