Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID int `json:"id"` // Unique asset ID, assigned by exchange, must match one of the asset IDs in request Required int `json:"required,omitempty"` // Set to 1 if asset is required Title *Title `json:"title,omitempty"` // Title object for title assets Image *Image `json:"img,omitempty"` // Image object for image assets Video *Video `json:"video,omitempty"` // Video object for video assets Data *Data `json:"data,omitempty"` // Data object for brand name, description, ratings, prices etc. Link *Link `json:"link,omitempty"` // Link object for call to actions. The link object applies if the asset item is activated (clicked) Ext json.RawMessage `json:"ext,omitempty"` }
Asset corresponds to the Asset Object in the request. The main container object for each asset requested or supported by Exchange on behalf of the rendering client. Any object that is required is to be flagged as such. Only one of the {title,img,video,data} objects should be present in each object. All others should be null/absent. The id is to be unique within the AssetObject array so that the response can be aligned.
type Data ¶
type Data struct { Label string `json:"label,omitempty"` // The optional formatted string name of the data type to be displayed Value string `json:"value"` // The formatted string of data to be displayed. Can contain a formatted value such as “5 stars” or “$10” or “3.4 stars out of 5” Ext json.RawMessage `json:"ext,omitempty"` }
Data object contains response data.
type Image ¶
type Image struct { URL string `json:"url,omitempty"` // URL of the image asset Width int `json:"w,omitempty"` // Width of the image in pixels Height int `json:"h,omitempty"` // Height of the image in pixels Ext json.RawMessage `json:"ext,omitempty"` }
Image object contains response image.
type Link ¶
type Link struct { URL string `json:"url"` // Landing URL of the clickable link ClickTrackers []string `json:"clicktrackers,omitempty"` // List of third-party tracker URLs to be fired on click of the URL FallbackURL string `json:"fallback,omitempty"` // Fallback URL for deeplink. To be used if the URL given in url is not supported by the device. Ext json.RawMessage `json:"ext,omitempty"` }
Link object contains response link.
type Response ¶
type Response struct { Version openrtb.StringOrNumber `json:"ver,omitempty"` // Version of the Native Markup Assets []Asset `json:"assets"` // An array of Asset Objects Link Link `json:"link"` // Destination Link. This is default link object for the ad ImpTrackers []string `json:"imptrackers,omitempty"` // Array of impression tracking URLs, expected to return a 1x1 image or 204 response JSTracker string `json:"jstracker,omitempty"` // Optional JavaScript impression tracker. This is a valid HTML, Javascript is already wrapped in <script> tags. It should be executed at impression time where it can be supported Ext json.RawMessage `json:"ext,omitempty"` }
Response is the native object is the top level JSON object which identifies a native response.
type Title ¶
type Title struct { Text string `json:"text"` // The text associated with the text element Ext json.RawMessage `json:"ext,omitempty"` }
Title wraps title information.