You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: native/request/data.go
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -2,26 +2,26 @@ package request
2
2
3
3
import"encoding/json"
4
4
5
-
typeData_Typeint
5
+
typeDataTypeIDint
6
6
7
7
const (
8
-
Data_SponsoredData_Type=1// Sponsored By message where response should contain the brand name of the sponsor
9
-
Data_DescData_Type=2// Descriptive text associated with the product or service being advertised
10
-
Data_RatingData_Type=3// Rating of the product being offered to the user
11
-
Data_LikesData_Type=4// Number of social ratings or “likes” of the product being offered to the user
12
-
Data_DownloadsData_Type=5// Number downloads/installs of this product
13
-
Data_PriceData_Type=6// Price for product / app / in-app purchase. Value should include currency symbol in localised format
14
-
Data_SalePriceData_Type=7// Sale price that can be used together with price to indicate a discounted price compared to a regular price. Value should include currency symbol in localised format
15
-
Data_PhoneData_Type=8// Phone number
16
-
Data_AddressData_Type=9// Address
17
-
Data_DescAdditionalData_Type=10// Additional descriptive text associated with the product or service being advertised
18
-
Data_DisplayURLData_Type=11// Display URL for the text ad. To be used when sponsoring entity doesn’t own the content. IE sponsored by BRAND on SITE (where SITE is transmitted in this field)
19
-
Data_CTADescData_Type=12// CTA description - descriptive text describing a ‘call to action’ button for the destination URL
8
+
DataTypeSponsoredDataTypeID=1// Sponsored By message where response should contain the brand name of the sponsor
9
+
DataTypeDescDataTypeID=2// Descriptive text associated with the product or service being advertised
10
+
DataTypeRatingDataTypeID=3// Rating of the product being offered to the user
11
+
DataTypeLikesDataTypeID=4// Number of social ratings or “likes” of the product being offered to the user
12
+
DataTypeDownloadsDataTypeID=5// Number downloads/installs of this product
13
+
DataTypePriceDataTypeID=6// Price for product / app / in-app purchase. Value should include currency symbol in localised format
14
+
DataTypeSalePriceDataTypeID=7// Sale price that can be used together with price to indicate a discounted price compared to a regular price. Value should include currency symbol in localised format
15
+
DataTypePhoneDataTypeID=8// Phone number
16
+
DataTypeAddressDataTypeID=9// Address
17
+
DataTypeDescAdditionalDataTypeID=10// Additional descriptive text associated with the product or service being advertised
18
+
DataTypeDisplayURLDataTypeID=11// Display URL for the text ad. To be used when sponsoring entity doesn’t own the content. IE sponsored by BRAND on SITE (where SITE is transmitted in this field)
19
+
DataTypeCTADescDataTypeID=12// CTA description - descriptive text describing a ‘call to action’ button for the destination URL
20
20
21
21
)
22
22
23
23
typeDatastruct {
24
-
TypeData_Type`json:"type"`// Type ID of the element supported by the publisher. The publisher can display this information in an appropriate format
24
+
TypeIDDataTypeID`json:"type"`// Type ID of the element supported by the publisher. The publisher can display this information in an appropriate format
25
25
Lengthint`json:"len"`// Maximum length of the text in the element’s response
Request_InFeedRequest_PlacementType=1// In the feed of content - for example as an item inside the organic feed/grid/listing/carousel
56
-
Request_AtomicRequest_PlacementType=2// In the atomic unit of the content - IE in the article page or single image page
57
-
Request_OutsideRequest_PlacementType=3// Outside the core content - for example in the ads section on the right rail, as a banner-style placement near the content, etc.
58
-
Request_RecommendationRequest_PlacementType=4// Recommendation widget, most commonly presented below the article content
55
+
PlacementTypeInFeedPlacementTypeID=1// In the feed of content - for example as an item inside the organic feed/grid/listing/carousel
56
+
PlacementTypeAtomicPlacementTypeID=2// In the atomic unit of the content - IE in the article page or single image page
57
+
PlacementTypeOutsidePlacementTypeID=3// Outside the core content - for example in the ads section on the right rail, as a banner-style placement near the content, etc.
58
+
PlacementTypeRecommendationPlacementTypeID=4// Recommendation widget, most commonly presented below the article content
59
59
)
60
60
61
61
// This object represents a native type impression. Native ad units are intended to blend seamlessly into
@@ -66,14 +66,14 @@ const (
66
66
// banner and/or video by also including as Imp subordinates the Banner and/or Video objects,
67
67
// respectively. However, any given bid for the impression must conform to one of the offered types.
68
68
typeRequeststruct {
69
-
Verstring`json:"ver,omitempty"`// Version of the Native Markup
70
-
LayoutRequest_Layout`json:"layout,omitempty"`// DEPRECATED The Layout ID of the native ad
71
-
AdUnitRequest_AdUnit`json:"adunit,omitempty"`// DEPRECATED The Ad unit ID of the native ad
72
-
ContextRequest_Context`json:"context,omitempty`// The context in which the ad appears
73
-
ContextSubTypeRequest_ContextSubType`json:"contextsubtype,omitempty"`// A more detailed context in which the ad appears
74
-
PlacementTypeRequest_PlacementType`json:"plcmttype,omitempty"`// The design/format/layout of the ad unit being offered
75
-
PlacementCountint`json:"plcmtcnt,omitempty"`// The number of identical placements in this Layout
76
-
Sequenceint`json:"seq,omitempty"`// 0 for the first ad, 1 for the second ad, and so on
77
-
Assets []Asset`json:"assets"`// An array of Asset Objects
78
-
Ext json.RawMessage`json:"ext,omitempty"`
69
+
Verstring`json:"ver,omitempty"`// Version of the Native Markup
70
+
LayoutIDLayoutID`json:"layout,omitempty"`// DEPRECATED The Layout ID of the native ad
71
+
AdUnitIDAdUnitID`json:"adunit,omitempty"`// DEPRECATED The Ad unit ID of the native ad
72
+
ContextTypeIDContextTypeID`json:"context,omitempty"`// The context in which the ad appears
73
+
ContextSubTypeIDContextSubTypeID`json:"contextsubtype,omitempty"`// A more detailed context in which the ad appears
74
+
PlacementTypeIDPlacementTypeID`json:"plcmttype,omitempty"`// The design/format/layout of the ad unit being offered
75
+
PlacementCountint`json:"plcmtcnt,omitempty"`// The number of identical placements in this Layout
76
+
Sequenceint`json:"seq,omitempty"`// 0 for the first ad, 1 for the second ad, and so on
77
+
Assets[]Asset`json:"assets"`// An array of Asset Objects
0 commit comments