Documentation ¶
Index ¶
Constants ¶
const ( ImpressionEvent = iota + 1 // Impression ViewableMRC50 // Visible impression using MRC definition at 50% in view for 1 second ViewableMRC100 // 100% in view for 1 second (ie GroupMstandard) ViewableVideo50 // Visible impression for video using MRC definition at 50% in view for 2 seconds )
const ( ImageMethod = iota + 1 // Image-pixel tracking - URL provided will be inserted as a 1x1 pixel at the time of the event JavaScriptMethod // Javascript-based tracking - URL provided will be inserted as a js tag at the time of the event. )
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.
func (Asset) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Asset) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Asset) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Asset) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
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.
func (Data) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Data) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Data) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Data) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type EventTrackers ¶ added in v1.1.0
type EventTrackers struct { Event EventType `json:"event"` Method EventTrackingMethod `json:"method"` Url string `json:"url,omitempty"` //The URL of the image or js. Required for image or js, optional for custom. CustomData map[string]any `json:"customdata,omitempty"` //To be agreed individually with the exchange, an array of key:value objects for custom tracking, for example the account number of the DSP with a tracking company. IE {“accountnumber”:”123”} Ext json.RawMessage `json:"ext,omitempty"` }
EventTrackers object contains response data.
func (EventTrackers) MarshalEasyJSON ¶ added in v1.1.0
func (v EventTrackers) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventTrackers) MarshalJSON ¶ added in v1.1.0
func (v EventTrackers) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventTrackers) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *EventTrackers) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventTrackers) UnmarshalJSON ¶ added in v1.1.0
func (v *EventTrackers) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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.
func (Image) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Image) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Image) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Image) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
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.
func (Link) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Link) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Link) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Link) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
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 EventTrackers []EventTrackers `json:"eventtrackers,omitempty"` // Array of tracking objects to run with the ad, in response to the declared supported methods in the request. Replaces imptrackers and jstracker, to be deprecated. Ext json.RawMessage `json:"ext,omitempty"` }
Response is the native object is the top level JSON object which identifies a native response.
func (Response) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Response) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Response) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Response) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
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.
func (Title) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Title) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Title) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Title) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Video ¶
type Video struct {
VASTTag string `json:"vasttag"` // VAST XML
}
Video is the VAST wrapper object.
func (Video) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Video) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Video) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Video) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface