diff --git a/README.md b/README.md index 9905fc6..e514bd6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ import "github.com/prebid/openrtb" # History -Forked on April 23, 2017 from [mxmCherry](//github.com/mxmCherry/openrtb.v3) +- Forked on April 23, 2017 from [mxmCherry](//github.com/mxmCherry/openrtb.v3) +- Updated Device, Geo to OpenRTB 2.5 # Goals diff --git a/device.go b/device.go index 55241c3..26750af 100644 --- a/device.go +++ b/device.go @@ -1,6 +1,7 @@ package openrtb -// 3.2.11 Object: Device +// 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 @@ -21,7 +22,7 @@ type Device struct { // object; recommended // Description: // Location of the device assumed to be the user’s current - // location defined by a Geo object (Section 3.2.12). + // location defined by a Geo object (Section 3.2.19). Geo *Geo `json:"geo,omitempty"` // Attribute: @@ -147,6 +148,14 @@ type Device struct { // 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: @@ -172,12 +181,22 @@ type Device struct { // to indicate high bandwidth (e.g., video friendly vs. cellular). 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.18. + // Network connection type. Refer to List 5.22. Connectiontype int8 `json:"connectiontype,omitempty"` // Attribute: diff --git a/geo.go b/geo.go index 280195a..a71d32c 100644 --- a/geo.go +++ b/geo.go @@ -1,6 +1,6 @@ package openrtb -// 3.2.12 Object: Geo +// 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 @@ -35,6 +35,33 @@ type Geo struct { // lat/lon. Refer to List 5.16. Type int8 `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 int32 `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 int32 `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 int8 `json:"ipservice,omitempty"` + // Attribute: // country // Type: diff --git a/openrtb_test.go b/openrtb_test.go index 7d6f7c3..e026325 100644 --- a/openrtb_test.go +++ b/openrtb_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/mxmCherry/openrtb" + "github.com/prebid/openrtb" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" diff --git a/raw_json_test.go b/raw_json_test.go index b06b24e..ab2c313 100644 --- a/raw_json_test.go +++ b/raw_json_test.go @@ -3,7 +3,7 @@ package openrtb_test import ( "encoding/json" - "github.com/mxmCherry/openrtb" + "github.com/prebid/openrtb" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega"