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
/
display.go
137 lines (122 loc) · 4.06 KB
/
display.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
package adcom1
import "encoding/json"
// Display object provides additional detail about an ad specifically for display ads.
// There are multiple attributes for specifying creative details: banner for simple banner images native for native ads, adm for including general markup, and curl for referencing general markup via URL.
// In any given Display object, only one of these attributes should be used to avoid confusion.
// To the extent feasible, structured objects should be favored over general markup for quality and safety issues.
type Display struct {
// Attribute:
// mime
// Type:
// string
// Definition:
// Mime type of the ad (e.g., “image/jpeg”).
MIME string `json:"mime,omitempty"`
// Attribute:
// api
// Type:
// integer array
// Definition:
// API required by the ad if applicable.
// Refer to List: API Frameworks.
API []APIFramework `json:"api,omitempty"`
// Attribute:
// ctype
// Type:
// integer
// Definition:
// Subtype of display creative.
// Refer to List: Creative Subtypes - Display.
CType DisplayCreativeSubtype `json:"ctype,omitempty"`
// Attribute:
// w
// Type:
// integer
// 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 int64 `json:"w,omitempty"`
// Attribute:
// h
// Type:
// integer
// 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 int64 `json:"h,omitempty"`
// Attribute:
// wratio
// Type:
// integer
// Definition:
// Relative width of the creative when expressing size as a ratio, typically for non-native ads.
// Note that mixing absolute and relative sizes is not recommended.
// Dev note:
// This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
WRatio int8 `json:"wratio,omitempty"`
// Attribute:
// hratio
// Type:
// integer
// Definition:
// Relative height of the creative when expressing size as a ratio, typically for non-native ads.
// Note that mixing absolute and relative sizes is not recommended.
// Dev note:
// This is kept as `int8` because ratio values are expected to be quite small (like 16:9).
HRatio int8 `json:"hratio,omitempty"`
// Attribute:
// priv
// Type:
// string
// Definition:
// URL of a page informing the user about a buyer's targeting activity.
Priv string `json:"priv,omitempty"`
// Attribute:
// adm
// Type:
// string
// Definition:
// General display markup (e.g., HTML, AMPHTML) if not using a structured alternative (e.g., banner, native).
// Note that including both adm and curl is not recommended.
AdM string `json:"adm,omitempty"`
// Attribute:
// curl
// Type:
// string
// Definition:
// Optional means of retrieving display markup by reference; a URL that can return HTML, AMPHTML, or a collection native Asset object and their subordinates).
// If this ad is matched to a Placement specification, the Placement.curlx attribute indicates if this markup retrieval option is supported.
// Note that including both adm and curl is not recommended.
CURL string `json:"curl,omitempty"`
// Attribute:
// banner
// Type:
// object
// Definition:
// Structured banner image object, recommended for simple banner creatives.
// Refer to Object: Banner.
Banner *Banner `json:"banner,omitempty"`
// Attribute:
// native
// Type:
// object
// Definition:
// Structured native object, recommended for native ads.
// Refer to Object: Native.
Native *Native `json:"native,omitempty"`
// Attribute:
// event
// Type:
// object array
// Definition:
// Array of events that the advertiser or buying platform wants to track.
// Refer to Object: Event.
Event []Event `json:"event,omitempty"`
// Attribute:
// ext
// Type:
// object
// Definition:
// Optional vendor-specific extensions.
Ext json.RawMessage `json:"ext,omitempty"`
}