This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
content.go
285 lines (251 loc) · 6.88 KB
/
content.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
package openrtb2
import (
"encoding/json"
"github.com/mxmCherry/openrtb/v17/adcom1"
)
// 3.2.16 Object: Content
//
// This object describes the content in which the impression will appear, which may be syndicated or nonsyndicated content.
// This object may be useful when syndicated content contains impressions and does not necessarily match the publisher’s general content.
// The exchange might or might not have knowledge of the page where the content is running, as a result of the syndication method.
// For example might be a video impression embedded in an iframe on an unknown web property or device.
type Content struct {
// Attribute:
// id
// Type:
// string
// Description:
// ID uniquely identifying the content.
ID string `json:"id,omitempty"`
// Attribute:
// episode
// Type:
// integer
// Description:
// Episode number.
Episode int64 `json:"episode,omitempty"`
// Attribute:
// title
// Type:
// string
// Description:
// Content title.
// Video Examples: “Search Committee” (television), “A New
// Hope” (movie), or “Endgame” (made for web).
// Non-Video Example: “Why an Antarctic Glacier Is Melting So
// Quickly” (Time magazine article).
Title string `json:"title,omitempty"`
// Attribute:
// series
// Type:
// string
// Description:
// Content series.
// Video Examples: “The Office” (television), “Star Wars” (movie),
// or “Arby ‘N’ The Chief” (made for web).
// Non-Video Example: “Ecocentric” (Time Magazine blog).
Series string `json:"series,omitempty"`
// Attribute:
// season
// Type:
// string
// Description:
// Content season (e.g., “Season 3”).
Season string `json:"season,omitempty"`
// Attribute:
// artist
// Type:
// string
// Description:
// Artist credited with the content.
Artist string `json:"artist,omitempty"`
// Attribute:
// genre
// Type:
// string
// Description:
// Genre that best describes the content (e.g., rock, pop, etc).
Genre string `json:"genre,omitempty"`
// Attribute:
// album
// Type:
// string
// Description:
// Album to which the content belongs; typically for audio.
Album string `json:"album,omitempty"`
// Attribute:
// isrc
// Type:
// string
// Description:
// International Standard Recording Code conforming to ISO-
// 3901.
ISRC string `json:"isrc,omitempty"`
// Attribute:
// producer
// Type:
// object
// Description:
// Details about the content Producer (Section 3.2.17).
Producer *Producer `json:"producer,omitempty"`
// Attribute:
// url
// Type:
// string
// Description:
// URL of the content, for buy-side contextualization or review.
URL string `json:"url,omitempty"`
// Attribute:
// cattax
// Type:
// integer
// Description:
// The taxonomy in use. Refer to the AdCOM list List: Category
// Taxonomies for values.
CatTax adcom1.CategoryTaxonomy `json:"cattax,omitempty"`
// Attribute:
// cat
// Type:
// string array
// Description:
// Array of IAB content categories that describe the content.
// The taxonomy to be used is defined by the cattax field. If no
// cattax field is supplied IAB Content Category Taxonomy 1.0 is
// assumed.
Cat []string `json:"cat,omitempty"`
// Attribute:
// prodq
// Type:
// integer
// Description:
// Production quality. Refer to List: Production Qualities in AdCOM 1.0.
ProdQ *adcom1.ProductionQuality `json:"prodq,omitempty"`
// Attribute:
// videoquality
// Type:
// integer; DEPRECATED; REMOVED in OpenRTB 2.6
// Description:
// Note: Deprecated in favor of prodq.
// Video quality. Refer to List 5.13.
VideoQuality *adcom1.ProductionQuality `json:"videoquality,omitempty"`
// Attribute:
// context
// Type:
// integer
// Description:
// Type of content (game, video, text, etc.). Refer to List: Content
// Contexts in AdCOM 1.0.
Context adcom1.ContentContext `json:"context,omitempty"`
// Attribute:
// contentrating
// Type:
// string
// Description:
// Content rating (e.g., MPAA).
ContentRating string `json:"contentrating,omitempty"`
// Attribute:
// userrating
// Type:
// string
// Description:
// User rating of the content (e.g., number of stars, likes, etc.).
UserRating string `json:"userrating,omitempty"`
// Attribute:
// qagmediarating
// Type:
// integer
// Description:
// Media rating per IQG guidelines. Refer to List: Media Ratings in
// AdCOM 1.0.
QAGMediaRating adcom1.MediaRating `json:"qagmediarating,omitempty"`
// Attribute:
// keywords
// Type:
// string
// Description:
// Comma separated list of keywords describing the content. Only
// one of ‘keywords’ or ‘kwarray’ may be present.
Keywords string `json:"keywords,omitempty"`
// Attribute:
// kwarray
// Type:
// string
// Description:
// Array of keywords about the site. Only one of ‘keywords’ or
// ‘kwarray’ may be present.
KwArray []string `json:"kwarray,omitempty"`
// Attribute:
// livestream
// Type:
// integer
// Description:
// 0 = not live, 1 = content is live (e.g., stream, live blog).
LiveStream int8 `json:"livestream,omitempty"`
// Attribute:
// sourcerelationship
// Type:
// integer
// Description:
// 0 = indirect, 1 = direct.
SourceRelationship int8 `json:"sourcerelationship,omitempty"`
// Attribute:
// len
// Type:
// integer
// Description:
// Length of content in seconds; appropriate for video or audio.
Len int64 `json:"len,omitempty"`
// Attribute:
// language
// Type:
// string
// Description:
// Content language using ISO-639-1-alpha-2. Only one of
// language or langb should be present.
Language string `json:"language,omitempty"`
// Attribute:
// langb
// Type:
// string
// Description:
// Content language using IETF BCP 47. Only one of language or
// langb should be present.
LangB string `json:"langb,omitempty"`
// Attribute:
// embeddable
// Type:
// integer
// 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"`
// Attribute:
// data
// Type:
// object array
// Description:
// Additional content data. Each Data object (Section 3.2.21)
// represents a different data source.
Data []Data `json:"data,omitempty"`
// Attribute:
// network
// Type:
// object
// Description:
// Details about the network (Section 3.2.23) the content is on.
Network *Network `json:"network,omitempty"`
// Attribute:
// channel
// Type:
// object
// Description:
// Details about the channel (Section 3.2.24) the content is on.
Channel *Channel `json:"channel,omitempty"`
// Attribute:
// ext
// Type:
// object
// Description:
// Placeholder for exchange-specific extensions to OpenRTB.
Ext json.RawMessage `json:"ext,omitempty"`
}