mirror of
https://github.com/prebid/openrtb.git
synced 2026-06-14 05:56:34 +03:00
types: actually, better stick to int64 instead of just int
At least, it's more convenient to use with time std pkg. Also, API implementations better never rely on machine-dependent types.
This commit is contained in:
@@ -134,7 +134,7 @@ type AudioPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Minimum bit rate of the creative in Kbps.
|
||||
MinBitR int `json:"minbitr,omitempty"`
|
||||
MinBitR int64 `json:"minbitr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxbitr
|
||||
@@ -142,7 +142,7 @@ type AudioPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Maximum bit rate of the creative in Kbps.
|
||||
MaxBitR int `json:"maxbitr,omitempty"`
|
||||
MaxBitR int64 `json:"maxbitr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// delivery
|
||||
@@ -160,7 +160,7 @@ type AudioPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// The maximum number of ads that can be played in an ad pod.
|
||||
MaxSeq int `json:"maxseq,omitempty"`
|
||||
MaxSeq int64 `json:"maxseq,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// comp
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ type Content struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Episode number.
|
||||
Episode int `json:"episode,omitempty"`
|
||||
Episode int64 `json:"episode,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// title
|
||||
|
||||
@@ -21,7 +21,7 @@ type DataAsset struct {
|
||||
// Definition:
|
||||
// The length of the value contents.
|
||||
// This length should conform to recommendations provided in List: Native Data Asset Types
|
||||
Len int `json:"len,omitempty"`
|
||||
Len int64 `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// type
|
||||
|
||||
@@ -21,7 +21,7 @@ type DataAssetFormat struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// The maximum allowed length of the data value.
|
||||
Len int `json:"len,omitempty"`
|
||||
Len int64 `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
+3
-3
@@ -95,7 +95,7 @@ type Device struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Physical height of the screen in pixels.
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
@@ -103,7 +103,7 @@ type Device struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Physical width of the screen in pixels.
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ppi
|
||||
@@ -111,7 +111,7 @@ type Device struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Screen size as pixels per linear inch.
|
||||
PPI int `json:"ppi,omitempty"`
|
||||
PPI int64 `json:"ppi,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pxratio
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ type Display struct {
|
||||
// Definition:
|
||||
// Absolute width of the creative in device independent pixels (DIPS), typically for non-native ads.
|
||||
// Note that mixing absolute and relative sizes is not recommended.
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -49,7 +49,7 @@ type Display struct {
|
||||
// Definition:
|
||||
// Absolute height of the creative in device independent pixels (DIPS), typically for non-native ads.
|
||||
// Note that mixing absolute and relative sizes is not recommended.
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wratio
|
||||
|
||||
@@ -11,7 +11,7 @@ type DisplayFormat struct {
|
||||
// Definition:
|
||||
// Absolute width of the creative in units specified by DisplayPlacement.unit.
|
||||
// Note that mixing absolute and relative sizes is not recommended.
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -20,7 +20,7 @@ type DisplayFormat struct {
|
||||
// Definition:
|
||||
// Absolute height of the creative in units specified by DisplayPlacement.unit.
|
||||
// Note that mixing absolute and relative sizes is not recommended.
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wratio
|
||||
|
||||
@@ -110,7 +110,7 @@ type DisplayPlacement struct {
|
||||
// Definition:
|
||||
// Width of the placement in units specified by unit.
|
||||
// Note that this size applies to the placement itself; permitted creative sizes are specified elsewhere (e.g., DisplayFormat, ImageAssetFormat, etc.).
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -119,7 +119,7 @@ type DisplayPlacement struct {
|
||||
// Definition:
|
||||
// Width of the placement in units specified by unit.
|
||||
// Note that this size applies to the placement itself; permitted creative sizes are specified elsewhere (e.g., DisplayFormat, ImageAssetFormat, etc.).
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// unit
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ type DOOH struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Minimum DPI for text-based creative elements to display clearly.
|
||||
DPI int `json:"dpi,omitempty"`
|
||||
DPI int64 `json:"dpi,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ type Geo struct {
|
||||
// Local time as the number +/- of minutes from UTC.
|
||||
// Dev note:
|
||||
// This field is kept as `int` to follow type choice for timezone offset in std. `time` package.
|
||||
UTCOffset int `json:"utcoffset,omitempty"`
|
||||
UTCOffset int64 `json:"utcoffset,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -19,7 +19,7 @@ type ImageAsset struct {
|
||||
// integer; recommended
|
||||
// Definition:
|
||||
// Width of the image asset in device independent pixels (DIPS).
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -27,7 +27,7 @@ type ImageAsset struct {
|
||||
// integer; recommended
|
||||
// Definition:
|
||||
// Height of the image asset in device independent pixels (DIPS).
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// type
|
||||
|
||||
@@ -30,7 +30,7 @@ type ImageAssetFormat struct {
|
||||
// Definition:
|
||||
// Absolute width of the image asset in device independent pixels (DIPS).
|
||||
// Note that mixing absolute and relative sizes is not recommended.
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -39,7 +39,7 @@ type ImageAssetFormat struct {
|
||||
// Definition:
|
||||
// Absolute height of the image asset in device independent pixels (DIPS).
|
||||
// Note that mixing absolute and relative sizes is not recommended.
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wmin
|
||||
@@ -48,7 +48,7 @@ type ImageAssetFormat struct {
|
||||
// Definition:
|
||||
// The minimum requested absolute width of the image in device independent pixels (DIPS).
|
||||
// This option should be used for any scaling of images by the client.
|
||||
WMin int `json:"wmin,omitempty"`
|
||||
WMin int64 `json:"wmin,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// hmin
|
||||
@@ -57,7 +57,7 @@ type ImageAssetFormat struct {
|
||||
// Definition:
|
||||
// The minimum requested absolute height of the image in device independent pixels (DIPS).
|
||||
// This option should be used for any scaling of images by the client.
|
||||
HMin int `json:"hmin,omitempty"`
|
||||
HMin int64 `json:"hmin,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wratio
|
||||
|
||||
@@ -18,7 +18,7 @@ type TitleAsset struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// The length of the contents of the text attribute.
|
||||
Len int `json:"len,omitempty"`
|
||||
Len int64 `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -12,7 +12,7 @@ type TitleAssetFormat struct {
|
||||
// Definition:
|
||||
// The maximum allowed length of the title value.
|
||||
// Recommended lengths are 25, 90, or 140.
|
||||
Len int `json:"len,omitempty"`
|
||||
Len int64 `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ type User struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Year of birth as a 4-digit integer.
|
||||
YOB int `json:"yob,omitempty"`
|
||||
YOB int64 `json:"yob,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// gender
|
||||
|
||||
@@ -116,7 +116,7 @@ type VideoPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Width of the placement in units specified by unit.
|
||||
W int `json:"w,omitempty"`
|
||||
W int64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -124,7 +124,7 @@ type VideoPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Height of the placement in units specified by unit.
|
||||
H int `json:"h,omitempty"`
|
||||
H int64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// unit
|
||||
@@ -168,7 +168,7 @@ type VideoPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Minimum bit rate of the creative in Kbps.
|
||||
MinBitR int `json:"minbitr,omitempty"`
|
||||
MinBitR int64 `json:"minbitr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxbitr
|
||||
@@ -176,7 +176,7 @@ type VideoPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// Maximum bit rate of the creative in Kbps.
|
||||
MaxBitR int `json:"maxbitr,omitempty"`
|
||||
MaxBitR int64 `json:"maxbitr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// delivery
|
||||
@@ -194,7 +194,7 @@ type VideoPlacement struct {
|
||||
// integer
|
||||
// Definition:
|
||||
// The maximum number of ads that can be played in an ad pod.
|
||||
MaxSeq int `json:"maxseq,omitempty"`
|
||||
MaxSeq int64 `json:"maxseq,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// linear
|
||||
|
||||
Reference in New Issue
Block a user