Skip to main content

Function: getHydratedAds()

getHydratedAds<T>(args, fetcher, matcher): Promise<HydratedAdsResponse<T>>

Defined in: facade.ts:65

Fetches and enriches ad offers with corresponding product details.

This function retrieves ads, fetches product information to enrich these ads and then return the search result with the advertisement data.

Type Parameters

T

T extends object

Parameters

args

GetAdsArgs

Targeting arguments to fetch ads.

fetcher

ProductFetcher<T>

Function to fetch product details from given offers.

matcher

ProductMatchesOffer<T>

Function to match products with offers.

Returns

Promise<HydratedAdsResponse<T>>

hydratedAds The sponsored search result consisting of products that are sponsored by the ad server.