From 071ec7459490832256c5c69fbff8f1f6be55aee6 Mon Sep 17 00:00:00 2001 From: Pranay <47817641+pd-pranay@users.noreply.github.com> Date: Thu, 15 Jun 2023 13:35:11 +0530 Subject: [PATCH] Add ortb 2.6 features to content object (#108) --- content.go | 5 +++++ openrtb.go | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/content.go b/content.go index 6c5ba4e..1546dab 100644 --- a/content.go +++ b/content.go @@ -33,5 +33,10 @@ type Content struct { Language string `json:"language,omitempty"` // Content language using ISO-639-1-alpha-2. Embeddable int `json:"embeddable,omitempty"` // Indicator of whether or not the content is embeddable (e.g., an embeddable video player), where 0 = no, 1 = yes. Data []Data `json:"data,omitempty"` // Additional content data. + Network *ChannelEntity `json:"network,omitempty"` // Details about the network the content is on. + Channel *ChannelEntity `json:"channel,omitempty"` // Details about the channel the content is on. + KwArray []string `json:"kwarray,omitempty"` // Array of keywords about the site. Only one of ‘keywords’ or‘kwarray’ may be present. + CategoryTaxonomy CategoryTaxonomy `json:"cattax,omitempty"` // Defines the taxonomy in use. + LangB string `json:"langb,omitempty"` // Language of the creative using IETF BCP 47. Only one of language or langb should be present. Ext json.RawMessage `json:"ext,omitempty"` } diff --git a/openrtb.go b/openrtb.go index 130a9c3..da9d50b 100644 --- a/openrtb.go +++ b/openrtb.go @@ -903,3 +903,11 @@ const ( VideoPlcmtInterstitial VideoPlcmt = 3 VideoPlcmtNoContent VideoPlcmt = 4 ) + +// ChannelEntity describes the network or channel an ad will be displayed on. (Reffer Section 3.2.23 and 3.2.24 OpenRTB_2.6) +type ChannelEntity struct { + ID string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + Domain string `json:"domain,omitempty"` + Ext json.RawMessage `json:"ext,omitempty"` +}