diff --git a/README.md b/README.md index fad481f..e1eb676 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# openrtb [![Go Reference](https://pkg.go.dev/badge/github.com/prebid/openrtb/v19.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19) [![Test](https://github.com/prebid/openrtb/actions/workflows/test.yml/badge.svg)](https://github.com/prebid/openrtb/actions/workflows/test.yml) +# openrtb [![Go Reference](https://pkg.go.dev/badge/github.com/prebid/openrtb/v20.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20) [![Test](https://github.com/prebid/openrtb/actions/workflows/test.yml/badge.svg)](https://github.com/prebid/openrtb/actions/workflows/test.yml) [OpenRTB](https://iabtechlab.com/standards/openrtb/), [AdCOM](https://iabtechlab.com/standards/openmedia) and [OpenRTB Dynamic Native Ads](https://iabtechlab.com/standards/openrtb-native/) types for [Go programming language](https://golang.org/) @@ -9,24 +9,24 @@ **Requires Go 1.16+** -This library uses [Go modules](https://golang.org/ref/mod) ([tl;dr](https://blog.golang.org/using-go-modules)) and requires Go [1.16](https://golang.org/doc/go1.16)+ to enable the ability to issue release retractions. +This library uses [Go modules](https://golang.org/ref/mod) ([tl;dr](https://blog.golang.org/using-go-modules)) and requires Go [1.16](https://golang.org/doc/go1.16)+ for the ability to issue release retractions. # Using ```bash -go get -u "github.com/prebid/openrtb/v19/..." +go get -u "github.com/prebid/openrtb/v20/..." ``` ```go import ( - openrtb2 "github.com/prebid/openrtb/v19/openrtb2" + openrtb2 "github.com/prebid/openrtb/v20/openrtb2" - openrtb3 "github.com/prebid/openrtb/v19/openrtb3" - adcom1 "github.com/prebid/openrtb/v19/adcom1" + openrtb3 "github.com/prebid/openrtb/v20/openrtb3" + adcom1 "github.com/prebid/openrtb/v20/adcom1" - native1 "github.com/prebid/openrtb/v19/native1" - nreq "github.com/prebid/openrtb/v19/native1/request" - nres "github.com/prebid/openrtb/v19/native1/response" + native1 "github.com/prebid/openrtb/v20/native1" + nreq "github.com/prebid/openrtb/v20/native1/request" + nres "github.com/prebid/openrtb/v20/native1/response" ) ``` @@ -51,19 +51,19 @@ The `main` branch always contains latest code, so better use some package manage - all enums, described in section 5, must be typed with section name singularized (e.g., "5.2 Banner Ad Types" -> `type BannerAdType int8`) - all typed enums must have constants for each element, prefixed with type name (e.g., "5.2 Banner Ad Types - XHTML Text Ad (usually mobile)" -> `const BannerAdTypeXHTMLTextAd BannerAdType = 1`) - never use `iota` for enum constants - - OpenRTB (2.x) section "5.1 Content Categories" should remain untyped and have no constants + - OpenRTB (2.x) "content categories" should remain untyped and have no constants ## Pointers/omitempty Pointer | Omitempty | When to use | Example ------- | --------- | -------------------------------------------------------------------- | --------------------------------- - no | no | _required_ in spec | `Audio.mimes` - yes | yes | _required_ in spec, but is a part of mutually-exclusive group | `Imp.{banner,video,audio,native}` - no | yes | zero value (`""`, `0`) is useless / has no meaning | `Device.ua` - yes | yes | zero value (`""`, `0`) or value absence (`null`) has special meaning | `Device.{dnt,lmt}` + no | no | _required_ in spec | `Audio.MIMEs` + yes | yes | _required_ in spec, but is a part of mutually-exclusive group | `Imp.{Banner,Video,Audio,Native}` + no | yes | zero value (`""`, `0`) has no meaning, is defined in the spec as the default value, or represents time / duration | `Device.UA` + yes | yes | zero value (`""`, `0`) or value absence (`null`) has special meaning | `Device.{DNT,Lmt}` Using both pointer and `omitempty` is mostly just to save traffic / generate more "canonical" (strict) JSON. -## Documentation ([pkg.go.dev](https://pkg.go.dev/github.com/prebid/openrtb/v19)) +## Documentation ([pkg.go.dev](https://pkg.go.dev/github.com/prebid/openrtb/v20)) - [Godoc: documenting Go code](http://blog.golang.org/godoc-documenting-go-code) - Each entity (type, struct key or constant) should be documented - Ideally, copy-paste descriptions as-is, but feel free to omit section numbers, so just ` defines ` diff --git a/adcom1/README.md b/adcom1/README.md index 2729b89..9a8c304 100644 --- a/adcom1/README.md +++ b/adcom1/README.md @@ -1,3 +1,3 @@ -# adcom1 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/adcom1?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/adcom1) +# adcom1 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/adcom1?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20/adcom1) [AdCOM](https://iabtechlab.com/standards/openmedia/) [1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM) types for [Go programming language](https://golang.org/) diff --git a/adcom1/adcom1_test.go b/adcom1/adcom1_test.go index 0646989..4af567f 100644 --- a/adcom1/adcom1_test.go +++ b/adcom1/adcom1_test.go @@ -8,7 +8,7 @@ import ( . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - . "github.com/prebid/openrtb/v19/adcom1" + . "github.com/prebid/openrtb/v20/adcom1" ) var _ = DescribeTable( diff --git a/go.mod b/go.mod index d61388c..b0d4803 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/prebid/openrtb/v19 +module github.com/prebid/openrtb/v20 go 1.16 diff --git a/native1/README.md b/native1/README.md index c3625c3..bf528a3 100644 --- a/native1/README.md +++ b/native1/README.md @@ -1,4 +1,4 @@ -# native1 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/native1) +# native1 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20/native1) [OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section "7 Reference Lists/Enumerations" types for [Go programming language](https://golang.org/) diff --git a/native1/request/README.md b/native1/request/README.md index b02269f..d4eb27a 100644 --- a/native1/request/README.md +++ b/native1/request/README.md @@ -1,3 +1,3 @@ -# native1/request [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1/request?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/native1/request) +# native1/request [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1/request?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20/native1/request) [OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section "4 Native Ad Request Markup Details" types for [Go programming language](https://golang.org/) diff --git a/native1/request/data.go b/native1/request/data.go index 838b081..00f2083 100644 --- a/native1/request/data.go +++ b/native1/request/data.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 4.6 Data Object diff --git a/native1/request/event_tracker.go b/native1/request/event_tracker.go index 9d09c10..1ec98b5 100644 --- a/native1/request/event_tracker.go +++ b/native1/request/event_tracker.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 4.7 Event Trackers Request Object diff --git a/native1/request/image.go b/native1/request/image.go index 0dc64b2..b8d4155 100644 --- a/native1/request/image.go +++ b/native1/request/image.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 4.4 Image Object diff --git a/native1/request/request.go b/native1/request/request.go index c204410..b7d629e 100644 --- a/native1/request/request.go +++ b/native1/request/request.go @@ -8,7 +8,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 4.1 Native Markup Request Object diff --git a/native1/request/request_test.go b/native1/request/request_test.go index f96bf4a..cd4910b 100644 --- a/native1/request/request_test.go +++ b/native1/request/request_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/prebid/openrtb/v19/native1/request" + . "github.com/prebid/openrtb/v20/native1/request" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/native1/request/video.go b/native1/request/video.go index 27fa839..5934684 100644 --- a/native1/request/video.go +++ b/native1/request/video.go @@ -1,7 +1,7 @@ package request import ( - "github.com/prebid/openrtb/v19/openrtb2" + "github.com/prebid/openrtb/v20/openrtb2" ) // 4.5 Video Object diff --git a/native1/response/README.md b/native1/response/README.md index fbe2a4e..676e098 100644 --- a/native1/response/README.md +++ b/native1/response/README.md @@ -1,3 +1,3 @@ -# native1/response [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1/response?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/native1/response) +# native1/response [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1/response?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20/native1/response) [OpenRTB Dynamic Native Ads API](https://iabtechlab.com/standards/openrtb-native/) [1.2](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) section "5 Native Ad Response Markup Details" types for [Go programming language](https://golang.org/) diff --git a/native1/response/data.go b/native1/response/data.go index 1465287..dd733f4 100644 --- a/native1/response/data.go +++ b/native1/response/data.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 5.5 Object: Data diff --git a/native1/response/event_tracker.go b/native1/response/event_tracker.go index 646d0b5..402e3b9 100644 --- a/native1/response/event_tracker.go +++ b/native1/response/event_tracker.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 5.8 Event Tracker Response Object diff --git a/native1/response/image.go b/native1/response/image.go index 65dc1c7..dd22b46 100644 --- a/native1/response/image.go +++ b/native1/response/image.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/prebid/openrtb/v19/native1" + "github.com/prebid/openrtb/v20/native1" ) // 5.4 Object: Image diff --git a/native1/response/response_test.go b/native1/response/response_test.go index e77cc3b..34b8eec 100644 --- a/native1/response/response_test.go +++ b/native1/response/response_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/prebid/openrtb/v19/native1/response" + . "github.com/prebid/openrtb/v20/native1/response" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/openrtb2/README.md b/openrtb2/README.md index 977baf8..8a2d0d9 100644 --- a/openrtb2/README.md +++ b/openrtb2/README.md @@ -1,3 +1,3 @@ -# openrtb2 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/openrtb2?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/openrtb2) +# openrtb2 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/openrtb2?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20/openrtb2) [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf) types for [Go programming language](https://golang.org/) diff --git a/openrtb2/app.go b/openrtb2/app.go index 5f51f8a..f88ecbc 100644 --- a/openrtb2/app.go +++ b/openrtb2/app.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // Object: App @@ -111,7 +111,7 @@ type App struct { // integer // Description: // Indicates if the app has a privacy policy, where 0 = no, 1 = yes. - PrivacyPolicy int8 `json:"privacypolicy,omitempty"` + PrivacyPolicy *int8 `json:"privacypolicy,omitempty"` // Attribute: // paid @@ -119,7 +119,7 @@ type App struct { // integer // Description: // 0 = app is free, 1 = the app is a paid version. - Paid int8 `json:"paid,omitempty"` + Paid *int8 `json:"paid,omitempty"` // Attribute: // publisher diff --git a/openrtb2/audio.go b/openrtb2/audio.go index d112223..c1ff9a5 100644 --- a/openrtb2/audio.go +++ b/openrtb2/audio.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.8 Object: Audio @@ -170,7 +170,7 @@ type Audio struct { // Type: // integer // Description: - // Minimum bit rate in Kbps. + // Minimum bit rate in Kbps (kilobits per second). MinBitrate int64 `json:"minbitrate,omitempty"` // Attribute: @@ -178,7 +178,7 @@ type Audio struct { // Type: // integer // Description: - // Maximum bit rate in Kbps. + // Maximum bit rate in Kbps (kilobits per second). MaxBitrate int64 `json:"maxbitrate,omitempty"` // Attribute: @@ -245,7 +245,7 @@ type Audio struct { // Description: // Indicates if the ad is stitched with audio content or delivered // independently, where 0 = no, 1 = yes. - Stitched int8 `json:"stitched,omitempty"` + Stitched *int8 `json:"stitched,omitempty"` // Attribute: // nvol diff --git a/openrtb2/banner.go b/openrtb2/banner.go index ca87693..d3a5254 100644 --- a/openrtb2/banner.go +++ b/openrtb2/banner.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.6 Object: Banner @@ -170,7 +170,7 @@ type Banner struct { // (Section 3.2.7) in an array of companion ads. Indicates the // companion banner rendering mode relative to the associated // video, where 0 = concurrent, 1 = end-card. - VCm int8 `json:"vcm,omitempty"` + Vcm *int8 `json:"vcm,omitempty"` // Attribute: // ext diff --git a/openrtb2/bid.go b/openrtb2/bid.go index 7a55e68..150211e 100644 --- a/openrtb2/bid.go +++ b/openrtb2/bid.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 4.3.3 Object: Bid diff --git a/openrtb2/bid_request.go b/openrtb2/bid_request.go index 6ba36b5..28c9988 100644 --- a/openrtb2/bid_request.go +++ b/openrtb2/bid_request.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.1 Object: BidRequest diff --git a/openrtb2/bid_request_test.go b/openrtb2/bid_request_test.go index 437749b..76470a6 100644 --- a/openrtb2/bid_request_test.go +++ b/openrtb2/bid_request_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/prebid/openrtb/v19/openrtb2" + . "github.com/prebid/openrtb/v20/openrtb2" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/openrtb2/bid_response.go b/openrtb2/bid_response.go index 451a575..77f7edf 100644 --- a/openrtb2/bid_response.go +++ b/openrtb2/bid_response.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/openrtb3" + "github.com/prebid/openrtb/v20/openrtb3" ) // 4.3.1 Object: BidResponse diff --git a/openrtb2/bid_response_test.go b/openrtb2/bid_response_test.go index f1b9d02..8959fb9 100644 --- a/openrtb2/bid_response_test.go +++ b/openrtb2/bid_response_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/prebid/openrtb/v19/openrtb2" + . "github.com/prebid/openrtb/v20/openrtb2" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/openrtb2/content.go b/openrtb2/content.go index 0c60b29..4034125 100644 --- a/openrtb2/content.go +++ b/openrtb2/content.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.16 Object: Content @@ -205,7 +205,7 @@ type Content struct { // integer // Description: // 0 = not live, 1 = content is live (e.g., stream, live blog). - LiveStream int8 `json:"livestream,omitempty"` + LiveStream *int8 `json:"livestream,omitempty"` // Attribute: // sourcerelationship @@ -213,7 +213,7 @@ type Content struct { // integer // Description: // 0 = indirect, 1 = direct. - SourceRelationship int8 `json:"sourcerelationship,omitempty"` + SourceRelationship *int8 `json:"sourcerelationship,omitempty"` // Attribute: // len @@ -248,7 +248,7 @@ type Content struct { // Description: // Indicator of whether or not the content is embeddable (e.g., // an embeddable video player), where 0 = no, 1 = yes. - Embeddable int8 `json:"embeddable,omitempty"` + Embeddable *int8 `json:"embeddable,omitempty"` // Attribute: // data diff --git a/openrtb2/device.go b/openrtb2/device.go index 4645aed..90e84fa 100644 --- a/openrtb2/device.go +++ b/openrtb2/device.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.18 Object: Device @@ -186,7 +186,7 @@ type Device struct { // integer // Description: // Support for JavaScript, where 0 = no, 1 = yes. - JS int8 `json:"js,omitempty"` + JS *int8 `json:"js,omitempty"` // Attribute: // geofetch @@ -195,7 +195,7 @@ type Device struct { // Description: // Indicates if the geolocation API will be available to JavaScript // code running in the banner, where 0 = no, 1 = yes. - GeoFetch int8 `json:"geofetch,omitempty"` + GeoFetch *int8 `json:"geofetch,omitempty"` // Attribute: // flashver diff --git a/openrtb2/dooh.go b/openrtb2/dooh.go index c37b096..69111ce 100644 --- a/openrtb2/dooh.go +++ b/openrtb2/dooh.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // Object: DOOH diff --git a/openrtb2/geo.go b/openrtb2/geo.go index 184d3bb..1788717 100644 --- a/openrtb2/geo.go +++ b/openrtb2/geo.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.19 Object: Geo @@ -23,7 +23,7 @@ type Geo struct { // float // Description: // Latitude from -90.0 to +90.0, where negative is south. - Lat float64 `json:"lat,omitempty"` + Lat *float64 `json:"lat,omitempty"` // Attribute: // lon @@ -31,7 +31,7 @@ type Geo struct { // float // Description: // Longitude from -180.0 to +180.0, where negative is west. - Lon float64 `json:"lon,omitempty"` + Lon *float64 `json:"lon,omitempty"` // Attribute: // type diff --git a/openrtb2/imp.go b/openrtb2/imp.go index 77030cb..1b1ec1f 100644 --- a/openrtb2/imp.go +++ b/openrtb2/imp.go @@ -142,7 +142,7 @@ type Imp struct { // creative in an app, where 0 = embedded, 1 = native. Note that // the Safari View Controller in iOS 9.x devices is considered a // native browser for purposes of this attribute. - ClickBrowser int8 `json:"clickbrowser,omitempty"` + ClickBrowser *int8 `json:"clickbrowser,omitempty"` // Attribute: // secure diff --git a/openrtb2/metric.go b/openrtb2/metric.go index 444fcbd..c1ca151 100644 --- a/openrtb2/metric.go +++ b/openrtb2/metric.go @@ -22,7 +22,7 @@ type Metric struct { // value // Type: // float; required - // Dscription: + // Description: // Number representing the value of the metric. Probabilities // must be in the range 0.0 – 1.0. Value float64 `json:"value,omitempty"` diff --git a/openrtb2/native.go b/openrtb2/native.go index fa10369..ef40064 100644 --- a/openrtb2/native.go +++ b/openrtb2/native.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.9 Object: Native diff --git a/openrtb2/producer.go b/openrtb2/producer.go index b9157cf..70f9009 100644 --- a/openrtb2/producer.go +++ b/openrtb2/producer.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.17 Object: Producer diff --git a/openrtb2/publisher.go b/openrtb2/publisher.go index 8976568..10c626a 100644 --- a/openrtb2/publisher.go +++ b/openrtb2/publisher.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.15 Object: Publisher diff --git a/openrtb2/qty.go b/openrtb2/qty.go index 3eb8e35..a9d23bd 100644 --- a/openrtb2/qty.go +++ b/openrtb2/qty.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // Object: Qty diff --git a/openrtb2/refresh.go b/openrtb2/refresh.go index 077354c..dae1349 100644 --- a/openrtb2/refresh.go +++ b/openrtb2/refresh.go @@ -19,7 +19,7 @@ type Refresh struct { // integer; recommended // Description: // The number of times this ad slot had been refreshed since last page load. - Count int `json:"count,omitempty"` + Count *int `json:"count,omitempty"` // Attribute: // ext diff --git a/openrtb2/refsettings.go b/openrtb2/refsettings.go index 8cb9af4..45b0007 100644 --- a/openrtb2/refsettings.go +++ b/openrtb2/refsettings.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // Object: RefSettings diff --git a/openrtb2/site.go b/openrtb2/site.go index 2eb1154..876bddb 100644 --- a/openrtb2/site.go +++ b/openrtb2/site.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // Object: Site @@ -107,7 +107,7 @@ type Site struct { // Description: // Indicates if the site has been programmed to optimize layout // when viewed on mobile devices, where 0 = no, 1 = yes. - Mobile int8 `json:"mobile,omitempty"` + Mobile *int8 `json:"mobile,omitempty"` // Attribute: // privacypolicy @@ -115,7 +115,7 @@ type Site struct { // integer // Description: // Indicates if the site has a privacy policy, where 0 = no, 1 = yes. - PrivacyPolicy int8 `json:"privacypolicy,omitempty"` + PrivacyPolicy *int8 `json:"privacypolicy,omitempty"` // Attribute: // publisher diff --git a/openrtb2/source.go b/openrtb2/source.go index 9df3e6d..6867061 100644 --- a/openrtb2/source.go +++ b/openrtb2/source.go @@ -16,7 +16,7 @@ type Source struct { // Description: // Entity responsible for the final impression sale decision, where // 0 = exchange, 1 = upstream source. - FD int8 `json:"fd,omitempty"` + FD *int8 `json:"fd,omitempty"` // Attribute: // tid diff --git a/openrtb2/uid.go b/openrtb2/uid.go index 02089c5..18edf70 100644 --- a/openrtb2/uid.go +++ b/openrtb2/uid.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.28 Object: UID diff --git a/openrtb2/user_agent.go b/openrtb2/user_agent.go index 6fb42df..db21775 100644 --- a/openrtb2/user_agent.go +++ b/openrtb2/user_agent.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.29 Object: UserAgent diff --git a/openrtb2/video.go b/openrtb2/video.go index 7336400..21bb5df 100644 --- a/openrtb2/video.go +++ b/openrtb2/video.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v19/adcom1" + "github.com/prebid/openrtb/v20/adcom1" ) // 3.2.7 Object: Video @@ -112,7 +112,7 @@ type Video struct { // integer; recommended // Description: // Width of the video player in device independent pixels (DIPS). - W int64 `json:"w,omitempty"` + W *int64 `json:"w,omitempty"` // Attribute: // h @@ -120,7 +120,7 @@ type Video struct { // integer; recommended // Description: // Height of the video player in device independent pixels (DIPS). - H int64 `json:"h,omitempty"` + H *int64 `json:"h,omitempty"` // Attribute: // podid @@ -276,7 +276,7 @@ type Video struct { // Type: // integer // Description: - // Minimum bit rate in Kbps. + // Minimum bit rate in Kbps (kilobits per second). MinBitRate int64 `json:"minbitrate,omitempty"` // Attribute: @@ -284,7 +284,7 @@ type Video struct { // Type: // integer // Description: - // Maximum bit rate in Kbps. + // Maximum bit rate in Kbps (kilobits per second). MaxBitRate int64 `json:"maxbitrate,omitempty"` // Attribute: @@ -294,7 +294,7 @@ type Video struct { // Description: // Indicates if letter-boxing of 4:3 content into a 16:9 window is // allowed, where 0 = no, 1 = yes. - BoxingAllowed int8 `json:"boxingallowed,omitempty"` + BoxingAllowed *int8 `json:"boxingallowed,omitempty"` // Attribute: // playbackmethod diff --git a/openrtb3/README.md b/openrtb3/README.md index 103692f..e8fa7da 100644 --- a/openrtb3/README.md +++ b/openrtb3/README.md @@ -1,3 +1,3 @@ -# openrtb3 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/openrtb3?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/openrtb3) +# openrtb3 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/openrtb3?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v20/openrtb3) [OpenRTB](https://iabtechlab.com/standards/openrtb/) [3.0](https://github.com/InteractiveAdvertisingBureau/openrtb) types for [Go programming language](https://golang.org/) diff --git a/openrtb3/openrtb3_test.go b/openrtb3/openrtb3_test.go index 20dd9e3..cf68800 100644 --- a/openrtb3/openrtb3_test.go +++ b/openrtb3/openrtb3_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/prebid/openrtb/v19/openrtb3" + . "github.com/prebid/openrtb/v20/openrtb3" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega"