Featured Promotions
These methods are used to get the details for featured promotions created within Buddi and the details pertaining to each.
getFeaturedPromotions
The method returns the retailer featured promotions. Backend cache time is 10mins.
Example:
Buddi.getFeaturedPromotions();
Events: featured-promotions:loaded, featured-promotions:loading-error
Returns:
[{
desktop_image: 'url',
mobile_image: 'url',
id: 1,
}, ...]
getFeaturedPromotion
The method returns the retailer featured promotion by the given ID.
Example:
Buddi.getFeaturedPromotion(15);
Returns:
{
desktop_image: 'url',
mobile_image: 'url',
id: 1,
products: [ShortProduct, ShortProduct, ...],
}
Events: featured-promotion:loaded, featured-promotion:loading-error