diff --git a/adapters/bizzclick/bizzclick.go b/adapters/bizzclick/bizzclick.go index fee2829dd6f..4f16268cd05 100644 --- a/adapters/bizzclick/bizzclick.go +++ b/adapters/bizzclick/bizzclick.go @@ -104,7 +104,15 @@ func (a *adapter) getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtBizzclick } func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtBizzclick) (string, error) { - endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: params.PlacementID} + host := "us-e-node1" + if params.Host != "" { + host = params.Host + } + sourceId := params.SourceID + if params.SourceID == "" { + sourceId = params.PlacementID + } + endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: sourceId, Host: host} return macros.ResolveMacros(a.endpoint, endpointParams) } diff --git a/adapters/bizzclick/bizzclick_test.go b/adapters/bizzclick/bizzclick_test.go index 971f06ae70f..5933ee551a6 100644 --- a/adapters/bizzclick/bizzclick_test.go +++ b/adapters/bizzclick/bizzclick_test.go @@ -11,7 +11,7 @@ import ( func TestJsonSamples(t *testing.T) { bidder, buildErr := Builder(openrtb_ext.BidderBizzclick, config.Adapter{ - Endpoint: "http://us.example.com/bid?rtb_seat_id={{.SourceId}}&secret_key={{.AccountID}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + Endpoint: "http://{{.Host}}.bizzclick.com/bid?rtb_seat_id={{.SourceId}}&secret_key={{.AccountID}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) if buildErr != nil { t.Fatalf("Builder returned unexpected error %v", buildErr) diff --git a/adapters/bizzclick/bizzclicktest/exemplary/banner-app.json b/adapters/bizzclick/bizzclicktest/exemplary/banner-app.json index 1ba1d15584d..3875d70cc95 100644 --- a/adapters/bizzclick/bizzclicktest/exemplary/banner-app.json +++ b/adapters/bizzclick/bizzclicktest/exemplary/banner-app.json @@ -34,7 +34,8 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } @@ -60,7 +61,7 @@ "123.123.123.123" ] }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", "body": { "id": "some-request-id", "device": { diff --git a/adapters/bizzclick/bizzclicktest/exemplary/banner-web.json b/adapters/bizzclick/bizzclicktest/exemplary/banner-web.json index 5c2baba6c51..fa9ba4d4dee 100644 --- a/adapters/bizzclick/bizzclicktest/exemplary/banner-web.json +++ b/adapters/bizzclick/bizzclicktest/exemplary/banner-web.json @@ -22,27 +22,29 @@ "id": "some-impression-id1", "tagid": "ogTAGID", "banner": { - "w":320, - "h":50 + "w": 320, + "h": 50 }, "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } - }, - { + }, + { "id": "some-impression-id2", "tagid": "ogTAGID", "banner": { - "w":320, - "h":50 + "w": 320, + "h": 50 }, "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } @@ -68,7 +70,7 @@ "123.123.123.123" ] }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", "body": { "id": "some-request-id", "device": { @@ -82,16 +84,16 @@ "id": "some-impression-id1", "tagid": "ogTAGID", "banner": { - "w":320, - "h":50 + "w": 320, + "h": 50 } }, { "id": "some-impression-id2", "tagid": "ogTAGID", "banner": { - "w":320, - "h":50 + "w": 320, + "h": 50 } } ], @@ -150,9 +152,9 @@ ], "expectedBidResponses": [ { - "bids":[ + "bids": [ { - "bid": { + "bid": { "id": "a3ae1b4e2fc24a4fb45540082e98e161", "impid": "some-impression-id1", "price": 3.5, @@ -167,7 +169,7 @@ "type": "banner" }, { - "bid": { + "bid": { "id": "a3ae1b4e2fc24a4fb45540082e98e162", "impid": "some-impression-id2", "price": 3.5, @@ -184,4 +186,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/exemplary/default-host-param.json b/adapters/bizzclick/bizzclicktest/exemplary/default-host-param.json new file mode 100644 index 00000000000..d11883899b7 --- /dev/null +++ b/adapters/bizzclick/bizzclicktest/exemplary/default-host-param.json @@ -0,0 +1,150 @@ +{ + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "banner": { + "w": 320, + "h": 50 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "placementId": "placementId" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://us-e-node1.bizzclick.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "banner": { + "w": 320, + "h": 50 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "1", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50 + } + ], + "type": "banner", + "seat": "bizzclick" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "1", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20", + "w": 320, + "h": 50 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/exemplary/native-app.json b/adapters/bizzclick/bizzclicktest/exemplary/native-app.json index 764f6006049..7b94970d085 100644 --- a/adapters/bizzclick/bizzclicktest/exemplary/native-app.json +++ b/adapters/bizzclick/bizzclicktest/exemplary/native-app.json @@ -1,147 +1,147 @@ { - "mockBidRequest": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "tmax": 1000, - "user": { - "buyeruid": "awesome-user" - }, - "app": { - "publisher": { - "id": "123456789" - }, - "cat": [ - "IAB22-1" - ], - "bundle": "com.app.awesome", - "name": "Awesome App", - "domain": "awesomeapp.com", + "mockBidRequest": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "tmax": 1000, + "user": { + "buyeruid": "awesome-user" + }, + "app": { + "publisher": { "id": "123456789" }, - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "native": { - "ver":"1.1", - "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" - }, - "ext": { - "bidder": { - "accountId": "accountId", - "placementId": "placementId" - } - } - } - ] + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" }, - "httpCalls": [ + "imp": [ { - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.5" - ], - "User-Agent": [ - "test-user-agent" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", - "body": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "imp": [ - { - "id": "some-impression-id", - "native": { - "ver":"1.1", - "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" - }, - "tagid": "ogTAGID" - } - ], - "app": { - "id": "123456789", - "name": "Awesome App", - "bundle": "com.app.awesome", - "domain": "awesomeapp.com", - "cat": [ - "IAB22-1" - ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 - } + "id": "some-impression-id", + "tagid": "ogTAGID", + "native": { + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" }, - "mockResponse": { - "status": 200, - "body": { - "id": "awesome-resp-id", - "seatbid": [ - { - "bid": [ - { - "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id", - "price": 3.5, - "adm": "awesome-markup", - "adomain": [ - "awesome.com" - ], - "crid": "20" - } - ], - "type": "native", - "seat": "bizzclick" - } - ], - "cur": "USD" + "ext": { + "bidder": { + "accountId": "accountId", + "sourceId": "sourceId", + "host": "host" } } } - ], - "expectedBidResponses": [ - { - "bids":[ - { - "bid": { - "id": "a3ae1b4e2fc24a4fb45540082e98e161", - "impid": "some-impression-id", - "price": 3.5, - "adm": "awesome-markup", - "crid": "20", - "adomain": [ - "awesome.com" - ] - }, - "type": "native" - } - ] - } ] - } - \ No newline at end of file + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] + }, + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "native": { + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "awesome-resp-id", + "seatbid": [ + { + "bid": [ + { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "adomain": [ + "awesome.com" + ], + "crid": "20" + } + ], + "type": "native", + "seat": "bizzclick" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "a3ae1b4e2fc24a4fb45540082e98e161", + "impid": "some-impression-id", + "price": 3.5, + "adm": "awesome-markup", + "crid": "20", + "adomain": [ + "awesome.com" + ] + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/exemplary/native-web.json b/adapters/bizzclick/bizzclicktest/exemplary/native-web.json index 04a33e6f6b0..396e1e1e65b 100644 --- a/adapters/bizzclick/bizzclicktest/exemplary/native-web.json +++ b/adapters/bizzclick/bizzclicktest/exemplary/native-web.json @@ -22,13 +22,14 @@ "id": "some-impression-id", "tagid": "ogTAGID", "native": { - "ver":"1.1", - "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" }, "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } @@ -54,7 +55,7 @@ "2607:fb90:f27:4512:d800:cb23:a603:e245" ] }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", "body": { "id": "some-request-id", "device": { @@ -68,8 +69,8 @@ "id": "some-impression-id", "tagid": "ogTAGID", "native": { - "ver":"1.1", - "request":"{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" + "ver": "1.1", + "request": "{\"adunit\":2,\"assets\":[{\"id\":3,\"img\":{\"h\":120,\"hmin\":0,\"type\":3,\"w\":180,\"wmin\":0},\"required\":1},{\"id\":0,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":25,\"type\":1},\"id\":4,\"required\":1},{\"data\":{\"len\":140,\"type\":2},\"id\":6,\"required\":1}],\"context\":1,\"layout\":1,\"contextsubtype\":11,\"plcmtcnt\":1,\"plcmttype\":2,\"ver\":\"1.1\",\"ext\":{\"banner\":{\"w\":320,\"h\":50}}}" } } ], @@ -113,9 +114,9 @@ ], "expectedBidResponses": [ { - "bids":[ + "bids": [ { - "bid": { + "bid": { "id": "a3ae1b4e2fc24a4fb45540082e98e161", "impid": "some-impression-id", "price": 3.5, @@ -130,4 +131,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/exemplary/video-app.json b/adapters/bizzclick/bizzclicktest/exemplary/video-app.json index 18d38b8e16c..58a4a4a0048 100644 --- a/adapters/bizzclick/bizzclicktest/exemplary/video-app.json +++ b/adapters/bizzclick/bizzclicktest/exemplary/video-app.json @@ -39,7 +39,8 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } @@ -65,7 +66,7 @@ "123.123.123.123" ] }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", "body": { "id": "some-request-id", "device": { @@ -137,9 +138,9 @@ ], "expectedBidResponses": [ { - "bids":[ + "bids": [ { - "bid": { + "bid": { "id": "a3ae1b4e2fc24a4fb45540082e98e161", "impid": "some-impression-id", "price": 3.5, @@ -156,4 +157,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/exemplary/video-web.json b/adapters/bizzclick/bizzclicktest/exemplary/video-web.json index 57ec0641827..69a038b3f21 100644 --- a/adapters/bizzclick/bizzclicktest/exemplary/video-web.json +++ b/adapters/bizzclick/bizzclicktest/exemplary/video-web.json @@ -33,7 +33,8 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } @@ -59,7 +60,7 @@ "123.123.123.123" ] }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", "body": { "id": "some-request-id", "device": { @@ -149,7 +150,7 @@ } } }, - "type":"video" + "type": "video" } ] } diff --git a/adapters/bizzclick/bizzclicktest/supplemental/empty-seatbid-array.json b/adapters/bizzclick/bizzclicktest/supplemental/empty-seatbid-array.json index 7b244c408b3..faf72aabf04 100644 --- a/adapters/bizzclick/bizzclicktest/supplemental/empty-seatbid-array.json +++ b/adapters/bizzclick/bizzclicktest/supplemental/empty-seatbid-array.json @@ -39,7 +39,8 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } @@ -65,7 +66,7 @@ "123.123.123.123" ] }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", "body": { "id": "some-request-id", "device": { @@ -111,21 +112,20 @@ "status": 200, "body": { "id": "awesome-resp-id", - "seatbid": [ - ], + "seatbid": [], "cur": "USD" } } } ], - "mockResponse": { - "status": 200, - "body": "invalid response" - }, + "mockResponse": { + "status": 200, + "body": "invalid response" + }, "expectedMakeBidsErrors": [ { "value": "Empty SeatBid array", "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/supplemental/invalid-response.json b/adapters/bizzclick/bizzclicktest/supplemental/invalid-response.json index 57f36d3a372..eff1d6caa8d 100644 --- a/adapters/bizzclick/bizzclicktest/supplemental/invalid-response.json +++ b/adapters/bizzclick/bizzclicktest/supplemental/invalid-response.json @@ -1,4 +1,3 @@ - { "mockBidRequest": { "id": "some-request-id", @@ -29,84 +28,86 @@ "id": "some-impression-id", "tagid": "ogTAGID", "banner": { - "w":320, - "h":50 + "w": 320, + "h": 50 }, "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } ] }, - - "httpCalls": [{ - "expectedRequest": { - "headers": { - "Content-Type": [ - "application/json;charset=utf-8" - ], - "Accept": [ - "application/json" - ], - "X-Openrtb-Version": [ - "2.5" - ], - "User-Agent": [ - "test-user-agent" - ], - "X-Forwarded-For": [ - "123.123.123.123" - ] - }, - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", - "body": { - "id": "some-request-id", - "device": { - "ua": "test-user-agent", - "ip": "123.123.123.123", - "language": "en", - "dnt": 0 - }, - "imp": [ - { - "id": "some-impression-id", - "banner": { - "w":320, - "h":50 - }, - "tagid": "ogTAGID" - } - ], - "app": { - "id": "123456789", - "name": "Awesome App", - "bundle": "com.app.awesome", - "domain": "awesomeapp.com", - "cat": [ - "IAB22-1" + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" ], - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" + "Accept": [ + "application/json" + ], + "X-Openrtb-Version": [ + "2.5" + ], + "User-Agent": [ + "test-user-agent" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ] }, - "tmax": 1000 + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", + "body": { + "id": "some-request-id", + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "imp": [ + { + "id": "some-impression-id", + "banner": { + "w": 320, + "h": 50 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "id": "123456789", + "name": "Awesome App", + "bundle": "com.app.awesome", + "domain": "awesomeapp.com", + "cat": [ + "IAB22-1" + ], + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 200, + "body": "invalid response" } - }, - "mockResponse": { - "status": 200, - "body": "invalid response" } - }], + ], "expectedMakeBidsErrors": [ { "value": "Bad Server Response", "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/supplemental/status-code-bad-request.json b/adapters/bizzclick/bizzclicktest/supplemental/status-code-bad-request.json index f0a3b91ae3c..eb29b89bf0b 100644 --- a/adapters/bizzclick/bizzclicktest/supplemental/status-code-bad-request.json +++ b/adapters/bizzclick/bizzclicktest/supplemental/status-code-bad-request.json @@ -1,4 +1,3 @@ - { "mockBidRequest": { "id": "some-request-id", @@ -34,55 +33,57 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } ] }, - - "httpCalls": [{ - "expectedRequest": { - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", - "body": { - "id": "some-request-id", - "imp": [ - { - "id": "some-impression-id", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + }, + "tagid": "ogTAGID" + } + ], + "app": { + "publisher": { + "id": "123456789" }, - "tagid": "ogTAGID" - } - ], - "app": { - "publisher": { + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", "id": "123456789" }, - "cat": [ - "IAB22-1" - ], - "bundle": "com.app.awesome", - "name": "Awesome App", - "domain": "awesomeapp.com", - "id": "123456789" - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 400 } - }, - "mockResponse": { - "status": 400 } - }], + ], "expectedBidResponses": [], "expectedMakeBidsErrors": [ { @@ -90,4 +91,4 @@ "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/supplemental/status-code-no-content.json b/adapters/bizzclick/bizzclicktest/supplemental/status-code-no-content.json index 62aecf58c31..3ed865f289d 100644 --- a/adapters/bizzclick/bizzclicktest/supplemental/status-code-no-content.json +++ b/adapters/bizzclick/bizzclicktest/supplemental/status-code-no-content.json @@ -11,59 +11,67 @@ "id": "123456789" } }, - "imp": [{ - "id": "some-impression-id", - "tagid": "ogTAGID", - "video": { - "mimes": ["video/mp4"], - "w": 640, - "h": 480, - "minduration": 120, - "maxduration": 150 - }, - "ext": { - "bidder": { - "accountId": "accountId", - "placementId": "placementId" + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "w": 640, + "h": 480, + "minduration": 120, + "maxduration": 150 + }, + "ext": { + "bidder": { + "accountId": "accountId", + "sourceId": "sourceId", + "host": "host" + } } } - }] + ] }, - - "httpCalls": [{ - "expectedRequest": { - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", - "body": { - "id": "some-request-id", - "imp": [{ - "id": "some-impression-id", - "tagid": "ogTAGID", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 - } - }], - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } + } + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 204 } - }, - "mockResponse": { - "status": 204 } - }], + ], "expectedBidResponses": [], "expectedMakeBidsErrors": [] } \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/supplemental/status-code-other-error.json b/adapters/bizzclick/bizzclicktest/supplemental/status-code-other-error.json index 398f0b67ee0..81682bedd98 100644 --- a/adapters/bizzclick/bizzclicktest/supplemental/status-code-other-error.json +++ b/adapters/bizzclick/bizzclicktest/supplemental/status-code-other-error.json @@ -1,4 +1,3 @@ - { "mockBidRequest": { "id": "some-request-id", @@ -17,7 +16,9 @@ "id": "some-impression-id", "tagid": "ogTAGID", "video": { - "mimes": ["video/mp4"], + "mimes": [ + "video/mp4" + ], "w": 640, "h": 480, "minduration": 120, @@ -26,49 +27,51 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } ] }, - - "httpCalls": [{ - "expectedRequest": { - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", - "body": { - "id": "some-request-id", - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } } - } - ], - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 306 } - }, - "mockResponse": { - "status": 306 } - }], + ], "expectedBidResponses": [], "expectedMakeBidsErrors": [ { @@ -76,4 +79,4 @@ "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/bizzclicktest/supplemental/status-code-service-unavailable.json b/adapters/bizzclick/bizzclicktest/supplemental/status-code-service-unavailable.json index 733b5f3f83b..9ea01f9eeea 100644 --- a/adapters/bizzclick/bizzclicktest/supplemental/status-code-service-unavailable.json +++ b/adapters/bizzclick/bizzclicktest/supplemental/status-code-service-unavailable.json @@ -1,4 +1,3 @@ - { "mockBidRequest": { "id": "some-request-id", @@ -17,7 +16,9 @@ "id": "some-impression-id", "tagid": "ogTAGID", "video": { - "mimes": ["video/mp4"], + "mimes": [ + "video/mp4" + ], "w": 640, "h": 480, "minduration": 120, @@ -26,49 +27,51 @@ "ext": { "bidder": { "accountId": "accountId", - "placementId": "placementId" + "sourceId": "sourceId", + "host": "host" } } } ] }, - - "httpCalls": [{ - "expectedRequest": { - "uri": "http://us.example.com/bid?rtb_seat_id=placementId&secret_key=accountId", - "body": { - "id": "some-request-id", - "imp": [ - { - "id": "some-impression-id", - "tagid": "ogTAGID", - "video": { - "mimes": [ - "video/mp4" - ], - "minduration": 120, - "maxduration": 150, - "w": 640, - "h": 480 + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://host.bizzclick.com/bid?rtb_seat_id=sourceId&secret_key=accountId", + "body": { + "id": "some-request-id", + "imp": [ + { + "id": "some-impression-id", + "tagid": "ogTAGID", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 120, + "maxduration": 150, + "w": 640, + "h": 480 + } } - } - ], - "site": { - "page": "test.com", - "publisher": { - "id": "123456789" - } - }, - "user": { - "buyeruid": "awesome-user" - }, - "tmax": 1000 + ], + "site": { + "page": "test.com", + "publisher": { + "id": "123456789" + } + }, + "user": { + "buyeruid": "awesome-user" + }, + "tmax": 1000 + } + }, + "mockResponse": { + "status": 503 } - }, - "mockResponse": { - "status": 503 } - }], + ], "expectedBidResponses": [], "expectedMakeBidsErrors": [ { @@ -76,4 +79,4 @@ "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/bizzclick/params_test.go b/adapters/bizzclick/params_test.go index 496643a506f..fe72e41f16b 100644 --- a/adapters/bizzclick/params_test.go +++ b/adapters/bizzclick/params_test.go @@ -8,7 +8,7 @@ import ( ) var validParams = []string{ - `{ "accountId": "hash", "placementId": "hash"}`, + `{ "host": "ep1", "sourceId": "partner", "accountId": "hash" }`, } func TestValidParams(t *testing.T) { diff --git a/openrtb_ext/imp_bizzclick.go b/openrtb_ext/imp_bizzclick.go index 5090a822ec5..15a8c2d0d46 100644 --- a/openrtb_ext/imp_bizzclick.go +++ b/openrtb_ext/imp_bizzclick.go @@ -2,5 +2,7 @@ package openrtb_ext type ExtBizzclick struct { AccountID string `json:"accountId"` + SourceID string `json:"sourceId"` + Host string `json:"host"` PlacementID string `json:"placementId"` } diff --git a/static/bidder-info/bizzclick.yaml b/static/bidder-info/bizzclick.yaml index 28ff0d44285..9d0103bcd81 100644 --- a/static/bidder-info/bizzclick.yaml +++ b/static/bidder-info/bizzclick.yaml @@ -1,6 +1,14 @@ -endpoint: "http://us-e-node1.bizzclick.com/bid?rtb_seat_id={{.SourceId}}&secret_key={{.AccountID}}" +# Contact support@bizzclick.com to connect with Bizzclick exchange. +# We have the following regional endpoint sub-domains: US East - us-e-node1, EU: n1, APAC: n3 +# Use Host macro to resolve the endpoint based on the datacenter. +# By default, we will use the US East sub-domain. +# Please deploy this config in each of your datacenters with the appropriate regional subdomain +endpoint: 'http://{{.Host}}.bizzclick.com/bid?rtb_seat_id={{.SourceId}}&secret_key={{.AccountID}}' maintainer: - email: "support@bizzclick.com" + email: 'support@bizzclick.com' +geoscope: + - global +endpointCompression: "GZIP" capabilities: app: mediaTypes: diff --git a/static/bidder-params/bizzclick.json b/static/bidder-params/bizzclick.json index 429e2948f8a..3f16e990be1 100644 --- a/static/bidder-params/bizzclick.json +++ b/static/bidder-params/bizzclick.json @@ -9,11 +9,34 @@ "description": "Account id", "minLength": 1 }, + "sourceId": { + "type": "string", + "description": "Source id", + "minLength": 1 + }, + "host": { + "type": "string", + "description": "Server region", + "minLength": 1 + }, "placementId": { "type": "string", - "description": "PlacementId id", + "description": "Deprecated, use sourceId instead", "minLength": 1 } }, - "required": ["accountId", "placementId"] + "oneOf": [ + { + "required": [ + "accountId", + "placementId" + ] + }, + { + "required": [ + "accountId", + "sourceId" + ] + } + ] } \ No newline at end of file