forked from mxmCherry/openrtb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.go
98 lines (88 loc) · 2.49 KB
/
image.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
package request
import (
"encoding/json"
"github.com/mxmCherry/openrtb/native"
)
// 4.4 Image Object
//
// The Image object to be used for all image elements of the Native ad such as Icons, Main Image, etc.
// Recommended sizes and aspect ratios are included in the Image Asset Types section.
type Image struct {
// Field:
// type
// Scope:
// optional
// Type:
// integer
// Description:
// Type ID of the image element supported by the publisher.
// The publisher can display this information in an appropriate format.
// See Table Image Asset Types.
Type native.ImageAssetType `json:"type,omitempty"`
// Field:
// w
// Scope:
// optional
// Type:
// integer
// Description:
// Width of the image in pixels.
W uint64 `json:"w,omitempty"`
// Field:
// wmin
// Scope:
// recommended
// Type:
// integer
// Description:
// The minimum requested width of the image in pixels.
// This option should be used for any rescaling of images by the client.
// Either w or wmin should be transmitted.
// If only w is included, it should be considered an exact requirement.
WMin uint64 `json:"wmin,omitempty"`
// Field:
// h
// Scope:
// optional
// Type:
// integer
// Description:
// Height of the image in pixels.
H uint64 `json:"h,omitempty"`
// Field:
// hmin
// Scope:
// recommended
// Type:
// integer
// Description:
// The minimum requested height of the image in pixels.
// This option should be used for any rescaling of images by the client.
// Either h or hmin should be transmitted.
// If only h is included, it should be considered an exact requirement.
HMin uint64 `json:"hmin,omitempty"`
// Field:
// mimes
// Scope:
// optional
// Type:
// array of strings
// Default:
// All types allowed
// Description:
// Whitelist of content MIME types supported.
// Popular MIME types include, but are not limited to “image/jpg” “image/gif”.
// Each implementing Exchange should have their own list of supported types in the integration docs.
// See Wikipedia's MIME page for more information and links to all IETF RFCs.
// If blank, assume all types are allowed.
MIMEs []string `json:"mimes,omitempty"`
// Field:
// ext
// Scope:
// optional
// Type:
// object
// Description:
// This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification
Ext json.RawMessage `json:"ext,omitempty"`
}