NativeImage

@objcMembers
public class NativeImage : NSObject, JsonDecodable

Class representing an image asset in a native ad.

  • The type of image element being submitted from the Image Asset Types table. Required for assetsurl or dcourl responses, not required for embedded asset responses.

    Declaration

    Swift

    public var type: Int?
  • url

    URL of the image asset.

    Declaration

    Swift

    public var url: String?
  • Width of the image in pixels. Recommended for embedded asset responses. Required for assetsurl/dcourlresponses if multiple assets of same type submitted.

    Declaration

    Swift

    public var width: Int?
  • Height of the image in pixels. Recommended for embedded asset responses. Required for assetsurl/dcourl responses if multiple assets of same type submitted.

    Declaration

    Swift

    public var height: Int?
  • ext

    This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification

    Declaration

    Swift

    public var ext: [String : Any]?
  • Initializes a NativeImage object from a JSON dictionary.

    Declaration

    Swift

    public required init(jsonDictionary: [String : Any])

    Parameters

    jsonDictionary

    A dictionary containing the JSON data to initialize the object.

  • Initializes with default values

    Declaration

    Swift

    public override init()