Class ResponseExtKt
-
- All Implemented Interfaces:
public final class ResponseExtKt
-
-
Method Summary
Modifier and Type Method Description final static List<String>getTrackers(Ad $self, String type)Extension function to retrieve tracking URLs for a specific tracker type from an Ad. final static ObjectgetFirstPubContent(AdSet $self)Extension function to safely retrieve the first ad's pub content from an AdSet. -
-
Method Detail
-
getTrackers
final static List<String> getTrackers(Ad $self, String type)
Extension function to retrieve tracking URLs for a specific tracker type from an Ad.
This function provides a unified way to get tracking URLs from both legacy tracking events and modern tracking info structures. It prioritizes the newer tracking info format and falls back to legacy tracking events for backward compatibility.
- Parameters:
type- The tracker type from TrackerType to filter tracking URLs.- Returns:
A combined list of tracking URLs from both new and legacy tracking systems.
-
getFirstPubContent
final static Object getFirstPubContent(AdSet $self)
Extension function to safely retrieve the first ad's pub content from an AdSet.
This function provides safe access to the first ad's parsed content within an ad set. It handles null safety and returns the content object if available, or null if the ad set is null or contains no ads.
- Returns:
The parsed content object from the first ad, or null if not available.
-
-
-
-