Documentation ¶
Index ¶
Constants ¶
const Version = "1.1"
Version of the request string
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID int `json:"id"` Img Img `json:"img"` Title Title `json:"title"` Data Data `json:"data"` Required int `json:"required"` // should default to 1 }
Asset requesting Native assests
func (*Asset) MarshalJSONObject ¶
MarshalJSONObject implements MarshalerJSONObject
type Data ¶
Data .Type 1 sponsored Sponsored By message whereresponse should contain the brandname of the sponsor.text Required. Max 25or longer. 2 desc Descriptive text associated with theproduct or service being advertised.Longer length of text in responsemay be truncated or ellipsed by theexchange. text Recommended. Max 140 or longer. 3 rating Rating of the product being offeredto the user. For example an app’srating in an app store from 0-5.numberformatted asstringOptional. 0-5integer formattedas string. 4 likes Number of social ratings or “likes” ofthe product being offered to theuser.numberformatted asstring 5 downloads Number downloads/installs of thisproductnumberformatted asstring Data returns contextual data about the Native asset
func (*Data) MarshalJSONObject ¶
MarshalJSONObject implements MarshalerJSONObject
type Img ¶
type Img struct { Hmin int `json:"hmin"` Type int `json:"type"` // should be 3 for most cases Wmin int `json:"wmin"` Mimes []string `json:"mimes"` }
Img .Type 1 Icon Icon image Optional.max height: at least 50aspect ratio: 1:1 2 Logo Logo image for thebrand/app.To be deprecated in future version- use type 1 Icon. 3 Main Large image preview for theadAt least one of 2 size variantsrequired:Small Variant:max height: at least 200max width: at least 200,267, or 382aspect ratio: 1:1, 4:3, or1.91:1Large Variant:max height: at least 627max width: at least 627,836, or 1198aspect ratio: 1:1, 4:3, or1.91:1 500+ XXX Reserved for Exchangespecific usage numberedabove 500 No recommendations Img requesting types
func (*Img) MarshalJSONObject ¶
MarshalJSONObject implements MarshalerJSONObject
type Request ¶
type Request struct { Assets []Asset `json:"assets"` Plcmttype int `json:"plcmttype"` Plcmtcnt int `json:"plcmtcnt"` Required int `json:"required"` // should default to 1 Ver string `json:"ver"` }
Request is the structure for the 1.1 json string request in the RTB spec
func (*Request) MarshalJSONObject ¶
MarshalJSONObject implements MarshalerJSONObject
type Strings ¶
type Strings []string
Strings ...
func (Strings) MarshalJSONArray ¶
MarshalJSONArray encodes arrays into JSON
type Title ¶
type Title struct {
Len int `json:"len"`
}
Title being represent ensure Title metadata on the image
func (*Title) MarshalJSONObject ¶
MarshalJSONObject implements MarshalerJSONObject