Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Brightroll auction type explicitly default to first price auction (pr…
Browse files Browse the repository at this point in the history
…ebid#746)

* Brightroll auction type explicitly default to first price auction

* fixed merge issue

* removed unnessary code
  • Loading branch information
smithaammassamveettil authored and dbemiller committed Nov 13, 2018
1 parent ee54362 commit f4281a7
Show file tree
Hide file tree
Showing 8 changed files with 429 additions and 0 deletions.
1 change: 1 addition & 0 deletions adapters/brightroll/brightroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (a *BrightrollAdapter) MakeRequests(request *openrtb.BidRequest) ([]*adapte
return nil, errs
}

request.AT = 1 //Defaulting to first price auction for all prebid requests
reqJSON, err := json.Marshal(request)
if err != nil {
errs = append(errs, err)
Expand Down
156 changes: 156 additions & 0 deletions adapters/brightroll/brightrolltest/exemplary/banner-native-audio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
},
{
"w": 300,
"h": 600
}
]
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "unsupported-native-imp",
"native": {
"ver": "1.1",
"request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}"
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "unsupported-audio-imp",
"audio": {
"mimes": [
"video/mp4"
]
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
}
]
},
"httpCalls": [
{
"expectedRequest": {
"uri": "http://east-bid.ybp.yahoo.com/bid/appnexuspbs?publisher=cafemom",
"body": {
"id": "test-request-id",
"at":1,
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
},
{
"w": 300,
"h": 600
}
],
"w": 300,
"h": 250
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "unsupported-native-imp",
"native": {
"ver": "1.1",
"request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}"
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "unsupported-audio-imp",
"audio": {
"mimes": [
"video/mp4"
]
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
}
]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"seatbid": [
{
"seat": "958",
"bid": [{
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.500000,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": ["yahoo.com"],
"cid": "958",
"crid": "29681110",
"h": 250,
"w": 300
}]
}
],
"bidid": "5778926625248726496",
"cur": "USD"
}
}
}
],

"expectedBids": [
{
"bid": {
"id": "7706636740145184841",
"impid": "test-imp-id",
"price": 0.5,
"adm": "some-test-ad",
"adid": "29681110",
"adomain": ["yahoo.com"],
"cid": "958",
"crid": "29681110",
"w": 300,
"h": 250
},
"type": "banner"
}
]

}
158 changes: 158 additions & 0 deletions adapters/brightroll/brightrolltest/exemplary/banner-video-native.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"mockBidRequest": {
"id": "test-request-id",
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
},
{
"w": 300,
"h": 600
}
]
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "unsupported-native-imp",
"native": {
"ver": "1.1",
"request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}"
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "test-imp-video-id",
"video": {
"mimes": ["video/mp4"],
"protocols": [2, 5],
"w": 1024,
"h": 576
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
}
]
},
"httpCalls": [
{
"expectedRequest": {
"uri": "http://east-bid.ybp.yahoo.com/bid/appnexuspbs?publisher=cafemom",
"body": {
"id": "test-request-id",
"at":1,
"imp": [
{
"id": "test-imp-id",
"banner": {
"format": [
{
"w": 300,
"h": 250
},
{
"w": 300,
"h": 600
}
],
"w": 300,
"h": 250
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "unsupported-native-imp",
"native": {
"ver": "1.1",
"request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}"
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
},
{
"id": "test-imp-video-id",
"video": {
"mimes": ["video/mp4"],
"protocols": [2, 5],
"w": 1024,
"h": 576
},
"ext": {
"bidder": {
"publisher": "cafemom"
}
}
}
]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-id",
"seatbid": [
{
"seat": "958",
"bid": [{
"id": "7706636740145184841",
"impid": "test-imp-video-id",
"price": 0.500000,
"adid": "29681110",
"adm": "some-test-ad",
"adomain": ["yahoo.com"],
"cid": "958",
"crid": "29681110",
"h": 576,
"w": 1024
}]
}
],
"bidid": "5778926625248726496",
"cur": "USD"
}
}
}
],

"expectedBids": [
{
"bid": {
"id": "7706636740145184841",
"impid": "test-imp-video-id",
"price": 0.5,
"adm": "some-test-ad",
"adid": "29681110",
"adomain": ["yahoo.com"],
"cid": "958",
"crid": "29681110",
"w": 1024,
"h": 576
},
"type": "video"
}
]

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"uri": "http://east-bid.ybp.yahoo.com/bid/appnexuspbs?publisher=cafemom",
"body": {
"id": "test-request-id",
"at":1,
"imp": [
{
"id": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"uri": "http://east-bid.ybp.yahoo.com/bid/appnexuspbs?publisher=cafemom",
"body": {
"id": "test-request-id",
"at":1,
"imp": [
{
"id": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"uri": "http://east-bid.ybp.yahoo.com/bid/appnexuspbs?publisher=cafemom",
"body": {
"id": "test-request-id",
"at":1,
"imp": [
{
"id": "test-imp-id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"uri": "http://east-bid.ybp.yahoo.com/bid/appnexuspbs?publisher=cafemom",
"body": {
"id": "test-request-id",
"at":1,
"imp": [
{
"id": "test-imp-id",
Expand Down
Loading

0 comments on commit f4281a7

Please sign in to comment.