Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

Commit 4b4474f

Browse files
committed
Main OpenRTB 2.6 Changes
1 parent a8fef21 commit 4b4474f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1147
-716
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[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/)
44

5-
- [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)
5+
- [openrtb2](openrtb2/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.6](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf)
66
- [openrtb3](openrtb3/) - [OpenRTB](https://iabtechlab.com/standards/openrtb/) [3.0](https://github.com/InteractiveAdvertisingBureau/openrtb)
77
- [adcom1](adcom1/) - [AdCOM](https://iabtechlab.com/standards/openmedia/) [1.0](https://github.com/InteractiveAdvertisingBureau/AdCOM)
88
- [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)

native1/protocol.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package native1
22

3-
// 5.8 Protocols (from OpenRTB spec 2.5)
3+
// 5.8 Protocols (from AdCOM spec 1.0)
44
//
55
// Options for the various bid response protocols that could be supported by an exchange.
66
//
@@ -18,4 +18,8 @@ const (
1818
ProtocolVAST40Wrapper Protocol = 8 // VAST 4.0 Wrapper
1919
ProtocolDAAST10 Protocol = 9 // DAAST 1.0
2020
ProtocolDAAST10Wrapper Protocol = 10 // DAAST 1.0 Wrapper
21+
ProtocolVAST41 Protocol = 11 // VAST 4.1
22+
ProtocolVAST41Wrapper Protocol = 11 // VAST 4.1 Wrapper
23+
ProtocolVAST42 Protocol = 11 // VAST 4.2
24+
ProtocolVAST42Wrapper Protocol = 11 // VAST 4.2 Wrapper
2125
)

openrtb2/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# openrtb2 [![GoDoc](https://godoc.org/github.com/mxmCherry/openrtb/openrtb2?status.svg)](https://pkg.go.dev/github.com/mxmCherry/openrtb/v16/openrtb2)
22

3-
[OpenRTB](https://iabtechlab.com/standards/openrtb/) [2.5](https://iabtechlab.com/wp-content/uploads/2016/07/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) types for [Go programming language](https://golang.org/)
3+
[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/)

openrtb2/ad_position.go

-33
This file was deleted.

openrtb2/api_framework.go

-15
This file was deleted.

openrtb2/app.go

+31-7
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ type App struct {
3030
// Type:
3131
// string
3232
// Description:
33-
// A platform-specific application identifier intended to be
34-
// unique to the app and independent of the exchange. On
35-
// Android, this should be a bundle or package name (e.g.,
36-
// com.foo.mygame). On iOS, it is typically a numeric ID.
33+
// The store ID of the app in an app store. See OTT/CTV Store
34+
// Assigned App Identification Guidelines for more details about
35+
// expected strings for CTV app stores. For mobile apps in
36+
// Google Play Store, these should be bundle or package names
37+
// (e.g. com.foo.mygame). For apps in Apple App Store, these
38+
// should be a numeric ID.
3739
Bundle string `json:"bundle,omitempty"`
3840

3941
// Attribute:
@@ -52,12 +54,23 @@ type App struct {
5254
// App store URL for an installed app; for IQG 2.1 compliance.
5355
StoreURL string `json:"storeurl,omitempty"`
5456

57+
// Attribute:
58+
// cattax
59+
// Type:
60+
// integer; default 1
61+
// Description:
62+
// The taxonomy in use. Refer to the AdCOM list List: Category
63+
// Taxonomies for values.
64+
CatTax int64 `json:"cattax,omitempty"`
65+
5566
// Attribute:
5667
// cat
5768
// Type:
5869
// string array
5970
// Description:
60-
// Array of IAB content categories of the app. Refer to List 5.1
71+
// Array of IAB content categories of the app. The taxonomy to be
72+
// used is defined by the cattax field. If no cattax field is supplied
73+
// IAB Content Category Taxonomy 1.0 is assumed.
6174
Cat []string `json:"cat,omitempty"`
6275

6376
// Attribute:
@@ -66,7 +79,8 @@ type App struct {
6679
// string array
6780
// Description:
6881
// Array of IAB content categories that describe the current
69-
// section of the app. Refer to List 5.1.
82+
// section of the app.
83+
// The taxonomy to be used is defined by the cattax field.
7084
SectionCat []string `json:"sectioncat,omitempty"`
7185

7286
// Attribute:
@@ -75,7 +89,8 @@ type App struct {
7589
// string array
7690
// Description:
7791
// Array of IAB content categories that describe the current page
78-
// or view of the app. Refer to List 5.1.
92+
// or view of the app.
93+
// The taxonomy to be used is defined by the cattax field.
7994
PageCat []string `json:"pagecat,omitempty"`
8095

8196
// Attribute:
@@ -126,6 +141,15 @@ type App struct {
126141
// Comma separated list of keywords about the app.
127142
Keywords string `json:"keywords,omitempty"`
128143

144+
// Attribute:
145+
// kwarray
146+
// Type:
147+
// string
148+
// Description:
149+
// Array of keywords about the site. Only one of ‘keywords’ or
150+
// ‘kwarray’ may be present.
151+
KwArray []string `json:"kwarray,omitempty"`
152+
129153
// Attribute:
130154
// ext
131155
// Type:

openrtb2/audio.go

+95-23
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type Audio struct {
2525
// Attribute:
2626
// minduration
2727
// Type:
28-
// integer; recommended
28+
// integer; default 0; recommended
2929
// Description:
3030
// Minimum audio ad duration in seconds.
3131
MinDuration int64 `json:"minduration,omitempty"`
@@ -38,40 +38,112 @@ type Audio struct {
3838
// Maximum audio ad duration in seconds.
3939
MaxDuration int64 `json:"maxduration,omitempty"`
4040

41+
// Attribute:
42+
// poddur
43+
// Type:
44+
// integer; recommended
45+
// Description:
46+
// Indicates the total amount of time that advertisers may fill for a
47+
// "dynamic" audio ad pod, or the dynamic portion of a "hybrid"
48+
// ad pod. This field is required only for the dynamic portion(s) of
49+
// audio ad pods. This field refers to the length of the entire ad
50+
// break, whereas minduration/maxduration/rqddurs are
51+
// constraints relating to the slots that make up the pod.
52+
PodDur int64 `json:"poddur,omitempty"`
53+
4154
// Attribute:
4255
// protocols
4356
// Type:
4457
// integer array; recommended
4558
// Description:
46-
// Array of supported audio protocols. Refer to List 5.8.
47-
Protocols []Protocol `json:"protocols,omitempty"`
59+
// Array of supported audio protocols. Refer to List: Creative
60+
// Subtypes - Audio/Video in AdCOM 1.0.
61+
Protocols []int8 `json:"protocols,omitempty"`
4862

4963
// Attribute:
5064
// startdelay
5165
// Type:
5266
// integer; recommended
5367
// Description:
5468
// Indicates the start delay in seconds for pre-roll, mid-roll, or
55-
// post-roll ad placements. Refer to List 5.12.
56-
StartDelay *StartDelay `json:"startdelay,omitempty"`
69+
// post-roll ad placements. Refer to List: Start Delay Modes in
70+
// AdCOM 1.0.
71+
StartDelay *int8 `json:"startdelay,omitempty"`
5772

5873
// Attribute:
59-
// sequence
74+
// rqddurs
75+
// Type:
76+
// integer array
77+
// Description:
78+
// Precise acceptable durations for audio creatives in seconds. This
79+
// field specifically targets the live audio/radio use case where
80+
// non-exact ad durations would result in undesirable ‘dead air’.
81+
// This field is mutually exclusive with minduration and
82+
// maxduration; if rqddurs is specified, minduration and
83+
// maxduration must not be specified and vice versa.
84+
RqdDurs []int64 `json:"rqddurs,omitempty"`
85+
86+
// Attribute:
87+
// podid
6088
// Type:
6189
// integer
6290
// Description:
91+
// Unique identifier indicating that an impression opportunity
92+
// belongs to an audioad pod. If multiple impression opportunities
93+
// within a bid request share the same podid, this indicates that
94+
// those impression opportunities belong to the same audio ad
95+
// pod.
96+
PodID int64 `json:"podid,omitempty"`
97+
98+
// Attribute:
99+
// podid
100+
// Type:
101+
// integer; default 0
102+
// Description:
103+
// The sequence (position) of the audio ad pod within a
104+
// content stream. Refer to List: Pod Sequence in AdCOM 1.0
105+
// for guidance on the use of this field.
106+
PodSeq int8 `json:"podseq,omitempty"`
107+
108+
// Attribute:
109+
// sequence
110+
// Type:
111+
// integer; default 0; DEPRECATED
112+
// Description:
63113
// If multiple ad impressions are offered in the same bid request,
64114
// the sequence number will allow for the coordinated delivery
65115
// of multiple creatives.
66116
Sequence int64 `json:"sequence,omitempty"`
67117

118+
// Attribute:
119+
// slotinpod
120+
// Type:
121+
// integer; default 0
122+
// Description:
123+
// For audio ad pods, this value indicates that the seller can
124+
// guarantee delivery against the indicated sequence. Refer to
125+
// List: Slot Position in Pod in AdCOM 1.0 for guidance on the
126+
// use of this field.
127+
SlotInPod *int8 `json:"slotinpod,omitempty"`
128+
129+
// Attribute:
130+
// mincpmpersec
131+
// Type:
132+
// float
133+
// Description:
134+
// Minimum CPM per second. This is a price floor for the
135+
// "dynamic" portion of an audio ad pod, relative to the duration
136+
// of bids an advertiser may submit.
137+
MinCPMPerSec float64 `json:"mincpmpersec,omitempty"`
138+
68139
// Attribute:
69140
// battr
70141
// Type:
71142
// integer array
72143
// Description:
73-
// Blocked creative attributes. Refer to List 5.3.
74-
BAttr []CreativeAttribute `json:"battr,omitempty"`
144+
// Blocked creative attributes. Refer to List: Creative Attributes in
145+
// AdCOM 1.0.
146+
BAttr []int64 `json:"battr,omitempty"`
75147

76148
// Attribute:
77149
// maxextended
@@ -107,8 +179,9 @@ type Audio struct {
107179
// integer array
108180
// Description:
109181
// Supported delivery methods (e.g., streaming, progressive). If
110-
// none specified, assume all are supported. Refer to List 5.15.
111-
Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
182+
// none specified, assume all are supported. Refer to List: Delivery
183+
// Methods in AdCOM 1.0.
184+
Delivery []int8 `json:"delivery,omitempty"`
112185

113186
// Attribute:
114187
// companionad
@@ -125,37 +198,35 @@ type Audio struct {
125198
// integer array
126199
// Description:
127200
// List of supported API frameworks for this impression. Refer to
128-
// List 5.6. If an API is not explicitly listed, it is assumed not to be
129-
// supported.
130-
API []APIFramework `json:"api,omitempty"`
201+
// List: API Frameworks in AdCOM 1.0. If an API is not explicitly
202+
// listed, it is assumed not to be supported.
203+
API []int64 `json:"api,omitempty"`
131204

132205
// Attribute:
133206
// companiontype
134207
// Type:
135208
// integer array
136209
// Description:
137-
// Supported DAAST companion ad types. Refer to List 5.14.
138-
// Recommended if companion Banner objects are included via
139-
// the companionad array.
140-
CompanionType []CompanionType `json:"companiontype,omitempty"`
210+
// Supported companion ad types. Refer to List: Companion
211+
// Types in AdCOM 1.0. Recommended if companion Banner
212+
// objects are included via the companionad array.
213+
CompanionType []int8 `json:"companiontype,omitempty"`
141214

142215
// Attribute:
143216
// maxseq
144217
// Type:
145218
// integer
146219
// Description:
147220
// The maximum number of ads that can be played in an ad pod.
148-
// OpenRTB API Specification Version 2.5 IAB Technology Lab
149-
// www.iab.com/openrtb Page 18
150221
MaxSeq int64 `json:"maxseq,omitempty"`
151222

152223
// Attribute:
153224
// feed
154225
// Type:
155226
// integer
156227
// Description:
157-
// Type of audio feed. Refer to List 5.16.
158-
Feed FeedType `json:"feed,omitempty"`
228+
// Type of audio feed. Refer to List: Feed Types in AdCOM 1.0.
229+
Feed int8 `json:"feed,omitempty"`
159230

160231
// Attribute:
161232
// stitched
@@ -171,8 +242,9 @@ type Audio struct {
171242
// Type:
172243
// integer
173244
// Description:
174-
// Volume normalization mode. Refer to List 5.17.
175-
NVol *VolumeNormalizationMode `json:"nvol,omitempty"`
245+
// Volume normalization mode. Refer to List: Volume
246+
// Normalization Modes in AdCOM 1.0.
247+
NVol int8 `json:"nvol,omitempty"`
176248

177249
// Attribute:
178250
// ext

0 commit comments

Comments
 (0)