mirror of
https://github.com/prebid/openrtb.git
synced 2026-06-16 06:56:34 +03:00
4574bb1724
http://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf Squashed commit of the following: commit 40ffaaa76654096ff0a91101421cc36d54ef5968 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 25 12:01:12 2017 +0300 README: slight cosmetics commit 5eb0358060f355dd120f66912de1e1b93f0f8772 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 25 12:00:09 2017 +0300 README: preparing for release commit d62bda4a2d03462ed2b65a2f2600d13c88a43009 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 25 11:59:23 2017 +0300 README: review done commit 7ba05ea615088fd6f284f1a9964291600bfa0b5c Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 25 11:57:23 2017 +0300 Review: added missing Audio.stitched property commit be722248b554647522ce460fca2059d34def1dd8 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 16:15:35 2017 +0300 Travis: actually, better stick with 1.9 betas commit d0b0c16a4539cc3bcc2bcbfd8946820788f05023 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 16:14:16 2017 +0300 Travis: master builds till 1.9 is out commit 62635330272d14300a4240de984c45337680af65 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 16:11:07 2017 +0300 Travis: try Go 1.9beta1 commit 23e97c18636669930da5dbfe516faf29ed3a70a8 Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 16:06:18 2017 +0300 Travis commit d5c7d013c510ce3220a8ba8cd0d355ec5765491d Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 15:57:08 2017 +0300 README: v4.0.0 release date commit 14d8158820032b11822f3b2cd981c16f5ccf2dfa Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 15:55:55 2017 +0300 Copied examples from OpenRTB 2.5, reformatted commit e1fc9ebdc8a44d93b5aa48f7e61a7c9fdcdcc3dd Author: Max Cherry <mxmCherry@gmail.com> Date: Sun Jun 18 15:30:22 2017 +0300 README - TODOs commit 0d014dea1020f02db82488a848bdbbf8fadcdc52 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:45:01 2017 +0300 README commit 0d43a00d827670d39d83dfdab556a4153dfba1bb Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:43:15 2017 +0300 More README cosmetics commit ce476e32eff212079e3732a5ec316beb7fe9790d Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:42:38 2017 +0300 README cosmetics commit 8a78e95b19f31be264222e917c5672a8740d6475 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:41:56 2017 +0300 Minor renames commit de717476525c2f91cdd7bcd11c292161f605c28d Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:41:33 2017 +0300 Minor comment fix commit dc35a1d7bac2c8c26bf1e3d04c898ba7cab2ba96 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:41:08 2017 +0300 No more OpenRTB 2.3 references commit 38de47098f2a57a93015ca71264afaa02d11d64b Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:39:28 2017 +0300 More README improvs, switch everything to OpenRTB 2.5 commit a739f31497a24467900af2980859c7c6ebcdd457 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:36:11 2017 +0300 AT - use int64; rewrite README - stricter numeric types usage + drop gopkg.in, recommend package manager commit 56adc1a89d74ccf30df1acea40b298395cd10dbf Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:10:57 2017 +0300 AuctionType - uint64, can be > 500 commit da45c3e8995152d06e777ed8bfc3ef83493633a6 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:04:00 2017 +0300 README: more TODOs commit 931a2b07a693104a3387d6558d56ef996bb82dba Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 17:00:41 2017 +0300 Make sure everything time-related is int64 commit 720c1ce0b5aa48af58c7306c9f7369d60a2865fc Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:46:12 2017 +0300 README: more TODOs - copy more recent tests commit b658fab7365772f2ba3a9ee55ba1616f842732b1 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:44:56 2017 +0300 More TODO commit e5185fa5dc6958cbc5f49d5d9bb61b568da5e1f4 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:43:10 2017 +0300 Reviewed time/duration attributes - to use int64 commit cbb560af3063d10a95b5a26230b26ee25918dcfd Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:37:08 2017 +0300 README: Current TODO commit b7d3f701884892a3e667b3f8c26ca7e2fbeb46bf Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:35:54 2017 +0300 OpenRTB 2.5: Video commit 8d4824b8b8005fe8d67133493dd0b393a7416945 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:26:10 2017 +0300 OpenRTB 2.5: Native commit d40367062fe4f4009bea0697dc2a77a7549b03f4 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:23:51 2017 +0300 OpenRTB 2.5: Banner commit 18962c3c1ebdfc604ae564808ef4141d67fd90ed Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:16:42 2017 +0300 OpenRTB 2.5: Content commit 58a840d97f7e16a447c065b5b7465367459baf0f Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:07:35 2017 +0300 OpenRTB 2.5: Device commit 4a072229b874a93922eabfd003148b6186c2f1d4 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 14:00:51 2017 +0300 OpenRTB 2.5: Geo commit 41d50bc6d2b760daecdb2296ad83bf4750a39ca6 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 13:55:28 2017 +0300 OpenRTB 2.5: Bid commit f20f2a038580abe7a47d0285430140147af9bc38 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 13:41:50 2017 +0300 OpenRTB 2.5: SeatBid commit cfd46a38a7f330853fd07e5fe5bf87c8aedc82f2 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 13:40:40 2017 +0300 OpenRTB 2.5: BidResponse commit 8c165bb20ba9ff4bf237d5cf89a74db05495378a Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 13:38:44 2017 +0300 OpenRTB 2.5: Segment commit 610a4ee4a799934bba1d5678b3acebfae6390cd2 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 13:37:44 2017 +0300 OpenRTB 2.5: Data commit ac37bd4310a12c6e8311a62591cd8059c55e6390 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:47:52 2017 +0300 OpenRTB 2.5: User commit 8a63daa5d6caea5677b7df304f40fd83c073bc9d Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:44:06 2017 +0300 OpenRTB 2.5: Producer commit 8ad8a1880b970044d3312efa0482b9136fab2abf Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:42:54 2017 +0300 OpenRTB 2.5: Publisher commit 59c859c7249238c56a571183376aadd1adbe8394 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:41:39 2017 +0300 OpenRTB 2.5: App commit 14756ddf66fd0fc42d89ddaa521cd6054c39bd21 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:39:10 2017 +0300 OpenRTB 2.5: Site commit 9bbb35253de1d1df21165b8d320c2bebfbc01542 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:36:25 2017 +0300 OpenRTB 2.5: Deal commit 8f88319a83b472c92f3ddc13fa2dabc9c7319c4c Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:33:41 2017 +0300 OpenRTB 2.5: PMP commit 3be39a13e1c480b1ca1462a526d9e041631773a9 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:31:43 2017 +0300 OpenRTB 2.5: Imp, Audio commit 36c9487ad5255dbd027e10b7379663e643b2b50c Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:12:32 2017 +0300 Added OpenRTB 2.5 Metric and Format objects commit e1205cf8701e91c782e3397e8f780be872544780 Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:04:25 2017 +0300 README update commit 325778b755bc9e3ba084a726dae5e9c622c1f2fc Author: Max Cherry <mxmCherry@gmail.com> Date: Sat Jun 17 12:03:33 2017 +0300 Started working on OpenRTB 2.5 compliance - BidRequest, Source, Regs updated
278 lines
6.7 KiB
Go
278 lines
6.7 KiB
Go
package openrtb
|
||
|
||
// 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.
|
||
//
|
||
// 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:
|
||
// ua
|
||
// Type:
|
||
// string; recommended
|
||
// Description:
|
||
// Browser user agent string.
|
||
UA string `json:"ua,omitempty"`
|
||
|
||
// Attribute:
|
||
// geo
|
||
// Type:
|
||
// object; recommended
|
||
// Description:
|
||
// Location of the device assumed to be the user’s current
|
||
// location defined by a Geo object (Section 3.2.19).
|
||
Geo *Geo `json:"geo,omitempty"`
|
||
|
||
// Attribute:
|
||
// dnt
|
||
// Type:
|
||
// integer; recommended
|
||
// Description:
|
||
// Standard “Do Not Track” flag as set in the header by the
|
||
// browser, where 0 = tracking is unrestricted, 1 = do not track.
|
||
DNT int8 `json:"dnt,omitempty"`
|
||
|
||
// Attribute:
|
||
// lmt
|
||
// Type:
|
||
// integer; recommended
|
||
// Description:
|
||
// “Limit Ad Tracking” signal commercially endorsed (e.g., iOS,
|
||
// Android), where 0 = tracking is unrestricted, 1 = tracking must
|
||
// be limited per commercial guidelines.
|
||
Lmt int8 `json:"lmt,omitempty"`
|
||
|
||
// Attribute:
|
||
// ip
|
||
// Type:
|
||
// string; recommended
|
||
// Description:
|
||
// IPv4 address closest to device.
|
||
IP string `json:"ip,omitempty"`
|
||
|
||
// Attribute:
|
||
// ipv6
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// IP address closest to device as IPv6.
|
||
IPv6 string `json:"ipv6,omitempty"`
|
||
|
||
// Attribute:
|
||
// devicetype
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// The general type of device. Refer to List 5.21.
|
||
DeviceType int8 `json:"devicetype,omitempty"`
|
||
|
||
// Attribute:
|
||
// make
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Device make (e.g., “Apple”).
|
||
Make string `json:"make,omitempty"`
|
||
|
||
// Attribute:
|
||
// model
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Device model (e.g., “iPhone”).
|
||
Model string `json:"model,omitempty"`
|
||
|
||
// Attribute:
|
||
// os
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Device operating system (e.g., “iOS”).
|
||
OS string `json:"os,omitempty"`
|
||
|
||
// Attribute:
|
||
// osv
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Device operating system version (e.g., “3.1.2”).
|
||
OSV string `json:"osv,omitempty"`
|
||
|
||
// Attribute:
|
||
// hwv
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Hardware version of the device (e.g., “5S” for iPhone 5S).
|
||
HWV string `json:"hwv,omitempty"`
|
||
|
||
// Attribute:
|
||
// h
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// Physical height of the screen in pixels.
|
||
H uint64 `json:"h,omitempty"`
|
||
|
||
// Attribute:
|
||
// w
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// Physical width of the screen in pixels.
|
||
W uint64 `json:"w,omitempty"`
|
||
|
||
// Attribute:
|
||
// ppi
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// Screen size as pixels per linear inch.
|
||
PPI uint64 `json:"ppi,omitempty"`
|
||
|
||
// Attribute:
|
||
// pxratio
|
||
// Type:
|
||
// float
|
||
// Description:
|
||
// The ratio of physical pixels to device independent pixels.
|
||
PxRatio float64 `json:"pxratio,omitempty"`
|
||
|
||
// Attribute:
|
||
// js
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// Support for JavaScript, where 0 = no, 1 = yes.
|
||
JS int8 `json:"js,omitempty"`
|
||
|
||
// Attribute:
|
||
// geofetch
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// 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:
|
||
// flashver
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Version of Flash supported by the browser.
|
||
FlashVer string `json:"flashver,omitempty"`
|
||
|
||
// Attribute:
|
||
// language
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Browser language using ISO-639-1-alpha-2.
|
||
Language string `json:"language,omitempty"`
|
||
|
||
// Attribute:
|
||
// carrier
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// 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:
|
||
// mccmnc
|
||
// 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.
|
||
MCCMNC string `json:"mccmnc,omitempty"`
|
||
|
||
// Attribute:
|
||
// connectiontype
|
||
// Type:
|
||
// integer
|
||
// Description:
|
||
// Network connection type. Refer to List 5.22.
|
||
Connectiontype int8 `json:"connectiontype,omitempty"`
|
||
|
||
// Attribute:
|
||
// ifa
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// ID sanctioned for advertiser use in the clear (i.e., not hashed).
|
||
IFA string `json:"ifa,omitempty"`
|
||
|
||
// Attribute:
|
||
// didsha1
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Hardware device ID (e.g., IMEI); hashed via SHA1.
|
||
DIDSHA1 string `json:"didsha1,omitempty"`
|
||
|
||
// Attribute:
|
||
// didmd5
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Hardware device ID (e.g., IMEI); hashed via MD5.
|
||
DIDMD5 string `json:"didmd5,omitempty"`
|
||
|
||
// Attribute:
|
||
// dpidsha1
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Platform device ID (e.g., Android ID); hashed via SHA1.
|
||
DPIDSHA1 string `json:"dpidsha1,omitempty"`
|
||
|
||
// Attribute:
|
||
// dpidmd5
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// Platform device ID (e.g., Android ID); hashed via MD5.
|
||
DPIDMD5 string `json:"dpidmd5,omitempty"`
|
||
|
||
// Attribute:
|
||
// macsha1
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// MAC address of the device; hashed via SHA1.
|
||
MACSHA1 string `json:"macsha1,omitempty"`
|
||
|
||
// Attribute:
|
||
// macmd5
|
||
// Type:
|
||
// string
|
||
// Description:
|
||
// MAC address of the device; hashed via MD5.
|
||
MACMD5 string `json:"macmd5,omitempty"`
|
||
|
||
// Attribute:
|
||
// ext
|
||
// Type:
|
||
// object
|
||
// Description:
|
||
// Placeholder for exchange-specific extensions to OpenRTB.
|
||
Ext RawJSON `json:"ext,omitempty"`
|
||
}
|