NimbusRequest

class NimbusRequest
extension NimbusRequest : Decodable, Encodable, Equatable, Hashable, NimbusRequestExtensible

The top-level bid request object. Attributes in this top-level object establish rules and restrictions that apply to all impressions being offered. There are also several subordinate objects that provide detailed data to potential buyers. OpenRTB Section 3.2.1

  • Default request for a hybrid interstitial ad

    • position: Position / identifier of the ad

    Declaration

    Swift

    static func forInterstitialAd(position: String) -> NimbusRequest

    Parameters

    position

    Position / identifier of the ad

    Return Value

    NimbusRequest set up for an interstitial ad

  • Default request for a banner ad

    • position: Position / identifier of the ad
    • format: Ad format for the banner ad. Defaults to NimbusAdFormat.banner320x50
    • adPosition: Ad position. Defaults to NimbusImpressionPosition.aboveTheFold

    Declaration

    Swift

    static func forBannerAd(position: String, format: NimbusAdFormat = .banner320x50, adPosition: NimbusPosition = .aboveTheFold) -> NimbusRequest

    Parameters

    position

    Position / identifier of the ad

    format

    Ad format for the banner ad. Defaults to NimbusAdFormat.banner320x50

    adPosition

    Ad position. Defaults to NimbusImpressionPosition.aboveTheFold

    Return Value

    NimbusRequest set up for a banner ad

  • Default request for a interstitial video ad

    • position: Position / identifier of the ad
    • adPosition: Ad position for the ad. Default: NimbusPosition.unknown

    Declaration

    Swift

    static func forVideoAd(position: String, adPosition: NimbusPosition = .unknown) -> NimbusRequest

    Parameters

    position

    Position / identifier of the ad

    adPosition

    Ad position for the ad. Default: NimbusPosition.unknown

    Return Value

    NimbusRequest set up for a rewarded video unit

  • Default request for a rewarded video ad

    • position: Position / identifier of the ad

    Declaration

    Swift

    static func forRewardedVideo(position: String) -> NimbusRequest

    Parameters

    position

    Position / identifier of the ad

    Return Value

    NimbusRequest set up for a rewarded video unit

  • Represents the impressions offered. Only one NimbusImpression object is currently supported.

    Declaration

    Swift

    var impressions: [NimbusImpression]
  • app

    Details about the publisher’s app (i.e., non-browser applications). Only applicable and recommended for apps.

    Declaration

    Swift

    var app: NimbusApp?
  • Details about the user’s device to which the impression will be delivered.

    Declaration

    Swift

    var device: NimbusDevice
  • This is not part of the OpenRTB spec, adding this here for convenience allows height and width to be passed without the video/banner object to backwards support the GET

    Declaration

    Swift

    var format: NimbusAdFormat
  • Details about the human user of the device; the advertising audience

    Declaration

    Swift

    var user: NimbusUser?
  • Indicator of test mode in which auctions are not billable

    Declaration

    Swift

    var isTest: Bool?
  • White list of buyer seats (e.g., advertisers, agencies) allowed to bid on this impression

    Declaration

    Swift

    var whitelistBuyers: Set<String>?
  • Black list of buyer seats (e.g., advertisers, agencies) restricted from bidding on this impression

    Declaration

    Swift

    var blocklistBuyers: Set<String>?
  • White list of languages for creatives using ISO-639-1-alpha-2

    Declaration

    Swift

    var whitelistLanguages: Set<String>?
  • Blocked advertiser categories

    Declaration

    Swift

    var blockedCategories: Set<String>?
  • Block list of advertisers by their domains (e.g., “ford.com”)

    Declaration

    Swift

    var blockedAdvertisingDomains: Set<URL>?
  • Block list of applications by their platform-specific exchange-independent application identifiers (numeric IDs)

    Declaration

    Swift

    var blockedApps: Set<String>?
  • Provides data about the inventory source and which entity makes the final decision

    Declaration

    Swift

    var source: NimbusSource?
  • Specifies any industry, legal, or governmental regulations in force for this request

    Declaration

    Swift

    var regs: NimbusRegs?
  • Maximum time in milliseconds the exchange allows for bids to be received including Internet latency to avoid timeout. This value supersedes any a priori guidance from the exchange

    Declaration

    Swift

    var auctionTimeout: Int?
  • Placeholder for exchange-specific extensions to OpenRTB

    Declaration

    Swift

    var extensions: [String : NimbusCodable]?
  • Initializes a NimbusRequest object

    • impressions: Represents the impressions offered. Only one NimbusImpression object is currently supported.
    • app: Details about the publisher’s app (i.e., non-browser applications). Only applicable and recommended for apps.
    • device: Details about the user’s device to which the impression will be delivered
    • format: This is not part of the OpenRTB spec, adding this here for convenience allows height and width to be passed without the video/banner object to backwards support the GET
    • user: Details about the human user of the device; the advertising audience
    • isTest: Indicator of test mode in which auctions are not billable
    • whitelistBuyers: White list of buyer seats (e.g., advertisers, agencies) allowed to bid on this impression
    • blacklistBuyers: Block list of buyer seats (e.g., advertisers, agencies) restricted from bidding on this impression
    • whitelistLanguages: White list of languages for creatives using ISO-639-1-alpha-2
    • blockedCategories: Blocked advertiser categories
    • blockedAdvertisingDomains: Block list of advertisers by their domains (e.g., “ford.com”)
    • blockedApps: Block list of applications by their platform-specific exchange-independent application identifiers (numeric IDs)
    • source: Provides data about the inventory source and which entity makes the final decision
    • regs: Specifies any industry, legal, or governmental regulations in force for this request
    • auctionTimeout: Maximum time in milliseconds the exchange allows for bids to be received including Internet latency to avoid timeout. This value supersedes any a priori guidance from the exchange.

    Declaration

    Swift

    init(impressions: [NimbusImpression], app: NimbusApp? = nil, device: NimbusDevice, format: NimbusAdFormat, user: NimbusUser? = nil, isTest: Bool? = nil, whitelistBuyers: Set<String>? = nil, blacklistBuyers: Set<String>? = nil, whitelistLanguages: Set<String>? = nil, blockedCategories: Set<String>? = nil, blockedAdvertisingDomains: Set<URL>? = nil, blockedApps: Set<String>? = nil, source: NimbusSource? = nil, regs: NimbusRegs? = nil, auctionTimeout: Int? = nil)
  • Unique session id for the current app session

    Declaration

    Swift

    var sessionId: String? { get }
  • Configure publisher-specific details

    • sessionId: Any unique identifier for this session

    Declaration

    Swift

    func configure(sessionId: String)

    Parameters

    sessionId

    Any unique identifier for this session

  • Add extended ID

    • eid: Extended ID

    Declaration

    Swift

    func addExtendedId(_ eid: NimbusExtendedId)

    Parameters

    eid

    Extended ID

  • Configure viewability for Open Measurement

    • partnerName: Name of the IAB-certified Open Measurement partner
    • partnerVersion: Partner’s current app or SDK version

    Declaration

    Swift

    func configureViewability(partnerName: String, partnerVersion: String)

    Parameters

    partnerName

    Name of the IAB-certified Open Measurement partner

    partnerVersion

    Partner’s current app or SDK version

  • Undocumented

    Declaration

    Swift

    static func != (lhs: Self, rhs: Self) -> Bool
  • Undocumented

    Declaration

    Swift

    func addAPSResponse(_ response: DTBAdResponse)
  • Undocumented

    Declaration

    Swift

    func addAPSLoader(_ loader: DTBAdLoader)