mirror of
https://github.com/prebid/openrtb.git
synced 2026-06-14 22:16:41 +03:00
native/request: type fixes/changes
- Asset.{Title,Img,Video,Data} now use corresponding object types (ptr)
- Data.Len is uint64 now
- Image.{W,WMin,H,HMin} are uint64 now
- removed video.linearity from native fixture
This commit is contained in:
@@ -50,7 +50,7 @@ type Asset struct {
|
||||
// Description:
|
||||
// Title object for title assets.
|
||||
// See TitleObject definition.
|
||||
Title interface{} `json:"title,omitempty"`
|
||||
Title *Title `json:"title,omitempty"`
|
||||
|
||||
// Field:
|
||||
// img
|
||||
@@ -61,7 +61,7 @@ type Asset struct {
|
||||
// Description:
|
||||
// Image object for image assets.
|
||||
// See ImageObject definition.
|
||||
Img interface{} `json:"img,omitempty"`
|
||||
Img *Image `json:"img,omitempty"`
|
||||
|
||||
// Field:
|
||||
// video
|
||||
@@ -72,7 +72,7 @@ type Asset struct {
|
||||
// See the Video request object definition.
|
||||
// Note that in-stream (ie preroll, etc) video ads are not part of Native.
|
||||
// Native ads may contain a video as the ad creative itself.
|
||||
Video interface{} `json:"video,omitempty"`
|
||||
Video *Video `json:"video,omitempty"`
|
||||
|
||||
// Field:
|
||||
// data
|
||||
@@ -83,7 +83,7 @@ type Asset struct {
|
||||
// Description:
|
||||
// Data object for brand name, description, ratings, prices etc.
|
||||
// See DataObject definition.
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
Data *Data `json:"data,omitempty"`
|
||||
|
||||
// Field:
|
||||
// ext
|
||||
|
||||
@@ -27,7 +27,7 @@ type Data struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Maximum length of the text in the element’s response.
|
||||
Len int64 `json:"len,omitempty"`
|
||||
Len uint64 `json:"len,omitempty"`
|
||||
|
||||
// Field:
|
||||
// ext
|
||||
|
||||
@@ -26,7 +26,7 @@ type Image struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Width of the image in pixels.
|
||||
W int64 `json:"w,omitempty"`
|
||||
W uint64 `json:"w,omitempty"`
|
||||
|
||||
// Field:
|
||||
// wmin
|
||||
@@ -39,7 +39,7 @@ type Image struct {
|
||||
// This option should be used for any rescaling of images by the client.
|
||||
// Either w or wmin should be transmitted.
|
||||
// If only w is included, it should be considered an exact requirement.
|
||||
WMin int64 `json:"wmin,omitempty"`
|
||||
WMin uint64 `json:"wmin,omitempty"`
|
||||
|
||||
// Field:
|
||||
// h
|
||||
@@ -49,7 +49,7 @@ type Image struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Height of the image in pixels.
|
||||
H int64 `json:"h,omitempty"`
|
||||
H uint64 `json:"h,omitempty"`
|
||||
|
||||
// Field:
|
||||
// hmin
|
||||
@@ -62,7 +62,7 @@ type Image struct {
|
||||
// This option should be used for any rescaling of images by the client.
|
||||
// Either h or hmin should be transmitted.
|
||||
// If only h is included, it should be considered an exact requirement.
|
||||
HMin int64 `json:"hmin,omitempty"`
|
||||
HMin uint64 `json:"hmin,omitempty"`
|
||||
|
||||
// Field:
|
||||
// mimes
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
{
|
||||
"id": 4,
|
||||
"video": {
|
||||
"linearity": 1,
|
||||
"minduration": 15,
|
||||
"maxduration": 30,
|
||||
"protocols": [
|
||||
|
||||
Reference in New Issue
Block a user