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.
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 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 string `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.
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