From 53ac1b9ca7ddf860988ff69bf5018b32ced1fbc5 Mon Sep 17 00:00:00 2001 From: Scott Kay Date: Wed, 12 Apr 2023 08:54:55 -0400 Subject: [PATCH] ORTB + AdCOM 202303 Updates (#8) * ORTB + AdCOM 202303 Updates * Bump Major Version * Copy Paste Errors * Fix Mod File * Keep On 1.16 * Revert Go Mod Version * Rename plcmnt to plcmt To Align With Native * Final Spec Updates * Fix VideoPlcmtNoContent * Update Category Taxonomies --- README.md | 20 +++++++-------- adcom1/README.md | 2 +- adcom1/adcom1_test.go | 2 +- adcom1/auto_refresh_trigger.go | 12 +++++++++ adcom1/category_taxonomy.go | 13 +++++----- adcom1/feed_type.go | 14 +++++++---- adcom1/video_placement.go | 2 +- adcom1/video_placement_subtype.go | 13 ++++++---- adcom1/video_plcmt_subtype.go | 37 +++++++++++++++++++++++++++ go.mod | 4 +-- native1/README.md | 2 +- native1/request/README.md | 2 +- native1/request/data.go | 2 +- native1/request/event_tracker.go | 2 +- native1/request/image.go | 2 +- native1/request/request.go | 2 +- native1/request/request_test.go | 2 +- native1/request/video.go | 2 +- native1/response/README.md | 2 +- native1/response/data.go | 2 +- native1/response/event_tracker.go | 2 +- native1/response/image.go | 2 +- native1/response/response_test.go | 2 +- openrtb2/README.md | 2 +- openrtb2/app.go | 2 +- openrtb2/audio.go | 2 +- openrtb2/banner.go | 2 +- openrtb2/bid.go | 2 +- openrtb2/bid_request.go | 2 +- openrtb2/bid_request_test.go | 2 +- openrtb2/bid_response.go | 2 +- openrtb2/bid_response_test.go | 2 +- openrtb2/content.go | 2 +- openrtb2/device.go | 2 +- openrtb2/dooh.go | 2 +- openrtb2/geo.go | 2 +- openrtb2/imp.go | 10 +++++++- openrtb2/native.go | 2 +- openrtb2/producer.go | 2 +- openrtb2/publisher.go | 2 +- openrtb2/qty.go | 14 ++++++++++- openrtb2/refresh.go | 31 +++++++++++++++++++++++ openrtb2/refsettings.go | 42 +++++++++++++++++++++++++++++++ openrtb2/site.go | 2 +- openrtb2/uid.go | 2 +- openrtb2/user_agent.go | 2 +- openrtb2/video.go | 12 +++++++-- openrtb3/README.md | 2 +- openrtb3/openrtb3_test.go | 2 +- 49 files changed, 226 insertions(+), 70 deletions(-) create mode 100644 adcom1/auto_refresh_trigger.go create mode 100644 adcom1/video_plcmt_subtype.go create mode 100644 openrtb2/refresh.go create mode 100644 openrtb2/refsettings.go diff --git a/README.md b/README.md index 5f30730..fad481f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# openrtb [![Go Reference](https://pkg.go.dev/badge/github.com/prebid/openrtb/v18.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v18) [![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/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](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/) -- [openrtb2](openrtb2/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), [2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_FINAL.pdf) +- [openrtb2](openrtb2/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), [2.6](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md) - [openrtb3](openrtb3/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [3.0](https://github.com/InteractiveAdvertisingBureau/openrtb) (can lag behind because official spec is constantly updated without version bump, feel free to PR) - [adcom1](adcom1/) - [AdCOM](https://iabtechlab.com/standards/openmedia/) [1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM) (can lag behind because official spec is constantly updated without version bump, feel free to PR) - [native1](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) @@ -14,19 +14,19 @@ This library uses [Go modules](https://golang.org/ref/mod) ([tl;dr](https://blog # Using ```bash -go get -u "github.com/prebid/openrtb/v18/..." +go get -u "github.com/prebid/openrtb/v19/..." ``` ```go import ( - openrtb2 "github.com/prebid/openrtb/v18/openrtb2" + openrtb2 "github.com/prebid/openrtb/v19/openrtb2" - openrtb3 "github.com/prebid/openrtb/v18/openrtb3" - adcom1 "github.com/prebid/openrtb/v18/adcom1" + openrtb3 "github.com/prebid/openrtb/v19/openrtb3" + adcom1 "github.com/prebid/openrtb/v19/adcom1" - native1 "github.com/prebid/openrtb/v18/native1" - nreq "github.com/prebid/openrtb/v18/native1/request" - nres "github.com/prebid/openrtb/v18/native1/response" + native1 "github.com/prebid/openrtb/v19/native1" + nreq "github.com/prebid/openrtb/v19/native1/request" + nres "github.com/prebid/openrtb/v19/native1/response" ) ``` @@ -63,7 +63,7 @@ Pointer | Omitempty | When to use 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/v18)) +## Documentation ([pkg.go.dev](https://pkg.go.dev/github.com/prebid/openrtb/v19)) - [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 cecfb7c..2729b89 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/v18/adcom1) +# adcom1 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/adcom1?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/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 3ac8de9..0646989 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/v18/adcom1" + . "github.com/prebid/openrtb/v19/adcom1" ) var _ = DescribeTable( diff --git a/adcom1/auto_refresh_trigger.go b/adcom1/auto_refresh_trigger.go new file mode 100644 index 0000000..a225eb4 --- /dev/null +++ b/adcom1/auto_refresh_trigger.go @@ -0,0 +1,12 @@ +package adcom1 + +// AutoRefreshTrigger represents a list of triggers that result in an ad slot refreshing. +type AutoRefreshTrigger int8 + +// Triggers support by a placement or required by an ad. +const ( + AutoRefreshTriggerUnknown AutoRefreshTrigger = 0 + AutoRefreshTriggerUserAction AutoRefreshTrigger = 1 // Refresh triggered by user-initiated action such as scrolling. + AutoRefreshTriggerEvent AutoRefreshTrigger = 2 // Event-driven content change. For example, ads refresh when the football game score changes on the page. + AutoRefreshTriggerTime AutoRefreshTrigger = 3 // Time-based refresh. Ads refresh on a predefined time interval even without user activity. +) diff --git a/adcom1/category_taxonomy.go b/adcom1/category_taxonomy.go index 02cac18..0b6517f 100644 --- a/adcom1/category_taxonomy.go +++ b/adcom1/category_taxonomy.go @@ -7,10 +7,11 @@ type CategoryTaxonomy int64 // // Values of 500+ hold vendor-specific codes. const ( - CatTaxIABContent10 CategoryTaxonomy = 1 // 1 IAB Content Category Taxonomy 1.0. - CatTaxIABContent20 CategoryTaxonomy = 2 // 2 IAB Content Category Taxonomy 2.0: www.iab.com/guidelines/taxonomy - CatTaxIABProduct10 CategoryTaxonomy = 3 // 3 IAB Ad Product Taxonomy 1.0. - CatTaxIABAudience11 CategoryTaxonomy = 4 // 4 IAB Audience Taxonomy 1.1. - CatTaxIABContent21 CategoryTaxonomy = 5 // 5 IAB Content Category Taxonomy 2.1. - CatTaxIABContent22 CategoryTaxonomy = 6 // 6 IAB Content Category Taxonomy 2.2 + CatTaxIABContent10 CategoryTaxonomy = 1 // IAB Tech Lab Content Category Taxonomy 1.0: Deprecated, and recommend NOT be used since it does not have SCD flags. + CatTaxIABContent20 CategoryTaxonomy = 2 // IAB Tech Lab Content Category Taxonomy 2.0: Deprecated, and recommend NOT be used since it does not have SCD flags. + CatTaxIABProduct10 CategoryTaxonomy = 3 // IAB Tech Lab Ad Product Taxonomy 1.0. + CatTaxIABAudience11 CategoryTaxonomy = 4 // IAB Tech Lab Audience Taxonomy 1.1. + CatTaxIABContent21 CategoryTaxonomy = 5 // IAB Tech Lab Content Category Taxonomy 2.1. + CatTaxIABContent22 CategoryTaxonomy = 6 // IAB Tech Lab Content Category Taxonomy 2.2. + CatTaxIABContent30 CategoryTaxonomy = 7 // IAB Tech Lab Content Category Taxonomy 3.0. ) diff --git a/adcom1/feed_type.go b/adcom1/feed_type.go index 1452278..65b3110 100644 --- a/adcom1/feed_type.go +++ b/adcom1/feed_type.go @@ -1,11 +1,15 @@ package adcom1 -// FeedType represents types of feeds, typically for audio. +// FeedType represents types of feeds for audio. type FeedType int8 -// Types of feeds, typically for audio. +// Types of feeds for audio content. const ( - FeedMusicService FeedType = 1 // Music Service - FeedRadioBroadcast FeedType = 2 // FM/AM Broadcast - FeedPodcast FeedType = 3 // Podcast + FeedMusicService FeedType = 1 // AOD - Music Streaming Service + FeedRadioBroadcast FeedType = 2 // LIVE - FM/AM broadcast: Live content broadcast over the air but also available via online streaming. + FeedPodcast FeedType = 3 // AOD - Podcast: Original, pre-recorded content distributed as episodes in a series. + FeedCatchUpRadio FeedType = 4 // AOD - Catch-up Radio: recorded segment of a radio show that was originally broadcast live. + FeedWebRadio FeedType = 5 // LIVE - Web Radio: Live content only available via online streaming, not as AM/FM broadcast. + FeedVideoGame FeedType = 6 // MISC - Video Game: Background audio in video games. + FeedTextToSpeech FeedType = 7 // MISC - Text To Speech: Audio books, website plugin that can read article. ) diff --git a/adcom1/video_placement.go b/adcom1/video_placement.go index e21bea7..2243b83 100644 --- a/adcom1/video_placement.go +++ b/adcom1/video_placement.go @@ -12,7 +12,7 @@ type VideoPlacement struct { // integer // Definition: // Placement subtype. - // Refer to List: Placement Subtypes - Video. + // Refer to List: Plcmt Subtypes - Video. PType VideoPlacementSubtype `json:"ptype,omitempty"` // Attribute: diff --git a/adcom1/video_placement_subtype.go b/adcom1/video_placement_subtype.go index 5889675..68ebf53 100644 --- a/adcom1/video_placement_subtype.go +++ b/adcom1/video_placement_subtype.go @@ -1,13 +1,16 @@ package adcom1 // VideoPlacementSubtype represents types of video placements derived largely from the IAB Digital Video Guidelines. +// To be sent using the placement attribute in the Video object. +// DEPRECATED AS OF OPENRTB 2.6-202303. +// Proposed removal of this list and associated attribute in 2024. type VideoPlacementSubtype int8 // Types of video placements derived largely from the IAB Digital Video Guidelines. const ( - VideoInStream VideoPlacementSubtype = 1 // In-Stream: Played before, during or after the streaming video content that the consumer has requested (e.g., Pre-roll, Mid-roll, Post-roll). - VideoInBanner VideoPlacementSubtype = 2 // In-Banner: Exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. - VideoInArticle VideoPlacementSubtype = 3 // In-Article: Loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. - VideoInFeed VideoPlacementSubtype = 4 // In-Feed: Found in content, social, or product feeds. - VideoAlwaysVisible VideoPlacementSubtype = 5 // Interstitial/Slider/Floating: Covers the entire or a portion of screen area, but is always on screen while displayed (i.e. cannot be scrolled out of view). + VideoPlacementInStream VideoPlacementSubtype = 1 // In-Stream: Played before, during or after the streaming video content that the consumer has requested (e.g., Pre-roll, Mid-roll, Post-roll). + VideoPlacementInBanner VideoPlacementSubtype = 2 // In-Banner: Exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. + VideoPlacementInArticle VideoPlacementSubtype = 3 // In-Article: Loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. + VideoPlacementInFeed VideoPlacementSubtype = 4 // In-Feed: Found in content, social, or product feeds. + VideoPlacementAlwaysVisible VideoPlacementSubtype = 5 // Interstitial/Slider/Floating: Covers the entire or a portion of screen area, but is always on screen while displayed (i.e. cannot be scrolled out of view). ) diff --git a/adcom1/video_plcmt_subtype.go b/adcom1/video_plcmt_subtype.go new file mode 100644 index 0000000..26f94c3 --- /dev/null +++ b/adcom1/video_plcmt_subtype.go @@ -0,0 +1,37 @@ +package adcom1 + +// VideoPlacementSubtype represents the the various types of video placements in accordance with updated IAB Digital Video Guidelines. +// To be sent using the plcmt attribute in Video object. +type VideoPlcmtSubtype int8 + +// Types of video placements derived largely from the IAB Digital Video Guidelines. +const ( + // VideoPlcmtInstream represents pre-roll, mid-roll, and post-roll ads that are played + // before, during or after the streaming video content that the consumer has requested. + // Instream video must be set to “sound on” by default at player start, or have + // explicitly clear user intent to watch the video content. While there may be other + // content surrounding the player, the video content must be the focus of the user’s + // visit. It should remain the primary content on the page and the only video player + // in-view capable of audio when playing. If the player converts to floating/sticky + // subsequent ad calls should accurately convey the updated player size. + VideoPlcmtInstream VideoPlcmtSubtype = 1 + + // VideoPlcmtAccompanyingContent represents pre-roll, mid-roll, and post-roll ads that + // are played before, during, or after streaming video content. The video player loads + // and plays before, between, or after paragraphs of text or graphical content, and + // starts playing only when it enters the viewport. Accompanying content should only + // start playback upon entering the viewport. It may convert to a floating/sticky player + // as it scrolls off the page. + VideoPlcmtAccompanyingContent VideoPlcmtSubtype = 2 + + // VideoPlcmtInterstitial represents video ads that are played without video content. + // During playback, it must be the primary focus of the page and take up the majority + // of the viewport and cannot be scrolled out of view. This can be in placements like + // in-app video or slideshows. + VideoPlcmtInterstitial VideoPlcmtSubtype = 3 + + // VideoPlcmtNoContext represents no content / standalone video ads that are played + // without streaming video content. This can be in placements like slideshows, native + // feeds, in-content or sticky/floating. + VideoPlcmtNoContent VideoPlcmtSubtype = 4 +) diff --git a/go.mod b/go.mod index 8909dfe..d61388c 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,7 @@ -module github.com/prebid/openrtb/v18 +module github.com/prebid/openrtb/v19 go 1.16 -retract v18.0.0 // Published with the wrong module version. - require ( github.com/onsi/ginkgo v1.16.1 github.com/onsi/gomega v1.11.0 diff --git a/native1/README.md b/native1/README.md index 1db7cbd..c3625c3 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/v18/native1) +# native1 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/native1?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/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 216c508..b02269f 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/v18/native1/request) +# 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) [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 c020850..838b081 100644 --- a/native1/request/data.go +++ b/native1/request/data.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 4.6 Data Object diff --git a/native1/request/event_tracker.go b/native1/request/event_tracker.go index 97882ec..9d09c10 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/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 4.7 Event Trackers Request Object diff --git a/native1/request/image.go b/native1/request/image.go index 2a9f497..0dc64b2 100644 --- a/native1/request/image.go +++ b/native1/request/image.go @@ -3,7 +3,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 4.4 Image Object diff --git a/native1/request/request.go b/native1/request/request.go index 993759c..c204410 100644 --- a/native1/request/request.go +++ b/native1/request/request.go @@ -8,7 +8,7 @@ package request import ( "encoding/json" - "github.com/prebid/openrtb/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 4.1 Native Markup Request Object diff --git a/native1/request/request_test.go b/native1/request/request_test.go index 63a9ca4..f96bf4a 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/v18/native1/request" + . "github.com/prebid/openrtb/v19/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 8c2c963..27fa839 100644 --- a/native1/request/video.go +++ b/native1/request/video.go @@ -1,7 +1,7 @@ package request import ( - "github.com/prebid/openrtb/v18/openrtb2" + "github.com/prebid/openrtb/v19/openrtb2" ) // 4.5 Video Object diff --git a/native1/response/README.md b/native1/response/README.md index c08ca7f..fbe2a4e 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/v18/native1/response) +# 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) [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 6650e1a..1465287 100644 --- a/native1/response/data.go +++ b/native1/response/data.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/prebid/openrtb/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 5.5 Object: Data diff --git a/native1/response/event_tracker.go b/native1/response/event_tracker.go index 7671420..646d0b5 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/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 5.8 Event Tracker Response Object diff --git a/native1/response/image.go b/native1/response/image.go index 1085952..65dc1c7 100644 --- a/native1/response/image.go +++ b/native1/response/image.go @@ -3,7 +3,7 @@ package response import ( "encoding/json" - "github.com/prebid/openrtb/v18/native1" + "github.com/prebid/openrtb/v19/native1" ) // 5.4 Object: Image diff --git a/native1/response/response_test.go b/native1/response/response_test.go index a87ce00..e77cc3b 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/v18/native1/response" + . "github.com/prebid/openrtb/v19/native1/response" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/openrtb2/README.md b/openrtb2/README.md index 2a8583b..977baf8 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/v18/openrtb2) +# openrtb2 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/openrtb2?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/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 f748a31..5f51f8a 100644 --- a/openrtb2/app.go +++ b/openrtb2/app.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // Object: App diff --git a/openrtb2/audio.go b/openrtb2/audio.go index c71ce25..d112223 100644 --- a/openrtb2/audio.go +++ b/openrtb2/audio.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.8 Object: Audio diff --git a/openrtb2/banner.go b/openrtb2/banner.go index 078ba72..ca87693 100644 --- a/openrtb2/banner.go +++ b/openrtb2/banner.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.6 Object: Banner diff --git a/openrtb2/bid.go b/openrtb2/bid.go index e23282d..7a55e68 100644 --- a/openrtb2/bid.go +++ b/openrtb2/bid.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 4.3.3 Object: Bid diff --git a/openrtb2/bid_request.go b/openrtb2/bid_request.go index a0d1318..6ba36b5 100644 --- a/openrtb2/bid_request.go +++ b/openrtb2/bid_request.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.1 Object: BidRequest diff --git a/openrtb2/bid_request_test.go b/openrtb2/bid_request_test.go index 41e84d6..437749b 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/v18/openrtb2" + . "github.com/prebid/openrtb/v19/openrtb2" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/openrtb2/bid_response.go b/openrtb2/bid_response.go index 3de0cc8..451a575 100644 --- a/openrtb2/bid_response.go +++ b/openrtb2/bid_response.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/openrtb3" + "github.com/prebid/openrtb/v19/openrtb3" ) // 4.3.1 Object: BidResponse diff --git a/openrtb2/bid_response_test.go b/openrtb2/bid_response_test.go index 4ff98a2..f1b9d02 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/v18/openrtb2" + . "github.com/prebid/openrtb/v19/openrtb2" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/openrtb2/content.go b/openrtb2/content.go index 47768e9..0c60b29 100644 --- a/openrtb2/content.go +++ b/openrtb2/content.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.16 Object: Content diff --git a/openrtb2/device.go b/openrtb2/device.go index ca61bf7..4645aed 100644 --- a/openrtb2/device.go +++ b/openrtb2/device.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.18 Object: Device diff --git a/openrtb2/dooh.go b/openrtb2/dooh.go index a7ddbc9..c37b096 100644 --- a/openrtb2/dooh.go +++ b/openrtb2/dooh.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // Object: DOOH diff --git a/openrtb2/geo.go b/openrtb2/geo.go index 64fef05..184d3bb 100644 --- a/openrtb2/geo.go +++ b/openrtb2/geo.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.19 Object: Geo diff --git a/openrtb2/imp.go b/openrtb2/imp.go index 2109c9e..77030cb 100644 --- a/openrtb2/imp.go +++ b/openrtb2/imp.go @@ -19,7 +19,7 @@ type Imp struct { // string; required // Description: // A unique identifier for this impression within the context of - // the bid request (typically, starts with 1 and increments. + // the bid request (typically, starts with 1 and increments). ID string `json:"id"` // Attribute: @@ -218,6 +218,14 @@ type Imp struct { // the epoch). DT float64 `json:"dt,omitempty"` + // Attribute: + // refresh + // Type: + // object + // Description: + // Details about ad slots being refreshed automatically. (Section 3.2.33) + Refresh *Refresh `json:"refresh,omitempty"` + // Attribute: // ext // Type: diff --git a/openrtb2/native.go b/openrtb2/native.go index 3edd1d8..fa10369 100644 --- a/openrtb2/native.go +++ b/openrtb2/native.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.9 Object: Native diff --git a/openrtb2/producer.go b/openrtb2/producer.go index a848501..b9157cf 100644 --- a/openrtb2/producer.go +++ b/openrtb2/producer.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.17 Object: Producer diff --git a/openrtb2/publisher.go b/openrtb2/publisher.go index 4aa0ba5..8976568 100644 --- a/openrtb2/publisher.go +++ b/openrtb2/publisher.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.15 Object: Publisher diff --git a/openrtb2/qty.go b/openrtb2/qty.go index 350322a..3eb8e35 100644 --- a/openrtb2/qty.go +++ b/openrtb2/qty.go @@ -1,6 +1,10 @@ package openrtb2 -import "github.com/prebid/openrtb/v18/adcom1" +import ( + "encoding/json" + + "github.com/prebid/openrtb/v19/adcom1" +) // Object: Qty // @@ -36,4 +40,12 @@ type Qty struct { // The top level business domain name of the measurement vendor providing // the quantity measurement. Vendor string `json:"vendor,omitempty"` + + // Attribute: + // ext + // Type: + // object + // Definition: + // Placeholder for vendor specific extensions to this object. + Ext json.RawMessage `json:"ext,omitempty"` } diff --git a/openrtb2/refresh.go b/openrtb2/refresh.go new file mode 100644 index 0000000..077354c --- /dev/null +++ b/openrtb2/refresh.go @@ -0,0 +1,31 @@ +package openrtb2 + +import "encoding/json" + +// Object: Refresh +type Refresh struct { + // Attribute: + // refsettings + // Type: + // object array; recommended + // Description: + // A RefSettings object (see Section 3.2.34) describing the mechanics + // of how an ad placement automatically refreshes. + RefSettings []RefSettings `json:"refsettings,omitempty"` + + // Attribute: + // count + // Type: + // integer; recommended + // Description: + // The number of times this ad slot had been refreshed since last page load. + Count int `json:"count,omitempty"` + + // Attribute: + // ext + // Type: + // object + // Definition: + // Placeholder for vendor specific extensions to this object. + Ext json.RawMessage `json:"ext,omitempty"` +} diff --git a/openrtb2/refsettings.go b/openrtb2/refsettings.go new file mode 100644 index 0000000..8cb9af4 --- /dev/null +++ b/openrtb2/refsettings.go @@ -0,0 +1,42 @@ +package openrtb2 + +import ( + "encoding/json" + + "github.com/prebid/openrtb/v19/adcom1" +) + +// Object: RefSettings +// +// Information on how often and what triggers an ad slot being refreshed. +type RefSettings struct { + // Attribute: + // reftype + // Type: + // integer; default 0; recommended + // Description: + // The type of the declared auto refresh. + // Refer to List: Auto Refresh Triggers in AdCOM 1.0 + RefType adcom1.AutoRefreshTrigger `json:"reftype,omitempty"` + + // Attribute: + // minint + // Type: + // integer; recommended + // Description: + // The minimum refresh interval in seconds. This applies to all + // refresh types. This is the (uninterrupted) time the ad creative + // will be rendered before refreshing to the next creative. If + // the field is absent, the exposure time is unknown. This field + // does not account for viewability or external factors such as a + // user leaving a page. + MinInt int `json:"minint,omitempty"` + + // Attribute: + // ext + // Type: + // object + // Definition: + // Placeholder for vendor specific extensions to this object. + Ext json.RawMessage `json:"ext,omitempty"` +} diff --git a/openrtb2/site.go b/openrtb2/site.go index a52f5c0..2eb1154 100644 --- a/openrtb2/site.go +++ b/openrtb2/site.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // Object: Site diff --git a/openrtb2/uid.go b/openrtb2/uid.go index bfc1b83..02089c5 100644 --- a/openrtb2/uid.go +++ b/openrtb2/uid.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.28 Object: UID diff --git a/openrtb2/user_agent.go b/openrtb2/user_agent.go index 4488d69..6fb42df 100644 --- a/openrtb2/user_agent.go +++ b/openrtb2/user_agent.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.29 Object: UserAgent diff --git a/openrtb2/video.go b/openrtb2/video.go index fb95a95..7336400 100644 --- a/openrtb2/video.go +++ b/openrtb2/video.go @@ -3,7 +3,7 @@ package openrtb2 import ( "encoding/json" - "github.com/prebid/openrtb/v18/adcom1" + "github.com/prebid/openrtb/v19/adcom1" ) // 3.2.7 Object: Video @@ -160,12 +160,20 @@ type Video struct { // Attribute: // placement // Type: - // integer + // integer; DEPRECATED // Description: // Video placement type for the impression. Refer to List: // Placement Subtypes - Video in AdCOM 1.0. Placement adcom1.VideoPlacementSubtype `json:"placement,omitempty"` + // Attribute: + // plcmt + // Type: + // integer + // Description: + // Video placement type for the impression. Refer to List: Plcmt Subtypes - Video in AdCOM 1.0. + Plcmt adcom1.VideoPlcmtSubtype `json:"plcmt,omitempty"` + // Attribute: // linearity // Type: diff --git a/openrtb3/README.md b/openrtb3/README.md index abcd250..103692f 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/v18/openrtb3) +# openrtb3 [![GoDoc](https://godoc.org/github.com/prebid/openrtb/openrtb3?status.svg)](https://pkg.go.dev/github.com/prebid/openrtb/v19/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 17b16bc..20dd9e3 100644 --- a/openrtb3/openrtb3_test.go +++ b/openrtb3/openrtb3_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/prebid/openrtb/v18/openrtb3" + . "github.com/prebid/openrtb/v19/openrtb3" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega"