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

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

Link copied to clipboard
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

Link copied to clipboard
object Companion
Link copied to clipboard

Listener for intercepting outbound request to modify or add request parameters

Properties

Link copied to clipboard

Requested Companion Ads

Link copied to clipboard

The set of extended IDs appended to the User object when this request is sent to Nimbus.

Link copied to clipboard
Link copied to clipboard

Forces the orientation of an interstitial request

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Override the url for this request.

Functions

Link copied to clipboard
fun addExtendedId(source: String, id: String, extensions: Map<String, String> = emptyMap()): Boolean

Adds an extended user identifier to this request.

Link copied to clipboard
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.

Link copied to clipboard

Appends the necessary information to the NimbusRequest to mark it as a rewarded ad.

Link copied to clipboard
fun builder(): AndroidBidRequestBuilder

Builder for modifying a bid request

Link copied to clipboard
fun configureViewability(partnerName: String, partnerVersion: String)

Sets the Open Measurement Partner information for enabling viewability