//sdk/com.adsbynimbus.request/NimbusRequest
NimbusRequest
class NimbusRequest(val position: String, val request: BidRequest = BidRequest( imp = arrayOf(Impression(ext = Impression.Extension(position))), app = app, user = user, source = Source().takeUnless { !Nimbus.thirdPartyViewabilityEnabled }?.apply { omidpn = Nimbus.sdkName omidpv = Nimbus.version }, ).apply { session_id = Nimbus.sessionId })
A request to Nimbus.
By default requests from the SDK will be sent to https://{publisherKey}.adsbynimbus.com/rta/v1. To override the url for this request use the requestUrl property on this object.
Parameters
androidJvm
| position | A freeform identifier used to aggregate all requests with the same position value across all platforms. Different positions should be used to identify each unique ad placement in app to compare the performance of different ads but should be consistent across platforms. New position values are automatically recorded by Nimbus and do not require backend setup so care should be taken to not use a dynamic value such as an auto-incrementing number for this field. |
| request | The underlying OpenRTB request to Nimbus, |
Constructors
| NimbusRequest | constructor(position: String, request: BidRequest = BidRequest( imp = arrayOf(Impression(ext = Impression.Extension(position))), app = app, user = user, source = Source().takeUnless { !Nimbus.thirdPartyViewabilityEnabled }?.apply { omidpn = Nimbus.sdkName omidpv = Nimbus.version }, ).apply { session_id = Nimbus.sessionId }) |
Types
| Name | Summary |
|---|---|
| Companion | object Companion |
| Interceptor | fun interface Interceptor : NimbusResponse.Listener, NimbusError.Listener Listener for intercepting outbound request to modify or add request parameters |
Properties
| Name | Summary |
|---|---|
| companionAds | var companionAds: Array<CompanionAd> Requested Companion Ads |
| extendedIds | val extendedIds: MutableSet<EID> The set of extended IDs appended to the User object when this request is sent to Nimbus. |
| interceptors | val interceptors: MutableSet<NimbusRequest.Interceptor> Internal Use Only |
| interstitialOrientation | var interstitialOrientation: Int Forces the orientation of an interstitial request |
| position | @JvmField val position: String |
| request | @JvmField val request: BidRequest |
| requestUrl | var requestUrl: String Override the url for this request. |
Functions
| Name | Summary |
|---|---|
| addApsLoader | fun NimbusRequest.addApsLoader(loader: DTBAdLoader) Adds a DTBAdLoader to the request which will handle making the request when the NimbusRequest is made |
| addApsResponse | fun NimbusRequest.addApsResponse(response: DTBAdResponse) Adds the parameters from a DTBAdResponse to the request which includes APS in the auction. |
| addExtendedId | @JvmOverloads fun addExtendedId(source: String, id: String, extensions: Map<String, String> = emptyMap()): Boolean Adds an extended user identifier to this request. |
| addNativeAd | @JvmStatic @JvmOverloads fun NimbusRequest.addNativeAd(size: NativeAdSize = Medium, includeVideo: Boolean = false, adContext: Byte? = null, adContextSubType: Byte? = null, placementType: Byte? = null, battr: ByteArray? = null): NimbusRequest Modifies a NimbusRequest to optionally fill a native ad. |
| asRewardedAd | @JvmStatic fun NimbusRequest.asRewardedAd(context: Context): NimbusRequest Appends the necessary information to the NimbusRequest to mark it as a rewarded ad. |
| builder | fun builder(): AndroidBidRequestBuilder Builder for modifying a bid request |
| configureViewability | fun configureViewability(partnerName: String, partnerVersion: String) Sets the Open Measurement Partner information for enabling viewability |
| plusAssign | operator fun NimbusRequest.plusAssign(loader: DTBAdLoader) Adds a DTBAdLoader to the request which will handle making the request when the NimbusRequest is made operator fun NimbusRequest.plusAssign(response: DTBAdResponse) Adds the parameters from a DTBAdResponse to the request which includes APS in the auction |
| withAdMobBanner | fun NimbusRequest.withAdMobBanner(adUnitId: String): NimbusRequest Helper to include AdMob bidding in the current banner request. |
| withAdMobInterstitial | fun NimbusRequest.withAdMobInterstitial(adUnitId: String): NimbusRequest Helper to include AdMob bidding in the current interstitial request. |
| withAdMobNative | fun NimbusRequest.withAdMobNative(adUnitId: String): NimbusRequest Helper to include AdMob bidding in the current native request. |
| withAdMobRewarded | fun NimbusRequest.withAdMobRewarded(adUnitId: String): NimbusRequest Helper to include AdMob bidding in the current rewarded request. |
| withMintegral | @JvmOverloads fun NimbusRequest.withMintegral(adUnitId: String, placementId: String = ""): NimbusRequest Helper to include Mintegral bidding in the current request. |