mirror of
https://github.com/prebid/openrtb.git
synced 2026-06-18 07:56:35 +03:00
Merge branch 'master' into do-not-omitempty-on-wh
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.5.x
|
||||
- 1.6.x
|
||||
- 1.7.x
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
@@ -1,60 +1,52 @@
|
||||
# openrtb
|
||||
# openrtb [](https://godoc.org/github.com/mxmCherry/openrtb) [](https://travis-ci.org/mxmCherry/openrtb)
|
||||
|
||||
[](https://godoc.org/github.com/prebid/openrtb)
|
||||
|
||||
[OpenRTB](//github.com/openrtb/OpenRTB) [v2.3.1](//github.com/openrtb/OpenRTB/blob/master/OpenRTB-API-Specification-Version-2-3-1-FINAL.pdf) types for Go programming language (golang)
|
||||
[OpenRTB](//www.iab.com/guidelines/real-time-bidding-rtb-project/) [v2.5](//www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) types for Go programming language (Golang)
|
||||
|
||||
# Using
|
||||
|
||||
```bash
|
||||
go get -u "github.com/prebid/openrtb"
|
||||
go get -u "github.com/mxmCherry/openrtb"
|
||||
```
|
||||
|
||||
```go
|
||||
import "github.com/prebid/openrtb"
|
||||
import "github.com/mxmCherry/openrtb"
|
||||
```
|
||||
|
||||
# History
|
||||
|
||||
- Forked on April 23, 2017 from [mxmCherry](//github.com/mxmCherry/openrtb.v3)
|
||||
- Updated Device, Geo to OpenRTB 2.5
|
||||
|
||||
# Goals
|
||||
|
||||
Provide base for OpenRTB-related projects, focusing on:
|
||||
- Extensive documentation
|
||||
- Strict specification (using unsigned numeric types for values, that are not meant to be signed; don't overuse pointers to avoid nil dereferencing etc.)
|
||||
- Efficient memory usage (using numeric types large enough just to hold intended values etc.)
|
||||
This repo follows [semver](http://semver.org/) - see [releases](//github.com/mxmCherry/openrtb/releases).
|
||||
Master always contains latest code, so better use some package manager to vendor specific version.
|
||||
|
||||
# Guidelines
|
||||
|
||||
## Naming convention
|
||||
- [UpperCamelCase](http://en.wikipedia.org/wiki/CamelCase)
|
||||
- Capitalized abbreviations (e.g., AT, COPPA, PMP etc.)
|
||||
- Capitalized ID keys
|
||||
- Capitalized abbreviations (e.g., `AT`, `COPPA`, `PMP` etc.)
|
||||
- Capitalized `ID` keys
|
||||
|
||||
## Types
|
||||
- Key types should be chosen according to OpenRTB v2.5 specification (attribute types)
|
||||
- Key types should be chosen according to OpenRTB specification (attribute types)
|
||||
- Numeric types:
|
||||
- architecture-independent, e.g., ```int32``` instead of ```int```
|
||||
- signed integral types should be used only when absolutely needed (value may contain negative numbers), unsigned integral types are preferred
|
||||
- but avoid `uint8` as it [has problems with JSON serialization](https://github.com/mxmCherry/openrtb/issues/3)
|
||||
- enumerations should be represented with minimal integral types, e.g., ```int8``` for enumerations with <= 256 variants
|
||||
- for floating-point attributes only ```float64``` type should be used
|
||||
- `int64` - time, duration, unbound enums (like `BidRequest.at` - exchange-specific auctions types are > 500)
|
||||
- `int8` - short enums (with values <= 127), boolean-like attributes (like `BidRequest.test`)
|
||||
- `uint64` - width, height, bitrate etc. (unbound positive numbers)
|
||||
- `float64` - coordinates, prices etc.
|
||||
- Enums:
|
||||
- all enums, described in section 5, must be typed with section name singularized (e.g., "5.2 Banner Ad Types" -> `type BannerAdType int8`)
|
||||
- all typed enums must have constants for each element, prefixed with type name (e.g., "5.2 Banner Ad Types - XHTML Text Ad (usually mobile)" -> `const BannerAdTypeXHTMLTextAd BannerAdType = 1`)
|
||||
- never use `iota` for enum constants
|
||||
- section "5.1 Content Categories" should remain untyped and have no constants
|
||||
|
||||
## Documentation
|
||||
## Documentation ([godoc](https://godoc.org/github.com/mxmCherry/openrtb))
|
||||
- [Godoc: documenting Go code](http://blog.golang.org/godoc-documenting-go-code)
|
||||
- Each entity (type or struct key) should be documented
|
||||
- Comments for entities should be copy-pasted "as-is" from OpenRTB specification
|
||||
- Each entity (type, struct key or constant) should be documented
|
||||
- Comments for entities should be copy-pasted "as-is" from OpenRTB specification (except section 5 - replace "table" with "list" there; ideally, each sentence must be on a new line)
|
||||
|
||||
## Code organization
|
||||
- Each RTB type should be kept in its own file, named after type
|
||||
- File names are in underscore_case, e.g., ```type BidRequest``` should be declared in ```bid_request.go```
|
||||
- File names are in underscore_case, e.g., `type BidRequest` should be declared in `bid_request.go`
|
||||
- [go fmt your code](https://blog.golang.org/go-fmt-your-code)
|
||||
|
||||
|
||||
# TODO
|
||||
|
||||
- [ ] OpenRTB 2.5 compliance ([specs](http://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf))
|
||||
- [ ] Review time/duration types, use `int64` for easier [time](https://golang.org/pkg/time/) conversion (requires major version bump)
|
||||
- [ ] Review enum types (some experiments are in [next](https://github.com/mxmCherry/openrtb/tree/next) branch)
|
||||
- [ ] Review all integral types, probably, switch everything to signed ones or just to `int`?
|
||||
- [ ] Consider switching back to `encoding/json.RawMessage`, as Go 1.8 fixed serialisation for non-ptr (probably, when Go 1.9 or even 1.10 is out)
|
||||
- [x] Review enum types (typed enum attributes + constants)
|
||||
- [ ] Review types, that are enums (or "open enums" like `BidRequest.at`) themselves, but not described in section 5 - make them typed
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package openrtb
|
||||
|
||||
// 5.4 Ad Position
|
||||
//
|
||||
// Position of the ad as a relative measure of visibility or prominence.
|
||||
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
|
||||
// Practitioners should keep in sync with updates to the IQG values as published on IAB.com.
|
||||
// Values “4” - “7” apply to apps per the mobile addendum to IQG version 2.1.
|
||||
type AdPosition int8
|
||||
|
||||
const (
|
||||
AdPositionUnknown AdPosition = 0 // Unknown
|
||||
AdPositionAboveTheFold AdPosition = 1 // Above the Fold
|
||||
AdPositionMayOrMayNotBeInitiallyVisible AdPosition = 2 // DEPRECATED - May or may not be initially visible depending on screen size/resolution.
|
||||
AdPositionBelowTheFold AdPosition = 3 // Below the Fold
|
||||
AdPositionHeader AdPosition = 4 // Header
|
||||
AdPositionFooter AdPosition = 5 // Footer
|
||||
AdPositionSidebar AdPosition = 6 // Sidebar
|
||||
AdPositionFullScreen AdPosition = 7 // Full Screen
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package openrtb
|
||||
|
||||
// 5.6 API Frameworks
|
||||
//
|
||||
// List of API frameworks supported by the publisher.
|
||||
type APIFramework int8
|
||||
|
||||
const (
|
||||
APIFrameworkVPAID10 APIFramework = 1 // VPAID 1.0
|
||||
APIFrameworkVPAID20 APIFramework = 2 // VPAID 2.0
|
||||
APIFrameworkMRAID1 APIFramework = 3 // MRAID-1
|
||||
APIFrameworkORMMA APIFramework = 4 // ORMMA
|
||||
APIFrameworkMRAID2 APIFramework = 5 // MRAID-2
|
||||
APIFrameworkMRAID3 APIFramework = 6 // MRAID-3
|
||||
)
|
||||
@@ -1,10 +1,10 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.7 Object: App
|
||||
// 3.2.14 Object: App
|
||||
//
|
||||
// This object should be included if the ad supported content is a non-browser application (typically in
|
||||
// mobile) as opposed to a website. A bid request must not contain both an App and a Site object. At a
|
||||
// minimum, it is useful to provide an App ID or bundle, but this is not strictly required.
|
||||
// This object should be included if the ad supported content is a non-browser application (typically in mobile) as opposed to a website.
|
||||
// A bid request must not contain both an App and a Site object.
|
||||
// At a minimum, it is useful to provide an App ID or bundle, but this is not strictly required.
|
||||
type App struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -28,8 +28,10 @@ type App struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Application bundle or package name (e.g., com.foo.mygame);
|
||||
// intended to be a unique ID across exchanges.
|
||||
// A platform-specific application identifier intended to be
|
||||
// unique to the app and independent of the exchange. On
|
||||
// Android, this should be a bundle or package name (e.g.,
|
||||
// com.foo.mygame). On iOS, it is typically a numeric ID.
|
||||
Bundle string `json:"bundle,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -45,7 +47,7 @@ type App struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// App store URL for an installed app; for QAG 1.5 compliance.
|
||||
// App store URL for an installed app; for IQG 2.1 compliance.
|
||||
StoreURL string `json:"storeurl,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -53,7 +55,7 @@ type App struct {
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Array of IAB content categories of the app. Refer to List 5.1.
|
||||
// Array of IAB content categories of the app. Refer to List 5.1
|
||||
Cat []string `json:"cat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -103,7 +105,7 @@ type App struct {
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// Details about the Publisher (Section 3.2.8) of the app.
|
||||
// Details about the Publisher (Section 3.2.15) of the app.
|
||||
Publisher *Publisher `json:"publisher,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -111,7 +113,7 @@ type App struct {
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// Details about the Content (Section 3.2.9) within the app.
|
||||
// Details about the Content (Section 3.2.16) within the app
|
||||
Content *Content `json:"content,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.8 Object: Audio
|
||||
//
|
||||
// This object represents an audio type impression.
|
||||
// Many of the fields are non-essential for minimally viable transactions, but are included to offer fine control when needed.
|
||||
// Audio in OpenRTB generally assumes compliance with the DAAST standard.
|
||||
// As such, the notion of companion ads is supported by optionally including an array of Banner objects (refer to the Banner object in Section 3.2.6) that define these companion ads.
|
||||
//
|
||||
// The presence of a Audio as a subordinate of the Imp object indicates that this impression is offered as an audio type impression.
|
||||
// At the publisher’s discretion, that same impression may also be offered as banner, video, and/or native by also including as Imp subordinates objects of those types.
|
||||
// However, any given bid for the impression must conform to one of the offered types.
|
||||
type Audio struct {
|
||||
|
||||
// Attribute:
|
||||
// mimes
|
||||
// Type:
|
||||
// string array; required
|
||||
// Description:
|
||||
// Content MIME types supported (e.g., “audio/mp4”).
|
||||
MIMEs []string `json:"mimes"`
|
||||
|
||||
// Attribute:
|
||||
// minduration
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Minimum audio ad duration in seconds.
|
||||
MinDuration int64 `json:"minduration,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxduration
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Maximum audio ad duration in seconds.
|
||||
MaxDuration int64 `json:"maxduration,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// protocols
|
||||
// Type:
|
||||
// integer array; recommended
|
||||
// Description:
|
||||
// Array of supported audio protocols. Refer to List 5.8.
|
||||
Protocols []Protocol `json:"protocols,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// startdelay
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Indicates the start delay in seconds for pre-roll, mid-roll, or
|
||||
// post-roll ad placements. Refer to List 5.12.
|
||||
StartDelay *StartDelay `json:"startdelay,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// sequence
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// If multiple ad impressions are offered in the same bid request,
|
||||
// the sequence number will allow for the coordinated delivery
|
||||
// of multiple creatives.
|
||||
Sequence uint64 `json:"sequence,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// battr
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// Blocked creative attributes. Refer to List 5.3.
|
||||
BAttr []CreativeAttribute `json:"battr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxextended
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Maximum extended ad duration if extension is allowed. If
|
||||
// blank or 0, extension is not allowed. If -1, extension is
|
||||
// allowed, and there is no time limit imposed. If greater than 0,
|
||||
// then the value represents the number of seconds of extended
|
||||
// play supported beyond the maxduration value.
|
||||
MaxExtended int64 `json:"maxextended,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// minbitrate
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Minimum bit rate in Kbps.
|
||||
MinBitrate uint64 `json:"minbitrate,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxbitrate
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Maximum bit rate in Kbps.
|
||||
MaxBitrate uint64 `json:"maxbitrate,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// delivery
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// Supported delivery methods (e.g., streaming, progressive). If
|
||||
// none specified, assume all are supported. Refer to List 5.15.
|
||||
Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// companionad
|
||||
// Type:
|
||||
// object array
|
||||
// Description:
|
||||
// Array of Banner objects (Section 3.2.6) if companion ads are
|
||||
// available.
|
||||
CompanionAd []Banner `json:"companionad,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// api
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// List of supported API frameworks for this impression. Refer to
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be
|
||||
// supported.
|
||||
API []APIFramework `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// companiontype
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// Supported DAAST companion ad types. Refer to List 5.14.
|
||||
// Recommended if companion Banner objects are included via
|
||||
// the companionad array.
|
||||
CompanionType []CompanionType `json:"companiontype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxseq
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// The maximum number of ads that can be played in an ad pod.
|
||||
// OpenRTB API Specification Version 2.5 IAB Technology Lab
|
||||
// www.iab.com/openrtb Page 18
|
||||
MaxSeq uint64 `json:"maxseq,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// feed
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Type of audio feed. Refer to List 5.16.
|
||||
Feed FeedType `json:"feed,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// stitched
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Indicates if the ad is stitched with audio content or delivered
|
||||
// independently, where 0 = no, 1 = yes.
|
||||
Stitched int8 `json:"stitched,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// nvol
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Volume normalization mode. Refer to List 5.17.
|
||||
NVol *VolumeNormalizationMode `json:"nvol,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// Placeholder for exchange-specific extensions to OpenRTB.
|
||||
Ext RawJSON `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -1,27 +1,33 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.3 Object: Banner
|
||||
// 3.2.6 Object: Banner
|
||||
//
|
||||
// This object represents the most general type of impression. Although the term “banner” may have very
|
||||
// specific meaning in other contexts, here it can be many things including a simple static image, an
|
||||
// expandable ad unit, or even in-banner video (refer to the Video object in Section 3.2.4 for the more
|
||||
// generalized and full featured video ad units). An array of Banner objects can also appear within the
|
||||
// Video to describe optional companion ads defined in the VAST specification.
|
||||
// This object represents the most general type of impression.
|
||||
// Although the term “banner” may have very specific meaning in other contexts, here it can be many things including a simple static image, an expandable ad unit, or even in-banner video (refer to the Video object in Section 3.2.7 for the more generalized and full featured video ad units).
|
||||
// An array of Banner objects can also appear within the Video to describe optional companion ads defined in the VAST specification.
|
||||
//
|
||||
// The presence of a Banner as a subordinate of the Imp object indicates that this impression is offered as
|
||||
// a banner type impression. At the publisher’s discretion, that same impression may also be offered as
|
||||
// video and/or native by also including as Imp subordinates the Video and/or Native objects,
|
||||
// respectively. However, any given bid for the impression must conform to one of the offered types.
|
||||
// The presence of a Banner as a subordinate of the Imp object indicates that this impression is offered as a banner type impression.
|
||||
// At the publisher’s discretion, that same impression may also be offered as video, audio, and/or native by also including as Imp subordinates objects of those types.
|
||||
// However, any given bid for the impression must conform to one of the offered types.
|
||||
type Banner struct {
|
||||
|
||||
// Attribute:
|
||||
// format
|
||||
// Type:
|
||||
// object array; recommended
|
||||
// Description:
|
||||
// Array of format objects (Section 3.2.10) representing the
|
||||
// banner sizes permitted. If none are specified, then use of the
|
||||
// h and w attributes is highly recommended.
|
||||
Format []Format `json:"format,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Width of the impression in pixels.
|
||||
// If neither wmin nor wmax are specified, this value is an exact
|
||||
// width requirement. Otherwise it is a preferred width.
|
||||
// Exact width in device independent pixels (DIPS);
|
||||
// recommended if no format objects are specified.
|
||||
W uint64 `json:"w"`
|
||||
|
||||
// Attribute:
|
||||
@@ -29,9 +35,8 @@ type Banner struct {
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Height of the impression in pixels.
|
||||
// If neither hmin nor hmax are specified, this value is an exact
|
||||
// height requirement. Otherwise it is a preferred height.
|
||||
// Exact height in device independent pixels (DIPS);
|
||||
// recommended if no format objects are specified.
|
||||
H uint64 `json:"h"`
|
||||
|
||||
// Attribute:
|
||||
@@ -45,62 +50,46 @@ type Banner struct {
|
||||
// Attribute:
|
||||
// wmax
|
||||
// Type:
|
||||
// integer; deprecated
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// Maximum width of the impression in pixels.
|
||||
// If included along with a w value then w should be interpreted
|
||||
// as a recommended or preferred width.
|
||||
// NOTE: Deprecated in favor of the format array.
|
||||
// Maximum width in device independent pixels (DIPS).
|
||||
WMax uint64 `json:"wmax,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// hmax
|
||||
// Type:
|
||||
// integer; deprecated
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// Maximum height of the impression in pixels.
|
||||
// If included along with an h value then h should be interpreted
|
||||
// as a recommended or preferred height.
|
||||
// NOTE: Deprecated in favor of the format array.
|
||||
// Maximum height in device independent pixels (DIPS).
|
||||
HMax uint64 `json:"hmax,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wmin
|
||||
// Type:
|
||||
// integer; deprecated
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// Minimum width of the impression in pixels.
|
||||
// If included along with a w value then w should be interpreted
|
||||
// as a recommended or preferred width.
|
||||
// NOTE: Deprecated in favor of the format array.
|
||||
// Minimum width in device independent pixels (DIPS).
|
||||
WMin uint64 `json:"wmin,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// hmin
|
||||
// Type:
|
||||
// integer; deprecated
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// Minimum height of the impression in pixels.
|
||||
// If included along with an h value then h should be interpreted
|
||||
// as a recommended or preferred height.
|
||||
// NOTE: Deprecated in favor of the format array.
|
||||
// Minimum height in device independent pixels (DIPS).
|
||||
HMin uint64 `json:"hmin,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// id
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Unique identifier for this banner object. Recommended when
|
||||
// Banner objects are used with a Video object (Section 3.2.4) to
|
||||
// represent an array of companion ads. Values usually start at 1
|
||||
// and increase with each object; should be unique within an
|
||||
// impression.
|
||||
ID string `json:"id,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// btype
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// Blocked banner ad types. Refer to List 5.2.
|
||||
BType []int8 `json:"btype,omitempty"`
|
||||
BType []BannerAdType `json:"btype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// battr
|
||||
@@ -108,15 +97,15 @@ type Banner struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// Blocked creative attributes. Refer to List 5.3.
|
||||
BAttr []int8 `json:"battr,omitempty"`
|
||||
BAttr []CreativeAttribute `json:"battr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pos
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Ad position on screen. Refer to List 5.4
|
||||
Pos int8 `json:"pos,omitempty"`
|
||||
// Ad position on screen. Refer to List 5.4.
|
||||
Pos *AdPosition `json:"pos,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// mimes
|
||||
@@ -124,7 +113,8 @@ type Banner struct {
|
||||
// string array
|
||||
// Description:
|
||||
// Content MIME types supported. Popular MIME types may
|
||||
// include “application/x-shockwave-flash”, “image/jpg”, and “image/gif”.
|
||||
// include “application/x-shockwave-flash”,
|
||||
// “image/jpg”, and “image/gif”.
|
||||
MIMEs []string `json:"mimes,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -132,8 +122,8 @@ type Banner struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Indicates if the banner is in the top frame as opposed to an
|
||||
// iframe, where 0 = no, 1 = yes.
|
||||
// Indicates if the banner is in the top frame as opposed to an
|
||||
// iframe, where 0 = no, 1 = yes.
|
||||
TopFrame int8 `json:"topframe,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -142,7 +132,7 @@ type Banner struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// Directions in which the banner may expand. Refer to List 5.5.
|
||||
ExpDir []int8 `json:"expdir,omitempty"`
|
||||
ExpDir []ExpandableDirection `json:"expdir,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// api
|
||||
@@ -150,8 +140,32 @@ type Banner struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// List of supported API frameworks for this impression. Refer to
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be supported.
|
||||
API []int8 `json:"api,omitempty"`
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be
|
||||
// supported.
|
||||
API []APIFramework `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// id
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Unique identifier for this banner object. Recommended when
|
||||
// Banner objects are used with a Video object (Section 3.2.7) to
|
||||
// represent an array of companion ads. Values usually start at 1
|
||||
// and increase with each object; should be unique within an
|
||||
// impression.
|
||||
ID string `json:"id,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// vcm
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Relevant only for Banner objects used with a Video object
|
||||
// (Section 3.2.7) in an array of companion ads. Indicates the
|
||||
// companion banner rendering mode relative to the associated
|
||||
// video, where 0 = concurrent, 1 = end-card.
|
||||
VCm int8 `json:"vcm,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package openrtb
|
||||
|
||||
// 5.2 Banner Ad Types
|
||||
//
|
||||
// Types of ads that can be accepted by the exchange unless restricted by publisher site settings.
|
||||
type BannerAdType int8
|
||||
|
||||
const (
|
||||
BannerAdTypeXHTMLTextAd BannerAdType = 1 // XHTML Text Ad (usually mobile)
|
||||
BannerAdTypeXHTMLBannerAd BannerAdType = 2 // XHTML Banner Ad. (usually mobile)
|
||||
BannerAdTypeJavaScriptAd BannerAdType = 3 // JavaScript Ad; must be valid XHTML (i.e., Script Tags Included)
|
||||
BannerAdTypeIframe BannerAdType = 4 // iframe
|
||||
)
|
||||
@@ -2,8 +2,27 @@ package openrtb
|
||||
|
||||
// 4.2.3 Object: Bid
|
||||
//
|
||||
// A SeatBid object contains one or more Bid objects, each of which relates to a specific impression in the
|
||||
// bid request via the impid attribute and constitutes an offer to buy that impression for a given price.
|
||||
// A SeatBid object contains one or more Bid objects, each of which relates to a specific impression in the bid request via the impid attribute and constitutes an offer to buy that impression for a given price.
|
||||
//
|
||||
// For each bid, the nurl attribute contains the win notice URL.
|
||||
// If the bidder wins the impression, the exchange calls this notice URL to inform the bidder of the win and to convey certain information using substitution macros (see Section 4.4) such as the clearing price.
|
||||
// The win notice return or the adm attribute can be used to serve markup (see Section 4.3).
|
||||
// In either case, the exchange will also apply the aforementioned substitution to any macros found in the markup.
|
||||
//
|
||||
// BEST PRACTICE: The essential function of the win notice is to inform a bidder that they won an auction.
|
||||
// It does not necessarily imply ad delivery, creative viewability, or billability.
|
||||
// Exchanges are highly encouraged to publish to their bidders their event triggers, billing policies, and any other meaning they attach to the win notice.
|
||||
// Also, please refer to Section 7.2 for additional guidance on expirations.
|
||||
//
|
||||
// BEST PRACTICE: Firing of the billing notice should be server-side and as “close” as possible to where the exchange books revenue in order to minimize discrepancies between exchange and bidder.
|
||||
//
|
||||
// BEST PRACTICE: For VAST Video, the IAB prescribes that the VAST impression event is the official signal that the impression is billable.
|
||||
// If the burl attribute is specified, it too should be fired at the same time if the exchange is adhering to this policy.
|
||||
// However, subtle technical issues may lead to additional discrepancies and bidders are cautioned to avoid this scenario.
|
||||
//
|
||||
// Several other attributes are used for ad quality checks or enforcing publisher restrictions.
|
||||
// These include the advertiser domain via adomain, a non-cache-busted URL to an image representative of the content of the campaign via iurl, an ID of the campaign and of the creative within the campaign via cid and crid respectively, an array of creative attribute via attr, and the dimensions via h and w.
|
||||
// If the bid pertains to a private marketplace deal, the dealid attribute is used to reference that agreement from the bid request.
|
||||
type Bid struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -33,23 +52,42 @@ type Bid struct {
|
||||
// currencies (e.g., BigDecimal in Java).
|
||||
Price float64 `json:"price"`
|
||||
|
||||
// Attribute:
|
||||
// adid
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// ID of a preloaded ad to be served if the bid wins.
|
||||
AdID string `json:"adid,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// nurl
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Win notice URL called by the exchange if the bid wins; optional
|
||||
// means of serving ad markup.
|
||||
// Win notice URL called by the exchange if the bid wins (not
|
||||
// necessarily indicative of a delivered, viewed, or billable ad);
|
||||
// optional means of serving ad markup. Substitution macros
|
||||
// (Section 4.4) may be included in both the URL and optionally
|
||||
// returned markup.
|
||||
NURL string `json:"nurl,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// burl
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Billing notice URL called by the exchange when a winning bid
|
||||
// becomes billable based on exchange-specific business policy
|
||||
// (e.g., typically delivered, viewed, etc.). Substitution macros
|
||||
// (Section 4.4) may be included.
|
||||
BURL string `json:"burl,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// lurl
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Loss notice URL called by the exchange when a bid is known to
|
||||
// have been lost. Substitution macros (Section 4.4) may be
|
||||
// included. Exchange-specific policy may preclude support for
|
||||
// loss notices or the disclosure of winning clearing prices
|
||||
// resulting in ${AUCTION_PRICE} macros being removed (i.e.,
|
||||
// replaced with a zero-length string).
|
||||
LURL string `json:"lurl,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// adm
|
||||
// Type:
|
||||
@@ -57,8 +95,17 @@ type Bid struct {
|
||||
// Description:
|
||||
// Optional means of conveying ad markup in case the bid wins;
|
||||
// supersedes the win notice if markup is included in both.
|
||||
// Substitution macros (Section 4.4) may be included.
|
||||
AdM string `json:"adm,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// adid
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// ID of a preloaded ad to be served if the bid wins.
|
||||
AdID string `json:"adid,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// adomain
|
||||
// Type:
|
||||
@@ -74,9 +121,10 @@ type Bid struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Bundle or package name (e.g., com.foo.mygame) of the app
|
||||
// being advertised, if applicable; intended to be a unique ID
|
||||
// across exchanges.
|
||||
// A platform-specific application identifier intended to be
|
||||
// unique to the app and independent of the exchange. On
|
||||
// Android, this should be a bundle or package name (e.g.,
|
||||
// com.foo.mygame). On iOS, it is a numeric ID.
|
||||
Bundle string `json:"bundle,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -102,9 +150,20 @@ type Bid struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Creative ID to assist with ad quality checking.
|
||||
// Creative ID to assist with ad quality checking
|
||||
CrID string `json:"crid,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// tactic
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Tactic ID to enable buyers to label bids for reporting to the
|
||||
// exchange the tactic through which their bid was submitted.
|
||||
// The specific usage and meaning of the tactic ID should be
|
||||
// communicated between buyer and exchanges a priori.
|
||||
Tactic string `json:"tactic,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// cat
|
||||
// Type:
|
||||
@@ -119,7 +178,42 @@ type Bid struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// Set of attributes describing the creative. Refer to List 5.3.
|
||||
Attr []int8 `json:"attr,omitempty"`
|
||||
Attr []CreativeAttribute `json:"attr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// api
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// API required by the markup if applicable. Refer to List 5.6.
|
||||
API APIFramework `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// protocol
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Video response protocol of the markup if applicable. Refer to
|
||||
// List 5.8.
|
||||
Protocol Protocol `json:"protocol,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// qagmediarating
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Creative media rating per IQG guidelines. Refer to List 5.19.
|
||||
QAGMediaRating IQGMediaRating `json:"qagmediarating,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// language
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Language of the creative using ISO-639-1-alpha-2. The nonstandard
|
||||
// code “xx” may also be used if the creative has no
|
||||
// linguistic content (e.g., a banner with just a company logo).
|
||||
Language string `json:"language,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// dealid
|
||||
@@ -130,22 +224,49 @@ type Bid struct {
|
||||
// pertains to a private marketplace direct deal.
|
||||
DealID string `json:"dealid,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Height of the creative in pixels.
|
||||
H uint64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Width of the creative in pixels.
|
||||
// Width of the creative in device independent pixels (DIPS).
|
||||
W uint64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Height of the creative in device independent pixels (DIPS).
|
||||
H uint64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wratio
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Relative width of the creative when expressing size as a ratio.
|
||||
// Required for Flex Ads.
|
||||
WRatio uint64 `json:"wratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// hratio
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Relative height of the creative when expressing size as a ratio.
|
||||
// Required for Flex Ads.
|
||||
HRatio uint64 `json:"hratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// exp
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Advisory as to the number of seconds the bidder is willing to
|
||||
// wait between the auction and the actual impression.
|
||||
Exp int64 `json:"exp,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
|
||||
+71
-24
@@ -2,14 +2,13 @@ package openrtb
|
||||
|
||||
// 3.2.1 Object: BidRequest
|
||||
//
|
||||
// The top-level bid request object contains a globally unique bid request or auction ID. This id attribute is
|
||||
// required as is at least one impression object (Section 3.2.2). Other attributes in this top-level object
|
||||
// establish rules and restrictions that apply to all impressions being offered.
|
||||
// The top-level bid request object contains a globally unique bid request or auction ID.
|
||||
// This id attribute is required as is at least one impression object (Section 3.2.4).
|
||||
// Other attributes in this top-level object establish rules and restrictions that apply to all impressions being offered.
|
||||
//
|
||||
// There are also several subordinate objects that provide detailed data to potential buyers. Among these
|
||||
// are the Site and App objects, which describe the type of published media in which the impression(s)
|
||||
// appear. These objects are highly recommended, but only one applies to a given bid request depending
|
||||
// on whether the media is browser-based web content or a non-browser application, respectively.
|
||||
// There are also several subordinate objects that provide detailed data to potential buyers.
|
||||
// Among these are the Site and App objects, which describe the type of published media in which the impression(s) appear.
|
||||
// These objects are highly recommended, but only one applies to a given bid request depending on whether the media is browser-based web content or a non-browser application, respectively.
|
||||
type BidRequest struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -25,7 +24,7 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// object array; required
|
||||
// Description:
|
||||
// Array of Imp objects (Section 3.2.2) representing the
|
||||
// Array of Imp objects (Section 3.2.4) representing the
|
||||
// impressions offered. At least 1 Imp object is required.
|
||||
Imp []Imp `json:"imp"`
|
||||
|
||||
@@ -34,7 +33,7 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// object; recommended
|
||||
// Description:
|
||||
// Details via a Site object (Section 3.2.6) about the publisher's
|
||||
// Details via a Site object (Section 3.2.13) about the publisher’s
|
||||
// website. Only applicable and recommended for websites.
|
||||
Site *Site `json:"site,omitempty"`
|
||||
|
||||
@@ -43,8 +42,9 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// object; recommended
|
||||
// Description:
|
||||
// Details via an App object (Section 3.2.7) about the publisher's
|
||||
// app (i.e. non-browser applications). Only applicable and recommended for apps.
|
||||
// Details via an App object (Section 3.2.14) about the publisher’s
|
||||
// app (i.e., non-browser applications). Only applicable and
|
||||
// recommended for apps.
|
||||
App *App `json:"app,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -52,7 +52,8 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// object; recommended
|
||||
// Description:
|
||||
// Details via a Device object (Section 3.2.11) about the user’s device to which the impression will be delivered.
|
||||
// Details via a Device object (Section 3.2.18) about the user’s
|
||||
// device to which the impression will be delivered.
|
||||
Device *Device `json:"device,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -60,7 +61,8 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// object; recommended
|
||||
// Description:
|
||||
// Details via a User object (Section 3.2.13) about the human user of the device; the advertising audience.
|
||||
// Details via a User object (Section 3.2.20) about the human
|
||||
// user of the device; the advertising audience.
|
||||
User *User `json:"user,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -68,7 +70,8 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// integer; default 0
|
||||
// Description:
|
||||
// Indicator of test mode in which auctions are not billable, where 0 = live mode, 1 = test mode.
|
||||
// Indicator of test mode in which auctions are not billable,
|
||||
// where 0 = live mode, 1 = test mode.
|
||||
Test int8 `json:"test,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -79,25 +82,44 @@ type BidRequest struct {
|
||||
// Auction type, where 1 = First Price, 2 = Second Price Plus.
|
||||
// Exchange-specific auction types can be defined using values
|
||||
// greater than 500.
|
||||
AT int8 `json:"at,omitempty"`
|
||||
AT int64 `json:"at,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// tmax
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Maximum time in milliseconds to submit a bid to avoid timeout. This value is commonly communicated offline.
|
||||
TMax uint64 `json:"tmax,omitempty"`
|
||||
// Maximum time in milliseconds the exchange allows for bids to
|
||||
// be received including Internet latency to avoid timeout. This
|
||||
// value supersedes any a priori guidance from the exchange.
|
||||
TMax int64 `json:"tmax,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wseat
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Whitelist of buyer seats allowed to bid on this deal. Seat IDs must be
|
||||
// communicated between bidders and the exchange a priori. Omission implies no seat restrictions.
|
||||
// White list of buyer seats (e.g., advertisers, agencies) allowed
|
||||
// to bid on this impression. IDs of seats and knowledge of the
|
||||
// buyer’s customers to which they refer must be coordinated
|
||||
// between bidders and the exchange a priori. At most, only one
|
||||
// of wseat and bseat should be used in the same request.
|
||||
// Omission of both implies no seat restrictions.
|
||||
WSeat []string `json:"wseat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// bseat
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Block list of buyer seats (e.g., advertisers, agencies) restricted
|
||||
// from bidding on this impression. IDs of seats and knowledge
|
||||
// of the buyer’s customers to which they refer must be
|
||||
// coordinated between bidders and the exchange a priori. At
|
||||
// most, only one of wseat and bseat should be used in the
|
||||
// same request. Omission of both implies no seat restrictions.
|
||||
BSeat []string `json:"bseat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// allimps
|
||||
// Type:
|
||||
@@ -115,16 +137,29 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Array of allowed currencies for bids on this bid request using ISO-4217 alpha codes. Recommended only if
|
||||
// the exchange accepts multiple currencies.
|
||||
// Array of allowed currencies for bids on this bid request using
|
||||
// ISO-4217 alpha codes. Recommended only if the exchange
|
||||
// accepts multiple currencies.
|
||||
Cur []string `json:"cur,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wlang
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// White list of languages for creatives using ISO-639-1-alpha-2.
|
||||
// Omission implies no specific restrictions, but buyers would be
|
||||
// advised to consider language attribute in the Device and/or
|
||||
// Content objects if available.
|
||||
WLang []string `json:"wlang,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// bcat
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Blocked advertiser categories using the IAB content categories. Refer to List 5.1.
|
||||
// Blocked advertiser categories using the IAB content
|
||||
// categories. Refer to List 5.1.
|
||||
BCat []string `json:"bcat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -135,12 +170,24 @@ type BidRequest struct {
|
||||
// Block list of advertisers by their domains (e.g., “ford.com”).
|
||||
BAdv []string `json:"badv,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// bapp
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Block list of applications by their platform-specific exchangeindependent
|
||||
// application identifiers. On Android, these should
|
||||
// be bundle or package names (e.g., com.foo.mygame). On iOS,
|
||||
// these are numeric IDs.
|
||||
BApp []string `json:"bapp,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// source
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// A Source object (Section 3.2.2) that provides data about the inventory source and which entity makes the final decision.
|
||||
// A Sorce object (Section 3.2.2) that provides data about the
|
||||
// inventory source and which entity makes the final decision.
|
||||
Source *Source `json:"source,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -148,7 +195,7 @@ type BidRequest struct {
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// A Regs object (Section 3.2.16) that specifies any industry, legal,
|
||||
// A Regs object (Section 3.2.3) that specifies any industry, legal,
|
||||
// or governmental regulations in force for this request.
|
||||
Regs *Regs `json:"regs,omitempty"`
|
||||
|
||||
|
||||
+10
-10
@@ -2,15 +2,15 @@ package openrtb
|
||||
|
||||
// 4.2.1 Object: BidResponse
|
||||
//
|
||||
// This object is the top-level bid response object (i.e., the unnamed outer JSON object). The id attribute
|
||||
// is a reflection of the bid request ID for logging purposes. Similarly, bidid is an optional response
|
||||
// tracking ID for bidders. If specified, it can be included in the subsequent win notice call if the bidder
|
||||
// wins. At least one seatbid object is required, which contains at least one bid for an impression. Other
|
||||
// attributes are optional.
|
||||
// This object is the top-level bid response object (i.e., the unnamed outer JSON object).
|
||||
// The id attribute is a reflection of the bid request ID for logging purposes.
|
||||
// Similarly, bidid is an optional response tracking ID for bidders.
|
||||
// If specified, it can be included in the subsequent win notice call if the bidder wins.
|
||||
// At least one seatbid object is required, which contains at least one bid for an impression.
|
||||
// Other attributes are optional.
|
||||
//
|
||||
// To express a “no-bid”, the options are to return an empty response with HTTP 204. Alternately if the
|
||||
// bidder wishes to convey to the exchange a reason for not bidding, just a BidResponse object is
|
||||
// returned with a reason code in the nbr attribute.
|
||||
// To express a “no-bid”, the options are to return an empty response with HTTP 204.
|
||||
// Alternately if the bidder wishes to convey to the exchange a reason for not bidding, just a BidResponse object is returned with a reason code in the nbr attribute.
|
||||
type BidResponse struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -61,8 +61,8 @@ type BidResponse struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Reason for not bidding. Refer to List 5.19.
|
||||
NBR int8 `json:"nbr,omitempty"`
|
||||
// Reason for not bidding. Refer to List 5.24.
|
||||
NBR *NoBidReasonCode `json:"nbr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package openrtb
|
||||
|
||||
// 5.14 Companion Types
|
||||
//
|
||||
// Options to indicate markup types allowed for companion ads that apply to video and audio ads.
|
||||
// This table is derived from VAST 2.0+ and DAAST 1.0 specifications.
|
||||
// Refer to www.iab.com/guidelines/digital-video-suite for more information.
|
||||
type CompanionType int8
|
||||
|
||||
const (
|
||||
CompanionTypeStatic CompanionType = 1 // Static Resource
|
||||
CompanionTypeHTML CompanionType = 2 // HTML Resource
|
||||
CompanionTypeIframe CompanionType = 3 // iframe Resource
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package openrtb
|
||||
|
||||
// 5.22 Connection Type
|
||||
//
|
||||
// Various options for the type of device connectivity.
|
||||
type ConnectionType int8
|
||||
|
||||
const (
|
||||
ConnectionTypeUnknown ConnectionType = 0 // Unknown
|
||||
ConnectionTypeEthernet ConnectionType = 1 // Ethernet
|
||||
ConnectionTypeWIFI ConnectionType = 2 // WIFI
|
||||
ConnectionTypeCellularNetworkUnknownGeneration ConnectionType = 3 // Cellular Network – Unknown Generation
|
||||
ConnectionTypeCellularNetwork2G ConnectionType = 4 // Cellular Network – 2G
|
||||
ConnectionTypeCellularNetwork3G ConnectionType = 5 // Cellular Network – 3G
|
||||
ConnectionTypeCellularNetwork4G ConnectionType = 6 // Cellular Network – 4G
|
||||
)
|
||||
+67
-17
@@ -1,12 +1,11 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.9 Object: Content
|
||||
// 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.
|
||||
// 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:
|
||||
@@ -22,7 +21,7 @@ type Content struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Episode number (typically applies to video content).
|
||||
// Episode number.
|
||||
Episode uint64 `json:"episode,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -53,15 +52,48 @@ type Content struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Content season; typically for video content (e.g., “Season 3”).
|
||||
// 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.10).
|
||||
// Details about the content Producer (Section 3.2.17).
|
||||
Producer *Producer `json:"producer,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -82,20 +114,29 @@ type Content struct {
|
||||
Cat []string `json:"cat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// videoquality
|
||||
// prodq
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Video quality per IAB’s classification. Refer to List 5.11.
|
||||
VideoQuality int8 `json:"videoquality,omitempty"`
|
||||
// Production quality. Refer to List 5.13
|
||||
ProdQ *ProductionQuality `json:"prodq,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// videoquality
|
||||
// Type:
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// Note: Deprecated in favor of prodq.
|
||||
// Video quality. Refer to List 5.13.
|
||||
VideoQuality *ProductionQuality `json:"videoquality,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// context
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Type of content (game, video, text, etc.). Refer to List 5.14.
|
||||
Context int8 `json:"context,omitempty"`
|
||||
// Type of content (game, video, text, etc.). Refer to List 5.18.
|
||||
Context ContentContext `json:"context,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// contentrating
|
||||
@@ -118,8 +159,8 @@ type Content struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Media rating per QAG guidelines. Refer to List 5.15.
|
||||
QAGMediaRating int8 `json:"qagmediarating,omitempty"`
|
||||
// Media rating per IQG guidelines. Refer to List 5.19.
|
||||
QAGMediaRating IQGMediaRating `json:"qagmediarating,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// keywords
|
||||
@@ -151,7 +192,7 @@ type Content struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Length of content in seconds; appropriate for video or audio.
|
||||
Len uint64 `json:"len,omitempty"`
|
||||
Len int64 `json:"len,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// language
|
||||
@@ -170,6 +211,15 @@ type Content struct {
|
||||
// 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:
|
||||
// ext
|
||||
// Type:
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package openrtb
|
||||
|
||||
// 5.18 Content Context
|
||||
//
|
||||
// Various options for indicating the type of content being used or consumed by the user in which the impression will appear.
|
||||
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
|
||||
// Practitioners should keep in sync with updates to the IQG values.
|
||||
type ContentContext int8
|
||||
|
||||
const (
|
||||
ContentContextVideo ContentContext = 1 // Video (i.e., video file or stream such as Internet TV broadcasts)
|
||||
ContentContextGame ContentContext = 2 // Game (i.e., an interactive software game)
|
||||
ContentContextMusic ContentContext = 3 // Music (i.e., audio file or stream such as Internet radio broadcasts)
|
||||
ContentContextApplication ContentContext = 4 // Application (i.e., an interactive software application)
|
||||
ContentContextText ContentContext = 5 // Text (i.e., primarily textual document such as a web page, eBook, or news article)
|
||||
ContentContextOther ContentContext = 6 // Other (i.e., none of the other categories applies)
|
||||
ContentContextUnknown ContentContext = 7 // Unknown
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package openrtb
|
||||
|
||||
// 5.15 Content Delivery Methods
|
||||
//
|
||||
// Various options for the delivery of video or audio content.
|
||||
type ContentDeliveryMethod int8
|
||||
|
||||
const (
|
||||
ContentDeliveryMethodStreaming ContentDeliveryMethod = 1 // Streaming
|
||||
ContentDeliveryMethodProgressive ContentDeliveryMethod = 2 // Progressive
|
||||
ContentDeliveryMethodDownload ContentDeliveryMethod = 3 // Download
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
package openrtb
|
||||
|
||||
// 5.3 Creative Attributes
|
||||
//
|
||||
// Standard list of creative attributes that can describe an ad being served or serve as restrictions of thereof.
|
||||
type CreativeAttribute int8
|
||||
|
||||
const (
|
||||
CreativeAttributeAudioAdAutoPlay CreativeAttribute = 1 // Audio Ad (Auto-Play)
|
||||
CreativeAttributeAudioAdUserInitiated CreativeAttribute = 2 // Audio Ad (User Initiated)
|
||||
CreativeAttributeExpandableAutomatic CreativeAttribute = 3 // Expandable (Automatic)
|
||||
CreativeAttributeExpandableUserInitiatedClick CreativeAttribute = 4 // Expandable (User Initiated - Click)
|
||||
CreativeAttributeExpandableUserInitiatedRollover CreativeAttribute = 5 // Expandable (User Initiated - Rollover)
|
||||
CreativeAttributeInBannerVideoAdAutoPlay CreativeAttribute = 6 // In-Banner Video Ad (Auto-Play)
|
||||
CreativeAttributeInBannerVideoAdUserInitiated CreativeAttribute = 7 // In-Banner Video Ad (User Initiated)
|
||||
CreativeAttributePop CreativeAttribute = 8 // Pop (e.g., Over, Under, or Upon Exit)
|
||||
CreativeAttributeProvocativeOrSuggestiveImagery CreativeAttribute = 9 // Provocative or Suggestive Imagery
|
||||
CreativeAttributeShakyFlashingFlickeringExtremeAnimationSmileys CreativeAttribute = 10 // Shaky, Flashing, Flickering, Extreme Animation, Smileys
|
||||
CreativeAttributeSurveys CreativeAttribute = 11 // Surveys
|
||||
CreativeAttributeTextOnly CreativeAttribute = 12 // Text Only
|
||||
CreativeAttributeUserInteractive CreativeAttribute = 13 // User Interactive (e.g., Embedded Games)
|
||||
CreativeAttributeWindowsDialogOrAlertStyle CreativeAttribute = 14 // Windows Dialog or Alert Style
|
||||
CreativeAttributeHasAudioOnOffButton CreativeAttribute = 15 // Has Audio On/Off Button
|
||||
CreativeAttributeAdProvidesSkipButton CreativeAttribute = 16 // Ad Provides Skip Button (e.g. VPAID-rendered skip button on pre-roll video)
|
||||
CreativeAttributeAdobeFlash CreativeAttribute = 17 // Adobe Flash
|
||||
)
|
||||
@@ -1,11 +1,11 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.14 Object: Data
|
||||
// 3.2.21 Object: Data
|
||||
//
|
||||
// The data and segment objects together allow additional data about the user to be specified. This data
|
||||
// may be from multiple sources whether from the exchange itself or third party providers as specified by
|
||||
// the id field. A bid request can mix data objects from multiple providers. The specific data providers in
|
||||
// use should be published by the exchange a priori to its bidders.
|
||||
// The data and segment objects together allow additional data about the related object (e.g., user, content) to be specified.
|
||||
// This data may be from multiple sources whether from the exchange itself or third parties as specified by the id field.
|
||||
// A bid request can mix data objects from multiple providers.
|
||||
// The specific data providers in use should be published by the exchange a priori to its bidders.
|
||||
type Data struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -29,7 +29,7 @@ type Data struct {
|
||||
// Type:
|
||||
// object array
|
||||
// Description:
|
||||
// Array of Segment (Section 3.2.15) objects that contain the
|
||||
// Array of Segment (Section 3.2.22) objects that contain the
|
||||
// actual data values.
|
||||
Segment []Segment `json:"segment,omitempty"`
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.18 Object: Deal
|
||||
// 3.2.12 Object: Deal
|
||||
//
|
||||
// This object constitutes a specific deal that was struck a priori between a buyer and a seller. Its presence
|
||||
// with the Pmp collection indicates that this impression is available under the terms of that deal. Refer to
|
||||
// Section 7.2 for more details.
|
||||
// This object constitutes a specific deal that was struck a priori between a buyer and a seller.
|
||||
// Its presence with the Pmp collection indicates that this impression is available under the terms of that deal.
|
||||
// Refer to Section 7.3 for more details.
|
||||
type Deal struct {
|
||||
|
||||
// Attribute:
|
||||
// id
|
||||
// Type:
|
||||
// string
|
||||
// string; required
|
||||
// Description:
|
||||
// A unique identifier for the direct deal.
|
||||
ID string `json:"id,omitempty"`
|
||||
ID string `json:"id"`
|
||||
|
||||
// Attribute:
|
||||
// bidfloor
|
||||
// Type:
|
||||
// float
|
||||
// float; default 0
|
||||
// Description:
|
||||
// Minimum bid for this impression expressed in CPM.
|
||||
BidFloor float64 `json:"bidfloor,omitempty"`
|
||||
@@ -26,10 +26,11 @@ type Deal struct {
|
||||
// Attribute:
|
||||
// bidfloorcur
|
||||
// Type:
|
||||
// string
|
||||
// string; default ”USD”
|
||||
// Description:
|
||||
// Currency specified using ISO-4217 alpha codes. This may be different from bid currency returned
|
||||
// by bidder if this is allowed by the exchange.
|
||||
// Currency specified using ISO-4217 alpha codes. This may be
|
||||
// different from bid currency returned by bidder if this is
|
||||
// allowed by the exchange.
|
||||
BidFloorCur string `json:"bidfloorcur,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -37,18 +38,21 @@ type Deal struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Optional override of the overall auction type of the bid request, where 1 = First Price,
|
||||
// 2 = Second Price Plus, 3 = the value passed in bidfloor is the agreed upon deal price. Additional
|
||||
// auction types can be defined by the exchange.
|
||||
AT int8 `json:"at,omitempty"`
|
||||
// Optional override of the overall auction type of the bid
|
||||
// request, where 1 = First Price, 2 = Second Price Plus, 3 = the
|
||||
// value passed in bidfloor is the agreed upon deal price.
|
||||
// Additional auction types can be defined by the exchange.
|
||||
AT int64 `json:"at,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wseat
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Whitelist of buyer seats allowed to bid on this deal. Seat IDs must be
|
||||
// communicated between bidders and the exchange a priori. Omission implies no seat restrictions.
|
||||
// Whitelist of buyer seats (e.g., advertisers, agencies) allowed to
|
||||
// bid on this deal. IDs of seats and the buyer’s customers to
|
||||
// which they refer must be coordinated between bidders and
|
||||
// the exchange a priori. Omission implies no seat restrictions.
|
||||
WSeat []string `json:"wseat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -56,8 +60,8 @@ type Deal struct {
|
||||
// Type:
|
||||
// string array
|
||||
// Description:
|
||||
// Array of advertiser domains (e.g., advertiser.com) allowed to bid on this deal. Omission implies
|
||||
// no advertiser restrictions.
|
||||
// Array of advertiser domains (e.g., advertiser.com) allowed to
|
||||
// bid on this deal. Omission implies no advertiser restrictions.
|
||||
WADomain []string `json:"wadomain,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
package openrtb
|
||||
|
||||
// OpenRTB 2.5
|
||||
// 3.2.18 Object: Device
|
||||
//
|
||||
// This object provides information pertaining to the device through which the user is interacting. Device
|
||||
// information includes its hardware, platform, location, and carrier data. The device can refer to a mobile
|
||||
// handset, a desktop computer, set top box, or other digital device.
|
||||
// This object provides information pertaining to the device through which the user is interacting.
|
||||
// Device information includes its hardware, platform, location, and carrier data.
|
||||
// The device can refer to a mobile handset, a desktop computer, set top box, or other digital device.
|
||||
//
|
||||
// BEST PRACTICE: There are currently no prominent open source lists for device makes, models, operating systems, or carriers.
|
||||
// Exchanges typically use commercial products or other proprietary lists for these attributes.
|
||||
// Until suitable open standards are available, exchanges are highly encouraged to publish lists of their device make, model, operating system, and carrier values to bidders.
|
||||
//
|
||||
// BEST PRACTICE: Proper device IP detection in mobile is not straightforward.
|
||||
// Typically it involves starting at the left of the x-forwarded-for header, skipping private carrier networks (e.g., 10.x.x.x or 192.x.x.x), and possibly scanning for known carrier IP ranges.
|
||||
// Exchanges are urged to research and implement this feature carefully when presenting device IP values to bidders.
|
||||
type Device struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -65,8 +72,8 @@ type Device struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// The general type of device. Refer to List 5.17.
|
||||
DeviceType int8 `json:"devicetype,omitempty"`
|
||||
// The general type of device. Refer to List 5.21.
|
||||
DeviceType DeviceType `json:"devicetype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// make
|
||||
@@ -153,7 +160,8 @@ type Device struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Indicates if the geolocation API will be available to JavaScript code running in the banner, where 0 = no, 1 = yes.
|
||||
// Indicates if the geolocation API will be available to JavaScript
|
||||
// code running in the banner, where 0 = no, 1 = yes.
|
||||
GeoFetch int8 `json:"geofetch,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -177,8 +185,8 @@ type Device struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Carrier or ISP (e.g., “VERIZON”). “WIFI” is often used in mobile
|
||||
// to indicate high bandwidth (e.g., video friendly vs. cellular).
|
||||
// Carrier or ISP (e.g., “VERIZON”) using exchange curated string
|
||||
// names which should be published to bidders a priori.
|
||||
Carrier string `json:"carrier,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -186,9 +194,11 @@ type Device struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Mobile carrier as the concatenated MCC-MNC code (e.g., “310-005” identifies Verizon Wireless CDMA in the USA).
|
||||
// Refer to https://en.wikipedia.org/wiki/Mobile_country_code for further examples. Note that the dash between
|
||||
// the MCC and MNC parts is required to remove parsing ambiguity.
|
||||
// Mobile carrier as the concatenated MCC-MNC code (e.g.,
|
||||
// “310-005” identifies Verizon Wireless CDMA in the USA).
|
||||
// Refer to https://en.wikipedia.org/wiki/Mobile_country_code
|
||||
// for further examples. Note that the dash between the MCC
|
||||
// and MNC parts is required to remove parsing ambiguity.
|
||||
MCCMNC string `json:"mccmnc,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -197,7 +207,7 @@ type Device struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Network connection type. Refer to List 5.22.
|
||||
Connectiontype int8 `json:"connectiontype,omitempty"`
|
||||
ConnectionType *ConnectionType `json:"connectiontype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ifa
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package openrtb
|
||||
|
||||
// 5.21 Device Type
|
||||
//
|
||||
// Type of device from which the impression originated.
|
||||
//
|
||||
// OpenRTB version 2.2 of the specification added distinct values for Mobile and Tablet.
|
||||
// It is recommended that any bidder adding support for 2.2 treat a value of 1 as an acceptable alias of 4 & 5.
|
||||
//
|
||||
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
|
||||
// Practitioners should keep in sync with updates to the IQG values.
|
||||
type DeviceType int8
|
||||
|
||||
const (
|
||||
DeviceTypeMobileTablet DeviceType = 1 // Mobile/Tablet (Version 2.0)
|
||||
DeviceTypePersonalComputer DeviceType = 2 // Personal Computer (Version 2.0)
|
||||
DeviceTypeConnectedTV DeviceType = 3 // Connected TV (Version 2.0)
|
||||
DeviceTypePhone DeviceType = 4 // Phone (New for Version 2.2)
|
||||
DeviceTypeTablet DeviceType = 5 // Tablet (New for Version 2.2)
|
||||
DeviceTypeConnectedDevice DeviceType = 6 // Connected Device (New for Version 2.2)
|
||||
DeviceTypeSetTopBox DeviceType = 7 // Set Top Box (New for Version 2.2)
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package openrtb
|
||||
|
||||
// 5.5 Expandable Direction
|
||||
//
|
||||
// Directions in which an expandable ad may expand, given the positioning of the ad unit on the page and constraints imposed by the content.
|
||||
type ExpandableDirection int8
|
||||
|
||||
const (
|
||||
ExpandableDirectionLeft ExpandableDirection = 1 // Left
|
||||
ExpandableDirectionRight ExpandableDirection = 2 // Right
|
||||
ExpandableDirectionUp ExpandableDirection = 3 // Up
|
||||
ExpandableDirectionDown ExpandableDirection = 4 // Down
|
||||
ExpandableDirectionFullScreen ExpandableDirection = 5 // Full Screen
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package openrtb
|
||||
|
||||
// 5.16 Feed Types
|
||||
//
|
||||
// Types of feeds, typically for audio.
|
||||
type FeedType int8
|
||||
|
||||
const (
|
||||
FeedTypeMusicService FeedType = 1 // Music Service
|
||||
FeedTypeFMAMBroadcast FeedType = 2 // FM/AM Broadcast
|
||||
FeedTypePodcast FeedType = 3 // Podcast
|
||||
)
|
||||
@@ -2,18 +2,19 @@ package openrtb
|
||||
|
||||
// 3.2.10 Object: Format
|
||||
//
|
||||
// OpenRTB 2.5:
|
||||
|
||||
// This object represents an allowed size (i.e., height and width combination) or Flex Ad parameters for a banner impression.
|
||||
// These are typically used in an array where multiple sizes are permitted. It is recommended that either the w/h pair or
|
||||
// the wratio/hratio/wmin set (i.e., for Flex Ads) be specified.
|
||||
// These are typically used in an array where multiple sizes are permitted.
|
||||
// It is recommended that either the w/h pair or the wratio/hratio/wmin set (i.e., for Flex Ads) be specified.
|
||||
type Format struct {
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Width in device independent pixels (DIPS).
|
||||
W uint64 `json:"w"`
|
||||
W uint64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// h
|
||||
@@ -21,31 +22,32 @@ type Format struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Height in device independent pixels (DIPS).
|
||||
H uint64 `json:"h"`
|
||||
H uint64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wratio
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Relative width when expressing size as a ratio.
|
||||
WRatio int `json:"wratio,omitempty"`
|
||||
// Relative width when expressing size as a ratio
|
||||
WRatio uint64 `json:"wratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// hratio
|
||||
// Type:
|
||||
// integer
|
||||
// Integer
|
||||
// Description:
|
||||
// Relative height when expressing size as a ratio.
|
||||
HRatio int `json:"hratio,omitempty"`
|
||||
HRatio uint64 `json:"hratio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// wmin
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// The minimum width in device independent pixels (DIPS) at which the ad will be displayed the size is expressed as a ratio.
|
||||
WMin int `json:"wmin,omitempty"`
|
||||
// The minimum width in device independent pixels (DIPS) at
|
||||
// which the ad will be displayed the size is expressed as a ratio.
|
||||
WMin uint64 `json:"wmin,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -2,12 +2,13 @@ package openrtb
|
||||
|
||||
// 3.2.19 Object: Geo
|
||||
//
|
||||
// This object encapsulates various methods for specifying a geographic location. When subordinate to a
|
||||
// Device object, it indicates the location of the device which can also be interpreted as the user’s current
|
||||
// location. When subordinate to a User object, it indicates the location of the user’s home base (i.e., not
|
||||
// necessarily their current location).
|
||||
// The lat/lon attributes should only be passed if they conform to the accuracy depicted in the type
|
||||
// attribute. For example, the centroid of a geographic region such as postal code should not be passed.
|
||||
// This object encapsulates various methods for specifying a geographic location.
|
||||
// When subordinate to a
|
||||
// Device object, it indicates the location of the device which can also be interpreted as the user’s current location.
|
||||
// When subordinate to a User object, it indicates the location of the user’s home base (i.e., not necessarily their current location).
|
||||
//
|
||||
// The lat/lon attributes should only be passed if they conform to the accuracy depicted in the type attribute.
|
||||
// For example, the centroid of a geographic region such as postal code should not be passed.
|
||||
type Geo struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -32,8 +33,40 @@ type Geo struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Source of location data; recommended when passing
|
||||
// lat/lon. Refer to List 5.16.
|
||||
Type int8 `json:"type,omitempty"`
|
||||
// lat/lon. Refer to List 5.20.
|
||||
Type LocationType `json:"type,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// accuracy
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Estimated location accuracy in meters; recommended when
|
||||
// lat/lon are specified and derived from a device’s location
|
||||
// services (i.e., type = 1). Note that this is the accuracy as
|
||||
// reported from the device. Consult OS specific documentation
|
||||
// (e.g., Android, iOS) for exact interpretation.
|
||||
Accuracy uint64 `json:"accuracy,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// lastfix
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Number of seconds since this geolocation fix was established.
|
||||
// Note that devices may cache location data across multiple
|
||||
// fetches. Ideally, this value should be from the time the actual
|
||||
// fix was taken.
|
||||
LastFix int64 `json:"lastfix,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ipservice
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Service or provider used to determine geolocation from IP
|
||||
// address if applicable (i.e., type = 2). Refer to List 5.23.
|
||||
IPService IPLocationService `json:"ipservice,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// accuracy
|
||||
@@ -119,7 +152,7 @@ type Geo struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Local time as the number +/- of minutes from UTC.
|
||||
UTCOffset int16 `json:"utcoffset,omitempty"`
|
||||
UTCOffset int64 `json:"utcoffset,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.2 Object: Imp
|
||||
// 3.2.4 Object: Imp
|
||||
//
|
||||
// This object describes an ad placement or impression being auctioned. A single bid request can include
|
||||
// multiple Imp objects, a use case for which might be an exchange that supports selling all ad positions on
|
||||
// a given page. Each Imp object has a required ID so that bids can reference them individually.
|
||||
// This object describes an ad placement or impression being auctioned.
|
||||
// A single bid request can include multiple Imp objects, a use case for which might be an exchange that supports selling all ad positions on a given page.
|
||||
// Each Imp object has a required ID so that bids can reference them individually.
|
||||
//
|
||||
// The presence of Banner (Section 3.2.3), Video (Section 3.2.4), and/or Native (Section 3.2.5) objects
|
||||
// subordinate to the Imp object indicates the type of impression being offered. The publisher can choose
|
||||
// one such type which is the typical case or mix them at their discretion. However, any given bid for the
|
||||
// impression must conform to one of the offered types.
|
||||
// The presence of Banner (Section 3.2.6), Video (Section 3.2.7), and/or Native (Section 3.2.9) objects subordinate to the Imp object indicates the type of impression being offered.
|
||||
// The publisher can choose one such type which is the typical case or mix them at their discretion.
|
||||
// However, any given bid for the impression must conform to one of the offered types.
|
||||
type Imp struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -17,16 +16,24 @@ type Imp struct {
|
||||
// Type:
|
||||
// string; required
|
||||
// Description:
|
||||
// A unique identifier for this impression within the context of the bid request (typically, starts
|
||||
// with 1 and increments.
|
||||
// A unique identifier for this impression within the context of
|
||||
// the bid request (typically, starts with 1 and increments.
|
||||
ID string `json:"id"`
|
||||
|
||||
// Attribute:
|
||||
// metric
|
||||
// Type:
|
||||
// object array
|
||||
// Description:
|
||||
// An array of Metric object (Section 3.2.5).
|
||||
Metric []Metric `json:"metric,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// banner
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// A Banner object (Section 3.2.3); required if this impression is
|
||||
// A Banner object (Section 3.2.6); required if this impression is
|
||||
// offered as a banner ad opportunity.
|
||||
Banner *Banner `json:"banner,omitempty"`
|
||||
|
||||
@@ -35,19 +42,37 @@ type Imp struct {
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// A Video object (Section 3.2.4); required if this impression is
|
||||
// A Video object (Section 3.2.7); required if this impression is
|
||||
// offered as a video ad opportunity.
|
||||
Video *Video `json:"video,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// audio
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// An Audio object (Section 3.2.8); required if this impression is
|
||||
// offered as an audio ad opportunity.
|
||||
Audio *Audio `json:"audio,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// native
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// A Native object (Section 3.2.5); required if this impression is
|
||||
// offered as a native ad opportunity
|
||||
// A Native object (Section 3.2.9); required if this impression is
|
||||
// offered as a native ad opportunity.
|
||||
Native *Native `json:"native,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pmp
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// A Pmp object (Section 3.2.11) containing any private
|
||||
// marketplace deals in effect for this impression.
|
||||
PMP *PMP `json:"pmp,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// displaymanager
|
||||
// Type:
|
||||
@@ -59,6 +84,17 @@ type Imp struct {
|
||||
// Recommended for video and/or apps.
|
||||
DisplayManager string `json:"displaymanager,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// displaymanagerver
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Version of ad mediation partner, SDK technology, or player
|
||||
// responsible for rendering ad (typically video or mobile). Used
|
||||
// by some ad servers to customize ad code by partner.
|
||||
// Recommended for video and/or apps.
|
||||
DisplayManagerVer string `json:"displaymanagerver,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// instl
|
||||
// Type:
|
||||
@@ -95,6 +131,17 @@ type Imp struct {
|
||||
// allowed by the exchange.
|
||||
BidFloorCur string `json:"bidfloorcur,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// clickbrowser
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Indicates the type of browser opened upon clicking the
|
||||
// creative in an app, where 0 = embedded, 1 = native. Note that
|
||||
// the Safari View Controller in iOS 9.x devices is considered a
|
||||
// native browser for purposes of this attribute.
|
||||
ClickBrowser int8 `json:"clickbrowser,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// secure
|
||||
// Type:
|
||||
@@ -104,7 +151,7 @@ type Imp struct {
|
||||
// creative assets and markup, where 0 = non-secure, 1 = secure.
|
||||
// If omitted, the secure state is unknown, but non-secure HTTP
|
||||
// support can be assumed.
|
||||
Secure int8 `json:"secure,omitempty"`
|
||||
Secure *int8 `json:"secure,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// iframebuster
|
||||
@@ -115,12 +162,13 @@ type Imp struct {
|
||||
IframeBuster []string `json:"iframebuster,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pmp
|
||||
// exp
|
||||
// Type:
|
||||
// object
|
||||
// integer
|
||||
// Description:
|
||||
// A Pmp object (Section 3.2.17) containing any private marketplace deals in effect for this impression.
|
||||
PMP *PMP `json:"pmp,omitempty"`
|
||||
// Advisory as to the number of seconds that may elapse
|
||||
// between the auction and the actual impression.
|
||||
Exp int64 `json:"exp,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package openrtb
|
||||
|
||||
// 5.23 IP Location Services
|
||||
//
|
||||
// Services and/or vendors used for resolving IP addresses to geolocations.
|
||||
type IPLocationService int8
|
||||
|
||||
const (
|
||||
IPLocationServiceIP2location IPLocationService = 1 // ip2location
|
||||
IPLocationServiceNeustar IPLocationService = 2 // Neustar (Quova)
|
||||
IPLocationServiceMaxMind IPLocationService = 3 // MaxMind
|
||||
IPLocationServiceNetAcuity IPLocationService = 4 // NetAcuity (Digital Element)
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package openrtb
|
||||
|
||||
// 5.19 IQG Media Ratings
|
||||
//
|
||||
// Media ratings used in describing content based on the IQG 2.1 categorization.
|
||||
// Refer to www.iab.com/guidelines/digital-video-suite for more information.
|
||||
type IQGMediaRating int8
|
||||
|
||||
const (
|
||||
IQGMediaRatingAll IQGMediaRating = 1 // All Audiences
|
||||
IQGMediaRatingOver12 IQGMediaRating = 2 // Everyone Over 12
|
||||
IQGMediaRatingMature IQGMediaRating = 3 // Mature Audiences
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package openrtb
|
||||
|
||||
// 5.20 Location Type
|
||||
//
|
||||
// Options to indicate how the geographic information was determined.
|
||||
type LocationType int8
|
||||
|
||||
const (
|
||||
LocationTypeGPSLocationServices LocationType = 1 // GPS/Location Services
|
||||
LocationTypeIPAddress LocationType = 2 // IP Address
|
||||
LocationTypeUserProvided LocationType = 3 // User provided (e.g., registration data)
|
||||
)
|
||||
@@ -0,0 +1,41 @@
|
||||
package openrtb
|
||||
|
||||
// 5.25 Loss Reason Codes
|
||||
//
|
||||
// Options for an exchange to inform a bidder as to the reason why they did not win an impression.
|
||||
type LossReasonCode int64
|
||||
|
||||
const (
|
||||
LossReasonCodeBidWon LossReasonCode = 0 // Bid Won
|
||||
LossReasonCodeInternalError LossReasonCode = 1 // Internal Error
|
||||
LossReasonCodeImpressionOpportunityExpired LossReasonCode = 2 // Impression Opportunity Expired
|
||||
LossReasonCodeInvalidBidResponse LossReasonCode = 3 // Invalid Bid Response
|
||||
LossReasonCodeInvalidDealID LossReasonCode = 4 // Invalid Deal ID
|
||||
LossReasonCodeInvalidAuctionID LossReasonCode = 5 // Invalid Auction ID
|
||||
LossReasonCodeInvalidAdvertiserDomain LossReasonCode = 6 // Invalid (i.e., malformed) Advertiser Domain
|
||||
LossReasonCodeMissingMarkup LossReasonCode = 7 // Missing Markup
|
||||
LossReasonCodeMissingCreativeID LossReasonCode = 8 // Missing Creative ID
|
||||
LossReasonCodeMissingBidPrice LossReasonCode = 9 // Missing Bid Price
|
||||
LossReasonCodeMissingMinimumCreativeApprovalData LossReasonCode = 10 // Missing Minimum Creative Approval Data
|
||||
LossReasonCodeBidBelowAuctionFloor LossReasonCode = 100 // Bid was Below Auction Floor
|
||||
LossReasonCodeBidBelowDealFloor LossReasonCode = 101 // Bid was Below Deal Floor
|
||||
LossReasonCodeLostToHigherBid LossReasonCode = 102 // Lost to Higher Bid
|
||||
LossReasonCodeLostToBidForPMPDeal LossReasonCode = 103 // Lost to a Bid for a PMP Deal
|
||||
LossReasonCodeBuyerSeatBlocked LossReasonCode = 104 // Buyer Seat Blocked
|
||||
LossReasonCodeCreativeFilteredGeneral LossReasonCode = 200 // Creative Filtered – General; reason unknown.
|
||||
LossReasonCodeCreativeFilteredPendingProcessingByExchange LossReasonCode = 201 // Creative Filtered – Pending processing by Exchange (e.g., approval, transcoding, etc.)
|
||||
LossReasonCodeCreativeFilteredDisapprovedByExchange LossReasonCode = 202 // Creative Filtered – Disapproved by Exchange
|
||||
LossReasonCodeCreativeFilteredSizeNotAllowed LossReasonCode = 203 // Creative Filtered – Size Not Allowed
|
||||
LossReasonCodeCreativeFilteredIncorrectCreativeFormat LossReasonCode = 204 // Creative Filtered – Incorrect Creative Format
|
||||
LossReasonCodeCreativeFilteredAdvertiserExclusions LossReasonCode = 205 // Creative Filtered – Advertiser Exclusions
|
||||
LossReasonCodeCreativeFilteredAppBundleExclusions LossReasonCode = 206 // Creative Filtered – App Bundle Exclusions
|
||||
LossReasonCodeCreativeFilteredNotSecure LossReasonCode = 207 // Creative Filtered – Not Secure
|
||||
LossReasonCodeCreativeFilteredLanguageExclusions LossReasonCode = 208 // Creative Filtered – Language Exclusions
|
||||
LossReasonCodeCreativeFilteredCategoryExclusions LossReasonCode = 209 // Creative Filtered – Category Exclusions
|
||||
LossReasonCodeCreativeFilteredCreativeAttributeExclusions LossReasonCode = 210 // Creative Filtered – Creative Attribute Exclusions
|
||||
LossReasonCodeCreativeFilteredAdTypeExclusions LossReasonCode = 211 // Creative Filtered – Ad Type Exclusions
|
||||
LossReasonCodeCreativeFilteredAnimationTooLong LossReasonCode = 212 // Creative Filtered – Animation Too Long
|
||||
LossReasonCodeCreativeFilteredNotAllowedInPMPDeal LossReasonCode = 213 // Creative Filtered – Not Allowed in PMP Deal
|
||||
|
||||
// ≥ 1000 Exchange specific (should be communicated to bidders a priori)
|
||||
)
|
||||
@@ -0,0 +1,46 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.5 Object: Metric
|
||||
//
|
||||
// This object is associated with an impression as an array of metrics.
|
||||
// These metrics can offer insight into the impression to assist with decisioning such as average recent viewability, click-through rate, etc.
|
||||
// Each metric is identified by its type, reports the value of the metric, and optionally identifies the source or vendor measuring the value.
|
||||
type Metric struct {
|
||||
|
||||
// Attribute:
|
||||
// type
|
||||
// Type:
|
||||
// string; required
|
||||
// Description:
|
||||
// Type of metric being presented using exchange curated string
|
||||
// names which should be published to bidders a priori.\
|
||||
Type string `json:"type"`
|
||||
|
||||
// Attribute:
|
||||
// value
|
||||
// Type:
|
||||
// float; required
|
||||
// Dscription:
|
||||
// Number representing the value of the metric. Probabilities
|
||||
// must be in the range 0.0 – 1.0.
|
||||
Value float64 `json:"value,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// vendor
|
||||
// Type:
|
||||
// string; recommended
|
||||
// Description:
|
||||
// Source of the value using exchange curated string names
|
||||
// which should be published to bidders a priori. If the exchange
|
||||
// itself is the source versus a third party, “EXCHANGE” is
|
||||
// recommended.
|
||||
Vendor string `json:"vendor,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// Placeholder for exchange-specific extensions to OpenRTB.
|
||||
Ext RawJSON `json:"ext,omitempty"`
|
||||
}
|
||||
@@ -1,20 +1,19 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.5 Object: Native
|
||||
// 3.2.9 Object: Native
|
||||
//
|
||||
// This object represents a native type impression. Native ad units are intended to blend seamlessly into
|
||||
// the surrounding content (e.g., a sponsored Twitter or Facebook post). As such, the response must be
|
||||
// well-structured to afford the publisher fine-grained control over rendering.
|
||||
// The Native Subcommittee has developed a companion specification to OpenRTB called the Native Ad
|
||||
// Specification. It defines the request parameters and response markup structure of native ad units. This
|
||||
// object provides the means of transporting request parameters as an opaque string so that the specific
|
||||
// parameters can evolve separately under the auspices of the Native Ad Specification. Similarly, the ad
|
||||
// markup served will be structured according to that specification.
|
||||
// This object represents a native type impression.
|
||||
// Native ad units are intended to blend seamlessly into the surrounding content (e.g., a sponsored Twitter or Facebook post).
|
||||
// As such, the response must be well-structured to afford the publisher fine-grained control over rendering.
|
||||
//
|
||||
// The presence of a Native as a subordinate of the Imp object indicates that this impression is offered as
|
||||
// a native type impression. At the publisher’s discretion, that same impression may also be offered as
|
||||
// banner and/or video by also including as Imp subordinates the Banner and/or Video objects,
|
||||
// respectively. However, any given bid for the impression must conform to one of the offered types.
|
||||
// The Native Subcommittee has developed a companion specification to OpenRTB called the Dynamic Native Ads API.
|
||||
// It defines the request parameters and response markup structure of native ad units.
|
||||
// This object provides the means of transporting request parameters as an opaque string so that the specific parameters can evolve separately under the auspices of the Dynamic Native Ads API.
|
||||
// Similarly, the ad markup served will be structured according to that specification.
|
||||
//
|
||||
// The presence of a Native as a subordinate of the Imp object indicates that this impression is offered as a native type impression.
|
||||
// At the publisher’s discretion, that same impression may also be offered as banner, video, and/or audio by also including as Imp subordinates objects of those types.
|
||||
// However, any given bid for the impression must conform to one of the offered types.
|
||||
type Native struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -30,8 +29,8 @@ type Native struct {
|
||||
// Type:
|
||||
// string; recommended
|
||||
// Description:
|
||||
// Version of the Native Ad Specification to which request
|
||||
// complies; highly recommended for efficient parsing
|
||||
// Version of the Dynamic Native Ads API to which request
|
||||
// complies; highly recommended for efficient parsing.
|
||||
Ver string `json:"ver,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -40,8 +39,9 @@ type Native struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// List of supported API frameworks for this impression. Refer to
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be supported.
|
||||
API []int8 `json:"api,omitempty"`
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be
|
||||
// supported.
|
||||
API []APIFramework `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// sequence
|
||||
@@ -49,7 +49,7 @@ type Native struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// Blocked creative attributes. Refer to List 5.3.
|
||||
BAttr []int8 `json:"battr,omitempty"`
|
||||
BAttr []CreativeAttribute `json:"battr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package openrtb
|
||||
|
||||
// 5.24 No-Bid Reason Codes
|
||||
//
|
||||
// Options for a bidder to signal the exchange as to why it did not offer a bid for the impression.
|
||||
type NoBidReasonCode int8
|
||||
|
||||
const (
|
||||
NoBidReasonCodeUnknownError NoBidReasonCode = 0 // Unknown Error
|
||||
NoBidReasonCodeTechnicalError NoBidReasonCode = 1 // Technical Error
|
||||
NoBidReasonCodeInvalidRequest NoBidReasonCode = 2 // Invalid Request
|
||||
NoBidReasonCodeKnownWebSpider NoBidReasonCode = 3 // Known Web Spider
|
||||
NoBidReasonCodeSuspectedNonHumanTraffic NoBidReasonCode = 4 // Suspected Non-Human Traffic
|
||||
NoBidReasonCodeCloudDataCenterProxyIP NoBidReasonCode = 5 // Cloud, Data center, or Proxy IP
|
||||
NoBidReasonCodeUnsupportedDevice NoBidReasonCode = 6 // Unsupported Device
|
||||
NoBidReasonCodeBlockedPublisherOrSite NoBidReasonCode = 7 // Blocked Publisher or Site
|
||||
NoBidReasonCodeUnmatchedUser NoBidReasonCode = 8 // Unmatched User
|
||||
NoBidReasonCodeDailyReaderCapMet NoBidReasonCode = 9 // Daily Reader Cap Met
|
||||
NoBidReasonCodeDailyDomainCapMet NoBidReasonCode = 10 // Daily Domain Cap Met
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
// Package openrtb provides OpenRTB v2.5 types:
|
||||
// https://www.iab.com/guidelines/real-time-bidding-rtb-project/
|
||||
// https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf
|
||||
package openrtb
|
||||
@@ -0,0 +1,12 @@
|
||||
package openrtb
|
||||
|
||||
// 5.11 Playback Cessation Modes
|
||||
//
|
||||
// Various modes for when playback terminates.
|
||||
type PlaybackCessationMode int8
|
||||
|
||||
const (
|
||||
PlaybackCessationModeVideoCompletionOrTerminatedByUser PlaybackCessationMode = 1 // On Video Completion or when Terminated by User
|
||||
PlaybackCessationModeLeavingViewportOrTerminatedByUser PlaybackCessationMode = 2 // On Leaving Viewport or when Terminated by User
|
||||
PlaybackCessationModeLeavingViewportUntilVideoCompletionOrTerminatedByUser PlaybackCessationMode = 3 // On Leaving Viewport Continues as a Floating/Slider Unit until Video Completion or when Terminated by User
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package openrtb
|
||||
|
||||
// 5.10 Playback Methods
|
||||
//
|
||||
// Various playback methods.
|
||||
type PlaybackMethod int8
|
||||
|
||||
const (
|
||||
PlaybackMethodPageLoadSoundOn PlaybackMethod = 1 // Initiates on Page Load with Sound On
|
||||
PlaybackMethodPageLoadSoundOff PlaybackMethod = 2 // Initiates on Page Load with Sound Off by Default
|
||||
PlaybackMethodClickSoundOn PlaybackMethod = 3 // Initiates on Click with Sound On
|
||||
PlaybackMethodMouseOverSoundOn PlaybackMethod = 4 // Initiates on Mouse-Over with Sound On
|
||||
PlaybackMethodEnteringViewportSoundOn PlaybackMethod = 5 // Initiates on Entering Viewport with Sound On
|
||||
PlaybackMethodEnteringViewportSoundOff PlaybackMethod = 6 // Initiates on Entering Viewport with Sound Off by Default
|
||||
)
|
||||
@@ -1,27 +1,29 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.17 Object: Pmp
|
||||
// 3.2.11 Object: Pmp
|
||||
//
|
||||
// This object is the private marketplace container for direct deals between buyers and sellers that may pertain
|
||||
// to this impression. The actual deals are represented as a collection of Deal objects. Refer to Section 7.2
|
||||
// for more details.
|
||||
// This object is the private marketplace container for direct deals between buyers and sellers that may pertain to this impression.
|
||||
// The actual deals are represented as a collection of Deal objects.
|
||||
// Refer to Section 7.3 for more details.
|
||||
type PMP struct {
|
||||
|
||||
// Attribute:
|
||||
// private_auction
|
||||
// Type:
|
||||
// integer
|
||||
// integer; default 0
|
||||
// Description:
|
||||
// Indicator of auction eligibility to seats named in the Direct Deals object, where 0 = all bids are accepted,
|
||||
// 1 = bids are restricted to the deals specified and the terms thereof.
|
||||
// Indicator of auction eligibility to seats named in the Direct
|
||||
// Deals object, where 0 = all bids are accepted, 1 = bids are
|
||||
// restricted to the deals specified and the terms thereof.
|
||||
PrivateAuction int8 `json:"private_auction,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// id
|
||||
// deals
|
||||
// Type:
|
||||
// integer
|
||||
// object array
|
||||
// Description:
|
||||
// Array of Deal (Section 3.2.18) objects that convey the specific deals applicable to this impression.
|
||||
// Array of Deal (Section 3.2.12) objects that convey the specific
|
||||
// deals applicable to this impression.
|
||||
Deals []Deal `json:"deals,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.10 Object: Producer
|
||||
// 3.2.17 Object: Producer
|
||||
//
|
||||
// This object defines the producer of the content in which the ad will be shown. This is particularly useful
|
||||
// when the content is syndicated and may be distributed through different publishers and thus when the
|
||||
// producer and publisher are not necessarily the same entity.
|
||||
// This object defines the producer of the content in which the ad will be shown.
|
||||
// This is particularly useful when the content is syndicated and may be distributed through different publishers and thus when the producer and publisher are not necessarily the same entity.
|
||||
type Producer struct {
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package openrtb
|
||||
|
||||
// 5.13 Production Quality
|
||||
//
|
||||
// Options for content quality.
|
||||
// These values are defined by the IAB; refer to www.iab.com/wp-content/uploads/2015/03/long-form-video-final.pdf for more information.
|
||||
type ProductionQuality int8
|
||||
|
||||
const (
|
||||
ProductionQualityUnknown ProductionQuality = 0 // Unknown
|
||||
ProductionQualityProfessionallyProduced ProductionQuality = 1 // Professionally Produced
|
||||
ProductionQualityProsumer ProductionQuality = 2 // Prosumer
|
||||
ProductionQualityUserGenerated ProductionQuality = 3 // User Generated (UGC)
|
||||
)
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package openrtb
|
||||
|
||||
// 5.8 Protocols
|
||||
//
|
||||
// Options for the various bid response protocols that could be supported by an exchange.
|
||||
type Protocol int8
|
||||
|
||||
const (
|
||||
ProtocolVAST10 Protocol = 1 // VAST 1.0
|
||||
ProtocolVAST20 Protocol = 2 // VAST 2.0
|
||||
ProtocolVAST30 Protocol = 3 // VAST 3.0
|
||||
ProtocolVAST10Wrapper Protocol = 4 // VAST 1.0 Wrapper
|
||||
ProtocolVAST20Wrapper Protocol = 5 // VAST 2.0 Wrapper
|
||||
ProtocolVAST30Wrapper Protocol = 6 // VAST 3.0 Wrapper
|
||||
ProtocolVAST40 Protocol = 7 // VAST 4.0
|
||||
ProtocolVAST40Wrapper Protocol = 8 // VAST 4.0 Wrapper
|
||||
ProtocolDAAST10 Protocol = 9 // DAAST 1.0
|
||||
ProtocolDAAST10Wrapper Protocol = 10 // DAAST 1.0 Wrapper
|
||||
)
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.8 Object: Publisher
|
||||
// 3.2.15 Object: Publisher
|
||||
//
|
||||
// This object describes the publisher of the media in which the ad will be displayed. The publisher is
|
||||
// typically the seller in an OpenRTB transaction.
|
||||
// This object describes the publisher of the media in which the ad will be displayed.
|
||||
// The publisher is typically the seller in an OpenRTB transaction.
|
||||
type Publisher struct {
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.16 Object: Regs
|
||||
// 3.2.3 Object: Regs
|
||||
//
|
||||
// This object contains any legal, governmental, or industry regulations that apply to the request. The coppa flag
|
||||
// signals whether or not the request falls under the United States Federal Trade Commission’s regulations for the
|
||||
// United States Children’s Online Privacy Protection Act (“COPPA”). Refer to Section 7.1 for more information.
|
||||
// This object contains any legal, governmental, or industry regulations that apply to the request.
|
||||
// The coppa flag signals whether or not the request falls under the United States Federal Trade Commission’s regulations for the United States Children’s Online Privacy Protection Act (“COPPA”).
|
||||
type Regs struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -14,6 +13,7 @@ type Regs struct {
|
||||
// Description:
|
||||
// Flag indicating if this request is subject to the COPPA
|
||||
// regulations established by the USA FTC, where 0 = no, 1 = yes.
|
||||
// Refer to Section 7.5 for more information.
|
||||
COPPA int8 `json:"coppa,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// openrtb package provides OpenRTB v2.3 types,
|
||||
// according to OpenRTB API Specification Version 2.3:
|
||||
// http://openrtb.github.io/OpenRTB/
|
||||
package openrtb
|
||||
+4
-5
@@ -2,10 +2,8 @@ package openrtb
|
||||
|
||||
// 4.2.2 Object: SeatBid
|
||||
//
|
||||
// A bid response can contain multiple SeatBid objects, each on behalf of a different bidder seat and each
|
||||
// containing one or more individual bids. If multiple impressions are presented in the request, the group
|
||||
// attribute can be used to specify if a seat is willing to accept any impressions that it can win (default) or if
|
||||
// it is only interested in winning any if it can win them all as a group.
|
||||
// A bid response can contain multiple SeatBid objects, each on behalf of a different bidder seat and each containing one or more individual bids.
|
||||
// If multiple impressions are presented in the request, the group attribute can be used to specify if a seat is willing to accept any impressions that it can win (default) or if it is only interested in winning any if it can win them all as a group.
|
||||
type SeatBid struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -22,7 +20,8 @@ type SeatBid struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// ID of the bidder seat on whose behalf this bid is made.
|
||||
// ID of the buyer seat (e.g., advertiser, agency) on whose behalf
|
||||
// this bid is made.
|
||||
Seat string `json:"seat,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.15 Object: Segment
|
||||
// 3.2.22 Object: Segment
|
||||
//
|
||||
// Segment objects are essentially key-value pairs that convey specific units of data about the user. The
|
||||
// parent Data object is a collection of such values from a given data provider. The specific segment
|
||||
// names and value options must be published by the exchange a priori to its bidders.
|
||||
// Segment objects are essentially key-value pairs that convey specific units of data.
|
||||
// The parent Data object is a collection of such values from a given data provider.
|
||||
// The specific segment names and value options must be published by the exchange a priori to its bidders.
|
||||
type Segment struct {
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.6 Object: Site
|
||||
// 3.2.13 Object: Site
|
||||
//
|
||||
// This object should be included if the ad supported content is a website as opposed to a non-browser
|
||||
// application. A bid request must not contain both a Site and an App object. At a minimum, it is useful
|
||||
// to provide a site ID or page URL, but this is not strictly required.
|
||||
// This object should be included if the ad supported content is a website as opposed to a non-browser application.
|
||||
// A bid request must not contain both a Site and an App object.
|
||||
// At a minimum, it is useful to provide a site ID or page URL, but this is not strictly required.
|
||||
type Site struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -70,7 +70,7 @@ type Site struct {
|
||||
// Type:
|
||||
// string
|
||||
// Description:
|
||||
// Referrer URL that caused navigation to the current page.
|
||||
// Referrer URL that caused navigation to the current page
|
||||
Ref string `json:"ref,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -86,7 +86,8 @@ type Site struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Mobile-optimized signal, where 0 = no, 1 = yes.
|
||||
// Indicates if the site has been programmed to optimize layout
|
||||
// when viewed on mobile devices, where 0 = no, 1 = yes.
|
||||
Mobile int8 `json:"mobile,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -102,7 +103,7 @@ type Site struct {
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// Details about the Publisher (Section 3.2.8) of the site.
|
||||
// Details about the Publisher (Section 3.2.15) of the site.
|
||||
Publisher *Publisher `json:"publisher,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -110,7 +111,7 @@ type Site struct {
|
||||
// Type:
|
||||
// object
|
||||
// Description:
|
||||
// Details about the Content (Section 3.2.9) within the site.
|
||||
// Details about the Content (Section 3.2.16) within the site.
|
||||
Content *Content `json:"content,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
|
||||
@@ -2,35 +2,38 @@ package openrtb
|
||||
|
||||
// 3.2.2 Object: Source
|
||||
//
|
||||
// OpenRTB 2.5:
|
||||
|
||||
// This object describes the nature and behavior of the entity that is the source of the bid request upstream from the exchange.
|
||||
// The primary purpose of this object is to define post-auction or upstream decisioning when the exchange itself does not control
|
||||
// the final decision. A common example of this is header bidding, but it can also apply to upstream server entities such as another
|
||||
// RTB exchange, a mediation platform, or an ad server combines direct campaigns with 3rd party demand in decisioning.
|
||||
// The primary purpose of this object is to define post-auction or upstream decisioning when the exchange itself does not control the final decision.
|
||||
// A common example of this is header bidding, but it can also apply to upstream server entities such as another RTB exchange, a mediation platform, or an ad server combines direct campaigns with 3rd party demand in decisioning.
|
||||
type Source struct {
|
||||
|
||||
// Attribute:
|
||||
// fd
|
||||
// Type:
|
||||
// integer, recommended
|
||||
// Integer; recommended
|
||||
// Description:
|
||||
// Entity responsible for the final impression sale decision, where 0 = exchange, 1 = upstream source.
|
||||
FD uint8 `json:"fd,omitempty"`
|
||||
// Entity responsible for the final impression sale decision, where
|
||||
// 0 = exchange, 1 = upstream source.
|
||||
FD int8 `json:"fd,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// tid
|
||||
// Type:
|
||||
// string, recommended
|
||||
// string; recommended
|
||||
// Description:
|
||||
// Transaction ID that must be common across all participants in this bid request (e.g., potentially multiple exchanges).
|
||||
TID string `json:"tid,omitempty"`
|
||||
// Transaction ID that must be common across all participants in
|
||||
// this bid request (e.g., potentially multiple exchanges).
|
||||
TID string `json:"tid,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pchain
|
||||
// Type:
|
||||
// string; recommended
|
||||
// Description:
|
||||
// Payment ID chain string containing embedded syntax described in the TAG Payment ID Protocol v1.0.
|
||||
PChain int `json:"pchain,omitempty"`
|
||||
// Payment ID chain string containing embedded syntax
|
||||
// described in the TAG Payment ID Protocol v1.0.
|
||||
PChain string `json:"pchain,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package openrtb
|
||||
|
||||
// 5.12 Start Delay
|
||||
//
|
||||
// Various options for the video or audio start delay.
|
||||
// If the start delay value is greater than 0, then the position is mid-roll and the value indicates the start delay.
|
||||
type StartDelay int64
|
||||
|
||||
const (
|
||||
// > 0 Mid-Roll (value indicates start delay in second)
|
||||
|
||||
StartDelayPreRoll StartDelay = 0 // Pre-Roll
|
||||
StartDelayGenericMidRoll StartDelay = -1 // Generic Mid-Roll
|
||||
StartDelayGenericPostRoll StartDelay = -2 // Generic Post-Roll
|
||||
)
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
# Testdata
|
||||
|
||||
JSON examples copied from [OpenRTB](//github.com/openrtb/OpenRTB) [v2.3.1](//github.com/openrtb/OpenRTB/blob/master/OpenRTB-API-Specification-Version-2-3-1-FINAL.pdf) spec - section 6. Bid Request/Response Samples.
|
||||
JSON examples copied from [OpenRTB](//www.iab.com/guidelines/real-time-bidding-rtb-project/) [v2.5](//www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec - section 6. Bid Request/Response Samples.
|
||||
|
||||
Some empty/zero attributes (like `imp[i].banner.pos == 0`) were omited because of [encoding/json](//golang.org/pkg/encoding/json/) `omitempty` and [gomega.MatchJSON(...)](//onsi.github.io/gomega/#matchjsonjson-interface).
|
||||
Some empty/zero attributes were omited (not copied) because of [encoding/json](//golang.org/pkg/encoding/json/) `omitempty` and [gomega.MatchJSON(...)](//onsi.github.io/gomega/#matchjsonjson-interface).
|
||||
|
||||
+71
-49
@@ -1,51 +1,73 @@
|
||||
{
|
||||
"id": "123456789316e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 2,
|
||||
"cur": ["USD"],
|
||||
"imp": [{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"iframebuster": ["vendor1.com", "vendor2.com"],
|
||||
"banner": {
|
||||
"h": 250,
|
||||
"w": 300,
|
||||
"battr": [13],
|
||||
"expdir": [2, 4]
|
||||
}
|
||||
}],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "www.foobar.com",
|
||||
"page": "http://www.foobar.com/1234.html",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version / 5.1 .7 Safari / 534.57 .2 ",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f",
|
||||
"buyeruid": "545678765467876567898765678987654",
|
||||
"data": [{
|
||||
"id": "6",
|
||||
"name": "Data Provider 1",
|
||||
"segment": [{
|
||||
"id": "12341318394918",
|
||||
"name": "auto intenders"
|
||||
}, {
|
||||
"id": "1234131839491234",
|
||||
"name": "auto enthusiasts"
|
||||
}, {
|
||||
"id": "23423424",
|
||||
"name": "data-provider1-age",
|
||||
"value": "30-40"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
"id": "123456789316e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 2,
|
||||
"cur": [
|
||||
"USD"
|
||||
],
|
||||
"imp": [
|
||||
{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"iframebuster": [
|
||||
"vendor1.com",
|
||||
"vendor2.com"
|
||||
],
|
||||
"banner": {
|
||||
"h": 250,
|
||||
"w": 300,
|
||||
"battr": [
|
||||
13
|
||||
],
|
||||
"expdir": [
|
||||
2,
|
||||
4
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "www.foobar.com",
|
||||
"page": "http://www.foobar.com/1234.html",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f",
|
||||
"buyeruid": "545678765467876567898765678987654",
|
||||
"data": [
|
||||
{
|
||||
"id": "6",
|
||||
"name": "Data Provider 1",
|
||||
"segment": [
|
||||
{
|
||||
"id": "12341318394918",
|
||||
"name": "auto intenders"
|
||||
},
|
||||
{
|
||||
"id": "1234131839491234",
|
||||
"name": "auto enthusiasts"
|
||||
},
|
||||
{
|
||||
"id": "23423424",
|
||||
"name": "data-provider1-age",
|
||||
"value": "30-40"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+79
-58
@@ -1,60 +1,81 @@
|
||||
{
|
||||
"id": "IxexyLDIIk",
|
||||
"at": 2,
|
||||
"bcat": ["IAB25", "IAB7-39", "IAB8-18", "IAB8-5", "IAB9-9"],
|
||||
"badv": ["apple.com", "go-text.me", "heywire.com"],
|
||||
"imp": [{
|
||||
"id": "1",
|
||||
"bidfloor": 0.5,
|
||||
"tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAw",
|
||||
"banner": {
|
||||
"w": 728,
|
||||
"h": 90,
|
||||
"pos": 1,
|
||||
"btype": [4],
|
||||
"battr": [14],
|
||||
"api": [3]
|
||||
}
|
||||
}],
|
||||
"app": {
|
||||
"id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfIUDA",
|
||||
"name": "Yahoo Weather",
|
||||
"cat": ["IAB15", "IAB15-10"],
|
||||
"ver": "1.0.2",
|
||||
"bundle": "com.yahoo.wxapp",
|
||||
"storeurl": "https://itunes.apple.com/id628677149",
|
||||
"publisher": {
|
||||
"id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfTUCV",
|
||||
"name": "yahoo",
|
||||
"domain": "www.yahoo.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 534.46(KHTML, like Gecko) Version / 5.1 Mobile / 9 A334 Safari / 7534.48 .3 ",
|
||||
"ip": "123.145.167.189",
|
||||
"ifa": "AA000DFE74168477C70D291f574D344790E0BB11",
|
||||
"carrier": "VERIZON",
|
||||
"language": "en",
|
||||
"make": "Apple",
|
||||
"model": "iPhone",
|
||||
"os": "iOS",
|
||||
"osv": "6.1",
|
||||
"js": 1,
|
||||
"connectiontype": 3,
|
||||
"devicetype": 1,
|
||||
"geo": {
|
||||
"lat": 35.012345,
|
||||
"lon": -115.12345,
|
||||
"country": "USA",
|
||||
"metro": "803",
|
||||
"region": "CA",
|
||||
"city": "Los Angeles",
|
||||
"zip": "90049"
|
||||
}
|
||||
},
|
||||
"user": {
|
||||
"id": "ffffffd5135596709273b3a1a07e466ea2bf4fff",
|
||||
"yob": 1984,
|
||||
"gender": "M"
|
||||
}
|
||||
"id": "IxexyLDIIk",
|
||||
"at": 2,
|
||||
"bcat": [
|
||||
"IAB25",
|
||||
"IAB7-39",
|
||||
"IAB8-18",
|
||||
"IAB8-5",
|
||||
"IAB9-9"
|
||||
],
|
||||
"badv": [
|
||||
"apple.com",
|
||||
"go-text.me",
|
||||
"heywire.com"
|
||||
],
|
||||
"imp": [
|
||||
{
|
||||
"id": "1",
|
||||
"bidfloor": 0.5,
|
||||
"tagid": "agltb3B1Yi1pbmNyDQsSBFNpdGUY7fD0FAw",
|
||||
"banner": {
|
||||
"w": 728,
|
||||
"h": 90,
|
||||
"pos": 1,
|
||||
"btype": [
|
||||
4
|
||||
],
|
||||
"battr": [
|
||||
14
|
||||
],
|
||||
"api": [
|
||||
3
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"app": {
|
||||
"id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfIUDA",
|
||||
"name": "Yahoo Weather",
|
||||
"cat": [
|
||||
"IAB15",
|
||||
"IAB15-10"
|
||||
],
|
||||
"ver": "1.0.2",
|
||||
"bundle": "12345",
|
||||
"storeurl": "https://itunes.apple.com/id628677149",
|
||||
"publisher": {
|
||||
"id": "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfTUCV",
|
||||
"name": "yahoo",
|
||||
"domain": "www.yahoo.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
|
||||
"ip": "123.145.167.189",
|
||||
"ifa": "AA000DFE74168477C70D291f574D344790E0BB11",
|
||||
"carrier": "VERIZON",
|
||||
"language": "en",
|
||||
"make": "Apple",
|
||||
"model": "iPhone",
|
||||
"os": "iOS",
|
||||
"osv": "6.1",
|
||||
"js": 1,
|
||||
"connectiontype": 3,
|
||||
"devicetype": 1,
|
||||
"geo": {
|
||||
"lat": 35.012345,
|
||||
"lon": -115.12345,
|
||||
"country": "USA",
|
||||
"metro": "803",
|
||||
"region": "CA",
|
||||
"city": "Los Angeles",
|
||||
"zip": "90049"
|
||||
}
|
||||
},
|
||||
"user": {
|
||||
"id": "ffffffd5135596709273b3a1a07e466ea2bf4fff",
|
||||
"yob": 1984,
|
||||
"gender": "M"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+45
-32
@@ -1,34 +1,47 @@
|
||||
{
|
||||
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 1,
|
||||
"cur": ["USD"],
|
||||
"imp": [{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"native": {
|
||||
"request": "...Native Spec request as an encoded string...",
|
||||
"ver": "1.0",
|
||||
"api": [3],
|
||||
"battr": [13, 14]
|
||||
}
|
||||
}],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "www.foobar.com",
|
||||
"page": "http://www.foobar.com/1234.html ",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version / 5.1 .7 Safari / 534.57 .2 ",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
|
||||
}
|
||||
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 1,
|
||||
"cur": [
|
||||
"USD"
|
||||
],
|
||||
"imp": [
|
||||
{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"native": {
|
||||
"request": "{\"native\":{\"ver\":\"1.0\",\"assets\":[ ... ]}}",
|
||||
"ver": "1.0",
|
||||
"api": [
|
||||
3
|
||||
],
|
||||
"battr": [
|
||||
13,
|
||||
14
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "www.foobar.com",
|
||||
"page": "http://www.foobar.com/1234.html ",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
|
||||
}
|
||||
}
|
||||
|
||||
+59
-44
@@ -1,46 +1,61 @@
|
||||
{
|
||||
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 1,
|
||||
"cur": ["USD"],
|
||||
"imp": [{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"banner": {
|
||||
"h": 250,
|
||||
"w": 300
|
||||
},
|
||||
"pmp": {
|
||||
"private_auction": 1,
|
||||
"deals": [{
|
||||
"id": "AB-Agency1-0001",
|
||||
"at": 1,
|
||||
"bidfloor": 2.5,
|
||||
"wseat": ["Agency1"]
|
||||
}, {
|
||||
"id": "XY-Agency2-0001",
|
||||
"at": 2,
|
||||
"bidfloor": 2,
|
||||
"wseat": ["Agency2"]
|
||||
}]
|
||||
}
|
||||
}],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"domain": "www.foobar.com",
|
||||
"cat": ["IAB3-1"],
|
||||
"page": "http://www.foobar.com/1234.html",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version / 5.1 .7 Safari / 534.57 .2 ",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
|
||||
}
|
||||
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 1,
|
||||
"cur": [
|
||||
"USD"
|
||||
],
|
||||
"imp": [
|
||||
{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"banner": {
|
||||
"h": 250,
|
||||
"w": 300
|
||||
},
|
||||
"pmp": {
|
||||
"private_auction": 1,
|
||||
"deals": [
|
||||
{
|
||||
"id": "AB-Agency1-0001",
|
||||
"at": 1,
|
||||
"bidfloor": 2.5,
|
||||
"wseat": [
|
||||
"Agency1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "XY-Agency2-0001",
|
||||
"at": 2,
|
||||
"bidfloor": 2,
|
||||
"wseat": [
|
||||
"Agency2"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"domain": "www.foobar.com",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"page": "http://www.foobar.com/1234.html",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
|
||||
}
|
||||
}
|
||||
|
||||
+38
-30
@@ -1,32 +1,40 @@
|
||||
{
|
||||
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 1,
|
||||
"cur": ["USD"],
|
||||
"imp": [{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"banner": {
|
||||
"h": 250,
|
||||
"w": 300
|
||||
}
|
||||
}],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "www.foobar.com",
|
||||
"page": "http://www.foobar.com/1234.html ",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": ["IAB3-1"],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version / 5.1 .7 Safari / 534.57 .2 ",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
|
||||
}
|
||||
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
|
||||
"at": 1,
|
||||
"cur": [
|
||||
"USD"
|
||||
],
|
||||
"imp": [
|
||||
{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"banner": {
|
||||
"h": 250,
|
||||
"w": 300
|
||||
}
|
||||
}
|
||||
],
|
||||
"site": {
|
||||
"id": "102855",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "www.foobar.com",
|
||||
"page": "http://www.foobar.com/1234.html ",
|
||||
"publisher": {
|
||||
"id": "8953",
|
||||
"name": "foobar.com",
|
||||
"cat": [
|
||||
"IAB3-1"
|
||||
],
|
||||
"domain": "foobar.com"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
|
||||
"ip": "123.145.167.10"
|
||||
},
|
||||
"user": {
|
||||
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+130
-89
@@ -1,91 +1,132 @@
|
||||
{
|
||||
"id": "1234567893",
|
||||
"at": 2,
|
||||
"tmax": 120,
|
||||
"imp": [{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"video": {
|
||||
"w": 640,
|
||||
"h": 480,
|
||||
"pos": 1,
|
||||
"minduration": 5,
|
||||
"maxduration": 30,
|
||||
"maxextended": 30,
|
||||
"minbitrate": 300,
|
||||
"maxbitrate": 1500,
|
||||
"api": [1, 2],
|
||||
"protocols": [2, 3],
|
||||
"mimes": [
|
||||
"video/x-flv",
|
||||
"video/mp4",
|
||||
"application/x-shockwave-flash",
|
||||
"application/javascript"
|
||||
],
|
||||
"linearity": 1,
|
||||
"boxingallowed": 1,
|
||||
"playbackmethod": [1, 3],
|
||||
"delivery": [2],
|
||||
"battr": [13, 14],
|
||||
"companionad": [{
|
||||
"id": "1234567893-1",
|
||||
"w": 300,
|
||||
"h": 250,
|
||||
"pos": 1,
|
||||
"battr": [13, 14],
|
||||
"expdir": [2, 4]
|
||||
}, {
|
||||
"id": "1234567893-2",
|
||||
"w": 728,
|
||||
"h": 90,
|
||||
"pos": 1,
|
||||
"battr": [13, 14]
|
||||
}],
|
||||
"companiontype": [1, 2]
|
||||
}
|
||||
}],
|
||||
"site": {
|
||||
"id": "1345135123",
|
||||
"name": "Site ABCD",
|
||||
"domain": "siteabcd.com",
|
||||
"cat": ["IAB2-1", "IAB2-2"],
|
||||
"page": "http://siteabcd.com/page.htm",
|
||||
"ref": "http://referringsite.com/referringpage.htm",
|
||||
"privacypolicy": 1,
|
||||
"publisher": {
|
||||
"id": "pub12345",
|
||||
"name": "Publisher A"
|
||||
},
|
||||
"content": {
|
||||
"id": "1234567",
|
||||
"series": "All About Cars",
|
||||
"season": "2",
|
||||
"episode": 23,
|
||||
"title": "Car Show",
|
||||
"cat": ["IAB2-2"],
|
||||
"keywords": "keyword-a,keyword-b,keyword-c"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ip": "64.124.253.1",
|
||||
"ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko / 20110319 Firefox / 3.6 .16 ",
|
||||
"os": "OS X",
|
||||
"flashver": "10.1",
|
||||
"js": 1
|
||||
},
|
||||
"user": {
|
||||
"id": "456789876567897654678987656789",
|
||||
"buyeruid": "545678765467876567898765678987654",
|
||||
"data": [{
|
||||
"id": "6",
|
||||
"name": "Data Provider 1",
|
||||
"segment": [{
|
||||
"id": "12341318394918",
|
||||
"name": "auto intenders"
|
||||
}, {
|
||||
"id": "1234131839491234",
|
||||
"name": "auto enthusiasts"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
"id": "1234567893",
|
||||
"at": 2,
|
||||
"tmax": 120,
|
||||
"imp": [
|
||||
{
|
||||
"id": "1",
|
||||
"bidfloor": 0.03,
|
||||
"video": {
|
||||
"w": 640,
|
||||
"h": 480,
|
||||
"pos": 1,
|
||||
"minduration": 5,
|
||||
"maxduration": 30,
|
||||
"maxextended": 30,
|
||||
"minbitrate": 300,
|
||||
"maxbitrate": 1500,
|
||||
"api": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"protocols": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"mimes": [
|
||||
"video/x-flv",
|
||||
"video/mp4",
|
||||
"application/x-shockwave-flash",
|
||||
"application/javascript"
|
||||
],
|
||||
"linearity": 1,
|
||||
"boxingallowed": 1,
|
||||
"playbackmethod": [
|
||||
1,
|
||||
3
|
||||
],
|
||||
"delivery": [
|
||||
2
|
||||
],
|
||||
"battr": [
|
||||
13,
|
||||
14
|
||||
],
|
||||
"companionad": [
|
||||
{
|
||||
"id": "1234567893-1",
|
||||
"w": 300,
|
||||
"h": 250,
|
||||
"pos": 1,
|
||||
"battr": [
|
||||
13,
|
||||
14
|
||||
],
|
||||
"expdir": [
|
||||
2,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "1234567893-2",
|
||||
"w": 728,
|
||||
"h": 90,
|
||||
"pos": 1,
|
||||
"battr": [
|
||||
13,
|
||||
14
|
||||
]
|
||||
}
|
||||
],
|
||||
"companiontype": [
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"site": {
|
||||
"id": "1345135123",
|
||||
"name": "Site ABCD",
|
||||
"domain": "siteabcd.com",
|
||||
"cat": [
|
||||
"IAB2-1",
|
||||
"IAB2-2"
|
||||
],
|
||||
"page": "http://siteabcd.com/page.htm",
|
||||
"ref": "http://referringsite.com/referringpage.htm",
|
||||
"privacypolicy": 1,
|
||||
"publisher": {
|
||||
"id": "pub12345",
|
||||
"name": "Publisher A"
|
||||
},
|
||||
"content": {
|
||||
"id": "1234567",
|
||||
"series": "All About Cars",
|
||||
"season": "2",
|
||||
"episode": 23,
|
||||
"title": "Car Show",
|
||||
"cat": [
|
||||
"IAB2-2"
|
||||
],
|
||||
"keywords": "keyword-a,keyword-b,keyword-c"
|
||||
}
|
||||
},
|
||||
"device": {
|
||||
"ip": "64.124.253.1",
|
||||
"ua": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16",
|
||||
"os": "OS X",
|
||||
"flashver": "10.1",
|
||||
"js": 1
|
||||
},
|
||||
"user": {
|
||||
"id": "456789876567897654678987656789",
|
||||
"buyeruid": "545678765467876567898765678987654",
|
||||
"data": [
|
||||
{
|
||||
"id": "6",
|
||||
"name": "Data Provider 1",
|
||||
"segment": [
|
||||
{
|
||||
"id": "12341318394918",
|
||||
"name": "auto intenders"
|
||||
},
|
||||
{
|
||||
"id": "1234131839491234",
|
||||
"name": "auto enthusiasts"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+32
-17
@@ -1,19 +1,34 @@
|
||||
{
|
||||
"id": "1234567890",
|
||||
"bidid": "abc1123",
|
||||
"cur": "USD",
|
||||
"seatbid": [{
|
||||
"seat": "512",
|
||||
"bid": [{
|
||||
"id": "1",
|
||||
"impid": "102",
|
||||
"price": 9.43,
|
||||
"nurl": "http://adserver.com/winnotice?impid=102",
|
||||
"iurl": "http://adserver.com/pathtosampleimage",
|
||||
"adomain": ["advertiserdomain.com"],
|
||||
"cid": "campaign111",
|
||||
"crid": "creative112",
|
||||
"attr": [1, 2, 3, 4, 5, 6, 7, 12]
|
||||
}]
|
||||
}]
|
||||
"id": "1234567890",
|
||||
"bidid": "abc1123",
|
||||
"cur": "USD",
|
||||
"seatbid": [
|
||||
{
|
||||
"seat": "512",
|
||||
"bid": [
|
||||
{
|
||||
"id": "1",
|
||||
"impid": "102",
|
||||
"price": 9.43,
|
||||
"nurl": "http://adserver.com/winnotice?impid=102",
|
||||
"iurl": "http://adserver.com/pathtosampleimage",
|
||||
"adomain": [
|
||||
"advertiserdomain.com"
|
||||
],
|
||||
"cid": "campaign111",
|
||||
"crid": "creative112",
|
||||
"attr": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
12
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+30
-19
@@ -1,21 +1,32 @@
|
||||
{
|
||||
"id": "1234567890",
|
||||
"bidid": "abc1123",
|
||||
"cur": "USD",
|
||||
"seatbid": [{
|
||||
"seat": "512",
|
||||
"bid": [{
|
||||
"id": "1",
|
||||
"impid": "102",
|
||||
"price": 5.00,
|
||||
"dealid": "ABC-1234-6789",
|
||||
"nurl": "http: //adserver.com/winnotice?impid=102",
|
||||
"adomain": ["advertiserdomain.com"],
|
||||
"iurl": "http: //adserver.com/pathtosampleimage",
|
||||
"cid": "campaign111",
|
||||
"crid": "creative112",
|
||||
"adid": "314",
|
||||
"attr": [1, 2, 3, 4]
|
||||
}]
|
||||
}]
|
||||
"id": "1234567890",
|
||||
"bidid": "abc1123",
|
||||
"cur": "USD",
|
||||
"seatbid": [
|
||||
{
|
||||
"seat": "512",
|
||||
"bid": [
|
||||
{
|
||||
"id": "1",
|
||||
"impid": "102",
|
||||
"price": 5,
|
||||
"dealid": "ABC-1234-6789",
|
||||
"nurl": "http: //adserver.com/winnotice?impid=102",
|
||||
"adomain": [
|
||||
"advertiserdomain.com"
|
||||
],
|
||||
"iurl": "http: //adserver.com/pathtosampleimage",
|
||||
"cid": "campaign111",
|
||||
"crid": "creative112",
|
||||
"adid": "314",
|
||||
"attr": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+14
-10
@@ -1,12 +1,16 @@
|
||||
{
|
||||
"id": "123",
|
||||
"seatbid": [{
|
||||
"bid": [{
|
||||
"id": "12345",
|
||||
"impid": "2",
|
||||
"price": 3.00,
|
||||
"nurl": "http://example.com/winnoticeurl",
|
||||
"adm": "...Native Spec response as an encoded string..."
|
||||
}]
|
||||
}]
|
||||
"id": "123",
|
||||
"seatbid": [
|
||||
{
|
||||
"bid": [
|
||||
{
|
||||
"id": "12345",
|
||||
"impid": "2",
|
||||
"price": 3,
|
||||
"nurl": "http://example.com/winnoticeurl",
|
||||
"adm": "{\"native\":{\"ver\":\"1.0\",\"link\":{ ... },\"imptrackers\":[ ... ],\"assets\":[ ... ]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+14
-10
@@ -1,12 +1,16 @@
|
||||
{
|
||||
"id": "123",
|
||||
"seatbid": [{
|
||||
"bid": [{
|
||||
"id": "12345",
|
||||
"impid": "2",
|
||||
"price": 3.00,
|
||||
"nurl": "http://example.com/winnoticeurl",
|
||||
"adm": "%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3CVAST%20version%3D%222.0%22%3E%0A%20%20%20%20%3CAd%20id%3D%2212345%22%3E%0A%20%20%20%20%20%20%20%20%3CInLine%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CAdSystem%20version%3D%221.0%22%3ESpotXchange%3C%2FAdSystem%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CAdTitle%3E%3C!%5BCDATA%5BSample%20VAST%5D%5D%3E%3C%2FAdTitle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CImpression%3Ehttp%3A%2F%2Fsample.com%3C%2FImpression%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CDescription%3E%3C!%5BCDATA%5BA%20sample%20VAST%20feed%5D%5D%3E%3C%2FDescription%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CCreatives%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CCreative%20sequence%3D%221%22%20id%3D%221%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CLinear%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CDuration%3E00%3A00%3A30%3C%2FDuration%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CTrackingEvents%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FTrackingEvents%3E%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CVideoClicks%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CClickThrough%3E%3C!%5BCDATA%5Bhttp%3A%2F%2Fsample.com%2Fopenrtbtest%5D%5D%3E%3C%2FClickThrough%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FVideoClicks%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CMediaFiles%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CMediaFile%20delivery%3D%22progressive%22%20bitrate%3D%22256%22%20width%3D%22640%22%20height%3D%22480%22%20type%3D%22video%2Fmp4%22%3E%3C!%5BCDATA%5Bhttp%3A%2F%2Fsample.com%2Fvideo.mp4%5D%5D%3E%3C%2FMediaFile%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FMediaFiles%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FLinear%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FCreative%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FCreatives%3E%0A%20%20%20%20%20%20%20%20%3C%2FInLine%3E%0A%20%20%20%20%3C%2FAd%3E%0A%3C%2FVAST%3E"
|
||||
}]
|
||||
}]
|
||||
"id": "123",
|
||||
"seatbid": [
|
||||
{
|
||||
"bid": [
|
||||
{
|
||||
"id": "12345",
|
||||
"impid": "2",
|
||||
"price": 3,
|
||||
"nurl": "http://example.com/winnoticeurl",
|
||||
"adm": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"12345\">\n<InLine>\n<AdSystem version=\"1.0\">SpotXchange</AdSystem>\n<AdTitle>\n <![CDATA[Sample VAST]]>\n</AdTitle>\n<Impression>http://sample.com</Impression>\n<Description>\n<![CDATA[A sample VAST feed]]>\n</Description>\n <Creatives>\n<Creative sequence=\"1\" id=\"1\">\n<Linear>\n<Duration>00:00:30</Duration>\n <TrackingEvents></TrackingEvents>\n<VideoClicks>\n<ClickThrough>\n<![CDATA[http://sample.com/openrtbtest]]>\n</ClickThrough>\n</VideoClicks>\n<MediaFiles>\n<MediaFile delivery=\"progressive\" bitrate=\"256\" width=\"640\" height=\"480\" type=\"video/mp4\">\n<![CDATA[http://sample.com/video.mp4]]>\n</MediaFile>\n</MediaFiles>\n</Linear>\n</Creative>\n</Creatives>\n</InLine>\n</Ad>\n</VAST>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.13 Object: User
|
||||
// 3.2.20 Object: User
|
||||
//
|
||||
// This object contains information known or derived about the human user of the device (i.e., the
|
||||
// audience for advertising). The user id is an exchange artifact and may be subject to rotation or other
|
||||
// privacy policies. However, this user ID must be stable long enough to serve reasonably as the basis for
|
||||
// frequency capping and retargeting.
|
||||
// This object contains information known or derived about the human user of the device (i.e., the audience for advertising).
|
||||
// The user id is an exchange artifact and may be subject to rotation or other privacy policies.
|
||||
// However, this user ID must be stable long enough to serve reasonably as the basis for frequency capping and retargeting.
|
||||
type User struct {
|
||||
|
||||
// Attribute:
|
||||
@@ -14,23 +13,9 @@ type User struct {
|
||||
// string; recommended
|
||||
// Description:
|
||||
// Exchange-specific ID for the user. At least one of id or
|
||||
// buyerid is recommended.
|
||||
// buyeruid is recommended.
|
||||
ID string `json:"id,omitempty"`
|
||||
|
||||
// DEPRECATED
|
||||
// Attribute:
|
||||
// buyerid
|
||||
// Type:
|
||||
// string; recommended
|
||||
// Description:
|
||||
// Buyer-specific ID for the user as mapped by the exchange for
|
||||
// the buyer. At least one of buyerid or id is recommended.
|
||||
// Dev note:
|
||||
// Seems to be a mistype in OpenRTB 2.3 spec - it contains examples
|
||||
// with "buyeruid" (not "buyerid").
|
||||
// OpenRTB 2.3.1 uses "buyeruid" only.
|
||||
BuyerID string `json:"buyerid,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// buyeruid
|
||||
// Type:
|
||||
@@ -46,7 +31,7 @@ type User struct {
|
||||
// integer
|
||||
// Description:
|
||||
// Year of birth as a 4-digit integer.
|
||||
Yob uint16 `json:"yob,omitempty"`
|
||||
Yob int64 `json:"yob,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// gender
|
||||
@@ -82,7 +67,7 @@ type User struct {
|
||||
// object
|
||||
// Description:
|
||||
// Location of the user’s home base defined by a Geo object
|
||||
// (Section 3.2.12). This is not necessarily their current location.
|
||||
// (Section 3.2.19). This is not necessarily their current location.
|
||||
Geo *Geo `json:"geo,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -90,7 +75,7 @@ type User struct {
|
||||
// Type:
|
||||
// object array
|
||||
// Description:
|
||||
// Additional user data. Each Data object (Section 3.2.14)
|
||||
// Additional user data. Each Data object (Section 3.2.21)
|
||||
// represents a different data source.
|
||||
Data []Data `json:"data,omitempty"`
|
||||
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
package openrtb
|
||||
|
||||
// 3.2.4 Object: Video
|
||||
// 3.2.7 Object: Video
|
||||
//
|
||||
// This object represents an in-stream video impression. Many of the fields are non-essential for minimally
|
||||
// viable transactions, but are included to offer fine control when needed. Video in OpenRTB generally
|
||||
// assumes compliance with the VAST standard. As such, the notion of companion ads is supported by
|
||||
// optionally including an array of Banner objects (refer to the Banner object in Section 3.2.3) that define
|
||||
// these companion ads.
|
||||
// This object represents an in-stream video impression.
|
||||
// Many of the fields are non-essential for minimally viable transactions, but are included to offer fine control when needed.
|
||||
// Video in OpenRTB generally assumes compliance with the VAST standard.
|
||||
// As such, the notion of companion ads is supported by optionally including an array of Banner objects (refer to the Banner object in Section 3.2.6) that define these companion ads.
|
||||
//
|
||||
// The presence of a Video as a subordinate of the Imp object indicates that this impression is offered as a
|
||||
// video type impression. At the publisher’s discretion, that same impression may also be offered as
|
||||
// banner and/or native by also including as Imp subordinates the Banner and/or Native objects,
|
||||
// respectively. However, any given bid for the impression must conform to one of the offered types.
|
||||
// The presence of a Video as a subordinate of the Imp object indicates that this impression is offered as a video type impression.
|
||||
// At the publisher’s discretion, that same impression may also be offered as banner, audio, and/or native by also including as Imp subordinates objects of those types.
|
||||
// However, any given bid for the impression must conform to one of the offered types.
|
||||
type Video struct {
|
||||
|
||||
// Attribute:
|
||||
// mimes
|
||||
// Type:
|
||||
// string array
|
||||
// string array; required
|
||||
// Description:
|
||||
// Content MIME types supported. Popular MIME types may include “video/x-ms-wmv” for Windows Media and
|
||||
// “video/x-flv” for Flash Video.
|
||||
MIMEs []string `json:"mimes,omitempty"`
|
||||
// Content MIME types supported (e.g., “video/x-ms-wmv”,
|
||||
// “video/mp4”).
|
||||
MIMEs []string `json:"mimes"`
|
||||
|
||||
// Attribute:
|
||||
// minduration
|
||||
@@ -29,7 +27,7 @@ type Video struct {
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Minimum video ad duration in seconds.
|
||||
MinDuration uint64 `json:"minduration,omitempty"`
|
||||
MinDuration int64 `json:"minduration,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxduration
|
||||
@@ -37,35 +35,35 @@ type Video struct {
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Maximum video ad duration in seconds.
|
||||
MaxDuration uint64 `json:"maxduration,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// protocol
|
||||
// Type:
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// NOTE: Use of protocols instead is highly recommended.
|
||||
// Supported video bid response protocol. Refer to List 5.8. At
|
||||
// least one supported protocol must be specified in either the
|
||||
// protocol or protocols attribute.
|
||||
Protocol int8 `json:"protocol,omitempty"`
|
||||
MaxDuration int64 `json:"maxduration,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// protocols
|
||||
// Type:
|
||||
// integer array; recommended
|
||||
// Description:
|
||||
// Array of supported video bid response protocols. Refer to List
|
||||
// 5.8. At least one supported protocol must be specified in
|
||||
// either the protocol or protocols attribute.
|
||||
Protocols []int8 `json:"protocols,omitempty"`
|
||||
// Array of supported video protocols. Refer to List 5.8. At least
|
||||
// one supported protocol must be specified in either the
|
||||
// protocol or protocols attribute.
|
||||
Protocols []Protocol `json:"protocols,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// protocol
|
||||
// Type:
|
||||
// integer; DEPRECATED
|
||||
// Description:
|
||||
// NOTE: Deprecated in favor of protocols.
|
||||
// Supported video protocol. Refer to List 5.8. At least one
|
||||
// supported protocol must be specified in either the protocol
|
||||
// or protocols attribute.
|
||||
Protocol Protocol `json:"protocol,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// w
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Width of the video player in pixels.
|
||||
// Width of the video player in device independent pixels (DIPS).
|
||||
W uint64 `json:"w,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -73,7 +71,7 @@ type Video struct {
|
||||
// Type:
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Height of the video player in pixels.
|
||||
// Height of the video player in device independent pixels (DIPS).
|
||||
H uint64 `json:"h,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -82,9 +80,17 @@ type Video struct {
|
||||
// integer; recommended
|
||||
// Description:
|
||||
// Indicates the start delay in seconds for pre-roll, mid-roll, or
|
||||
// post-roll ad placements. Refer to List 5.10 for additional
|
||||
// post-roll ad placements. Refer to List 5.12 for additional
|
||||
// generic values.
|
||||
StartDelay int64 `json:"startdelay,omitempty"`
|
||||
StartDelay *StartDelay `json:"startdelay,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// placement
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Placement type for the impression. Refer to List 5.9.
|
||||
Placement VideoPlacementType `json:"placement,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// linearity
|
||||
@@ -93,7 +99,37 @@ type Video struct {
|
||||
// Description:
|
||||
// Indicates if the impression must be linear, nonlinear, etc. If
|
||||
// none specified, assume all are allowed. Refer to List 5.7.
|
||||
Linearity int8 `json:"linearity,omitempty"`
|
||||
Linearity VideoLinearity `json:"linearity,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// skip
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Indicates if the player will allow the video to be skipped,
|
||||
// where 0 = no, 1 = yes.
|
||||
// If a bidder sends markup/creative that is itself skippable, the
|
||||
// Bid object should include the attr array with an element of
|
||||
// 16 indicating skippable video. Refer to List 5.3.
|
||||
Skip *int8 `json:"skip,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// skipmin
|
||||
// Type:
|
||||
// integer; default 0
|
||||
// Description:
|
||||
// Videos of total duration greater than this number of seconds
|
||||
// can be skippable; only applicable if the ad is skippable.
|
||||
SkipMin int64 `json:"skipmin,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// skipafter
|
||||
// Type:
|
||||
// integer; default 0
|
||||
// Description:
|
||||
// Number of seconds a video must play before skipping is
|
||||
// enabled; only applicable if the ad is skippable
|
||||
SkipAfter int64 `json:"skipafter,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// sequence
|
||||
@@ -111,15 +147,15 @@ type Video struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// Blocked creative attributes. Refer to List 5.3.
|
||||
BAttr []int8 `json:"battr,omitempty"`
|
||||
BAttr []CreativeAttribute `json:"battr,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// maxextended
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Maximum extended video ad duration if extension is allowed.
|
||||
// If blank or 0, extension is not allowed. If -1, extension is
|
||||
// Maximum extended ad duration if extension is allowed. If
|
||||
// blank or 0, extension is not allowed. If -1, extension is
|
||||
// allowed, and there is no time limit imposed. If greater than 0,
|
||||
// then the value represents the number of seconds of extended
|
||||
// play supported beyond the maxduration value.
|
||||
@@ -130,8 +166,7 @@ type Video struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Minimum bit rate in Kbps. Exchange may set this dynamically
|
||||
// or universally across their set of publishers.
|
||||
// Minimum bit rate in Kbps.
|
||||
MinBitRate uint64 `json:"minbitrate,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -139,8 +174,7 @@ type Video struct {
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Maximum bit rate in Kbps. Exchange may set this dynamically
|
||||
// or universally across their set of publishers.
|
||||
// Maximum bit rate in Kbps.
|
||||
MaxBitRate uint64 `json:"maxbitrate,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
@@ -157,9 +191,21 @@ type Video struct {
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// Allowed playback methods. If none specified, assume all are
|
||||
// allowed. Refer to List 5.9.
|
||||
PlaybackMethod []int8 `json:"playbackmethod,omitempty"`
|
||||
// Playback methods that may be in use. If none are specified,
|
||||
// any method may be used. Refer to List 5.10. Only one
|
||||
// method is typically used in practice. As a result, this array may
|
||||
// be converted to an integer in a future version of the
|
||||
// specification. It is strongly advised to use only the first
|
||||
// element of this array in preparation for this change.
|
||||
PlaybackMethod []PlaybackMethod `json:"playbackmethod,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// playbackend
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// The event that causes playback to end. Refer to List 5.11.
|
||||
PlaybackEnd PlaybackCessationMode `json:"playbackend,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// delivery
|
||||
@@ -167,23 +213,23 @@ type Video struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// Supported delivery methods (e.g., streaming, progressive). If
|
||||
// none specified, assume all are supported. Refer to List 5.13.
|
||||
Delivery []int8 `json:"delivery,omitempty"`
|
||||
// none specified, assume all are supported. Refer to List 5.15.
|
||||
Delivery []ContentDeliveryMethod `json:"delivery,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// pos
|
||||
// Type:
|
||||
// integer
|
||||
// Description:
|
||||
// Ad position on screen. Refer to List 5.4
|
||||
Pos int8 `json:"pos,omitempty"`
|
||||
// Ad position on screen. Refer to List 5.4.
|
||||
Pos *AdPosition `json:"pos,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// companionad
|
||||
// Type:
|
||||
// object array
|
||||
// Description:
|
||||
// Array of Banner objects (Section 3.2.3) if companion ads are
|
||||
// Array of Banner objects (Section 3.2.6) if companion ads are
|
||||
// available.
|
||||
CompanionAd []Banner `json:"companionad,omitempty"`
|
||||
|
||||
@@ -193,18 +239,21 @@ type Video struct {
|
||||
// integer array
|
||||
// Description:
|
||||
// List of supported API frameworks for this impression. Refer to
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be supported.
|
||||
API []int8 `json:"api,omitempty"`
|
||||
// List 5.6. If an API is not explicitly listed, it is assumed not to be
|
||||
// supported.
|
||||
API []APIFramework `json:"api,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// companiontype
|
||||
// Type:
|
||||
// integer array
|
||||
// Description:
|
||||
// Supported VAST companion ad types. Refer to List 5.12.
|
||||
// Supported VAST companion ad types. Refer to List 5.14.
|
||||
// Recommended if companion Banner objects are included via
|
||||
// the companionad array.
|
||||
CompanionType []int8 `json:"companiontype,omitempty"`
|
||||
// the companionad array. If one of these banners will be
|
||||
// rendered as an end-card, this can be specified using the vcm
|
||||
// attribute with the particular banner (Section 3.2.6).
|
||||
CompanionType []CompanionType `json:"companiontype,omitempty"`
|
||||
|
||||
// Attribute:
|
||||
// ext
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package openrtb
|
||||
|
||||
// 5.7 Video Linearity
|
||||
//
|
||||
// Options for video linearity.
|
||||
// “In-stream” or “linear” video refers to preroll, post-roll, or mid-roll video ads where the user is forced to watch ad in order to see the video content.
|
||||
// “Overlay” or “non-linear” refer to ads that are shown on top of the video content.
|
||||
//
|
||||
// This OpenRTB list has values derived from the Inventory Quality Guidelines (IQG).
|
||||
// Practitioners should keep in sync with updates to the IQG values.
|
||||
type VideoLinearity int8
|
||||
|
||||
const (
|
||||
VideoLinearityLinearInStream VideoLinearity = 1 // Linear / In-Stream
|
||||
VideoLinearityNonLinearOverlay VideoLinearity = 2 // Non-Linear / Overlay
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package openrtb
|
||||
|
||||
// 5.9 Video Placement Types
|
||||
//
|
||||
// Various types of video placements derived largely from the IAB Digital Video Guidelines.
|
||||
type VideoPlacementType int8
|
||||
|
||||
const (
|
||||
VideoPlacementTypeInStream VideoPlacementType = 1 // In-Stream. Played before, during or after the streaming video content that the consumer has requested (e.g., Pre-roll, Mid-roll, Post-roll).
|
||||
VideoPlacementTypeInBanner VideoPlacementType = 2 // In-Banner. Exists within a web banner that leverages the banner space to deliver a video experience asopposed to another static or rich media format. The format relies on the existence of displayad inventory on the page for its delivery.
|
||||
VideoPlacementTypeInArticle VideoPlacementType = 3 // In-Article. Loads and plays dynamically between paragraphs of editorial content; existing as a standalonebranded message.
|
||||
VideoPlacementTypeInFeed VideoPlacementType = 4 // In-Feed. Found in content, social, or product feeds.
|
||||
VideoPlacementTypeInterstitialSliderFloating VideoPlacementType = 5 // Interstitial/Slider/Floating. Covers the entire or a portion of screen area, but is always on screen while displayed (i.e.cannot be scrolled out of view). Note that a full-screen interstitial (e.g., in mobile) can bedistinguished from a floating/slider unit by the imp.instl field.
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package openrtb
|
||||
|
||||
// 5.17 Volume Normalization Modes
|
||||
//
|
||||
// Types of volume normalization modes, typically for audio.
|
||||
type VolumeNormalizationMode int8
|
||||
|
||||
const (
|
||||
VolumeNormalizationModeNone VolumeNormalizationMode = 0 // None
|
||||
VolumeNormalizationModeAdVolumeAverageNormalizedToContent VolumeNormalizationMode = 1 // Ad Volume Average Normalized to Content
|
||||
VolumeNormalizationModeAdVolumePeakNormalizedToContent VolumeNormalizationMode = 2 // Ad Volume Peak Normalized to Content
|
||||
VolumeNormalizationModeAdLoudnessNormalizedToContent VolumeNormalizationMode = 3 // Ad Loudness Normalized to Content
|
||||
VolumeNormalizationModeCustomVolumeNormalizationMode VolumeNormalizationMode = 4 // Custom Volume Normalization
|
||||
)
|
||||
Reference in New Issue
Block a user