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:
Max Cherry
2018-12-30 12:42:33 +02:00
parent 3682b9ade1
commit 1efc868257
28 changed files with 68 additions and 68 deletions
+3 -3
View File
@@ -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
View File
@@ -20,7 +20,7 @@ type Content struct {
// integer
// Definition:
// Episode number.
Episode int `json:"episode,omitempty"`
Episode int64 `json:"episode,omitempty"`
// Attribute:
// title
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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
+5 -5
View File
@@ -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