public class POBNativeAdResponse
extends java.lang.Object
POBNativeAdResponseAsset).
Selection of the asset to be displayed will be done by matching the id of the asset with the request's asset id not on the basis of the type provided in the response.
The asset without an id or a non-integer id will be ignored.
Also takes List of event trackers, which is recommended to use over js & imp trackers(for event trackers refer POBNativeAdResponseEventTracker).
It also stores the link which will be triggered after the ad is clicked(for link refer POBNativeAdLinkResponse).| Constructor and Description |
|---|
POBNativeAdResponse(java.lang.String version,
java.util.List<POBNativeAdResponseAsset> assets,
POBNativeAdLinkResponse link,
java.util.List<java.lang.String> impressionTrackers,
java.lang.String jsTracker,
java.util.List<POBNativeAdResponseEventTracker> eventTrackers,
java.lang.String privacyUrl)
Creates the object for the POBNativeAdResponse
|
| Modifier and Type | Method and Description |
|---|---|
POBNativeAdResponseAsset |
getAsset(int assetId)
Return the assets present in the native ad response for given asset id
|
java.util.Map<java.lang.Integer,POBNativeAdResponseAsset> |
getAssets()
Return the assets present in the native ad response
|
java.util.List<POBNativeAdResponseEventTracker> |
getEventTrackers()
Returns the list of event trackers which are fired at appropriate time of action.
|
java.util.List<POBNativeAdResponseEventTracker> |
getEventTrackers(com.pubmatic.sdk.openwrap.core.nativead.POBNativeEventType eventType,
com.pubmatic.sdk.openwrap.core.nativead.POBNativeEventTrackingMethod method)
Method to get event trackers with event type and tracking method
|
java.util.List<java.lang.String> |
getImpressionTrackers()
Returns the list of impression trackers present in the native ad response.
|
java.lang.String |
getJsTracker()
Returns javascript string present in the native ad response.
|
POBNativeAdLinkResponse |
getLink()
Returns the link object which is used when the ad is clicked.
|
java.lang.String |
getPrivacyUrl()
Returns the privacy url
|
java.lang.String |
getVersion()
Returns version of the native ad response
|
java.lang.String |
toString()
Converts the object to a readable string
|
public POBNativeAdResponse(@Nullable
java.lang.String version,
@NonNull
java.util.List<POBNativeAdResponseAsset> assets,
@Nullable
POBNativeAdLinkResponse link,
@Nullable
java.util.List<java.lang.String> impressionTrackers,
@Nullable
java.lang.String jsTracker,
@Nullable
java.util.List<POBNativeAdResponseEventTracker> eventTrackers,
@Nullable
java.lang.String privacyUrl)
version - String version of the native ad (required)assets - List of POBNativeAdResponseAsset (required)impressionTrackers - List of String for impression trackingjsTracker - String for trackingeventTrackers - List of POBNativeAdResponseEventTrackerlink - POBNativeAdLinkResponseprivacyUrl - String@Nullable public java.lang.String getVersion()
@NonNull public java.util.Map<java.lang.Integer,POBNativeAdResponseAsset> getAssets()
@Nullable public POBNativeAdResponseAsset getAsset(int assetId)
POBNativeAdResponseAsset if available@Nullable public POBNativeAdLinkResponse getLink()
POBNativeAdLinkResponse@Nullable public java.util.List<java.lang.String> getImpressionTrackers()
@Nullable public java.lang.String getJsTracker()
@Nullable public java.util.List<POBNativeAdResponseEventTracker> getEventTrackers()
POBNativeAdResponseEventTracker@Nullable public java.lang.String getPrivacyUrl()
@Nullable public java.util.List<POBNativeAdResponseEventTracker> getEventTrackers(@NonNull com.pubmatic.sdk.openwrap.core.nativead.POBNativeEventType eventType, @NonNull com.pubmatic.sdk.openwrap.core.nativead.POBNativeEventTrackingMethod method)
eventType - native event typemethod - native event tracking method@NonNull public java.lang.String toString()
toString in class java.lang.Object