From f2230c88b4dc0985c6a8dc7fde08b2189cd64167 Mon Sep 17 00:00:00 2001 From: Scott Kay Date: Tue, 26 Sep 2023 07:23:39 -0400 Subject: [PATCH] Remove Adapter: engageBDR (#3131) Co-authored-by: Ashish Garg --- adapters/engagebdr/engagebdr.go | 151 ----------------- adapters/engagebdr/engagebdr_test.go | 20 --- .../engagebdrtest/exemplary/banner.json | 97 ----------- .../engagebdrtest/exemplary/multi-banner.json | 154 ----------------- .../engagebdrtest/exemplary/multi-video.json | 159 ------------------ .../engagebdrtest/exemplary/native.json | 95 ----------- .../engagebdrtest/exemplary/video.json | 100 ----------- .../engagebdrtest/supplemental/audio.json | 25 --- .../supplemental/multi-1-invalid-imp.json | 111 ------------ .../supplemental/no-imp-ext-bidder.json | 24 --- .../supplemental/no-imp-ext.json | 22 --- .../supplemental/no-imp-sspid.json | 26 --- .../engagebdrtest/supplemental/no-imp.json | 15 -- .../supplemental/response-500.json | 52 ------ adapters/engagebdr/params_test.go | 50 ------ exchange/adapter_builders.go | 2 - exchange/adapter_util.go | 1 + openrtb_ext/bidders.go | 2 - openrtb_ext/imp_engagebdr.go | 6 - static/bidder-info/engagebdr.yaml | 14 -- static/bidder-params/engagebdr.json | 14 -- 21 files changed, 1 insertion(+), 1139 deletions(-) delete mode 100644 adapters/engagebdr/engagebdr.go delete mode 100644 adapters/engagebdr/engagebdr_test.go delete mode 100644 adapters/engagebdr/engagebdrtest/exemplary/banner.json delete mode 100644 adapters/engagebdr/engagebdrtest/exemplary/multi-banner.json delete mode 100644 adapters/engagebdr/engagebdrtest/exemplary/multi-video.json delete mode 100644 adapters/engagebdr/engagebdrtest/exemplary/native.json delete mode 100644 adapters/engagebdr/engagebdrtest/exemplary/video.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/audio.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/multi-1-invalid-imp.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext-bidder.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/no-imp-sspid.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/no-imp.json delete mode 100644 adapters/engagebdr/engagebdrtest/supplemental/response-500.json delete mode 100644 adapters/engagebdr/params_test.go delete mode 100644 openrtb_ext/imp_engagebdr.go delete mode 100644 static/bidder-info/engagebdr.yaml delete mode 100644 static/bidder-params/engagebdr.json diff --git a/adapters/engagebdr/engagebdr.go b/adapters/engagebdr/engagebdr.go deleted file mode 100644 index eb0160172a0..00000000000 --- a/adapters/engagebdr/engagebdr.go +++ /dev/null @@ -1,151 +0,0 @@ -package engagebdr - -import ( - "encoding/json" - "net/http" - - "github.com/prebid/openrtb/v19/openrtb2" - "github.com/prebid/prebid-server/config" - "github.com/prebid/prebid-server/openrtb_ext" - - "fmt" - - "github.com/prebid/prebid-server/adapters" - "github.com/prebid/prebid-server/errortypes" -) - -type EngageBDRAdapter struct { - URI string -} - -func (adapter *EngageBDRAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - - errors := make([]error, 0, len(request.Imp)) - - if request.Imp == nil || len(request.Imp) == 0 { - errors = append(errors, &errortypes.BadInput{ - Message: fmt.Sprintf("Invalid BidRequest. No valid imp."), - }) - return nil, errors - } - - // EngageBDR uses different sspid parameters for banner and video. - sspidImps := make(map[string][]openrtb2.Imp) - for _, imp := range request.Imp { - - if imp.Audio != nil { - errors = append(errors, &errortypes.BadInput{ - Message: fmt.Sprintf("Ignoring imp id=%s, invalid MediaType. EngageBDR only supports Banner, Video and Native.", imp.ID), - }) - continue - } - - var bidderExt adapters.ExtImpBidder - if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil { - errors = append(errors, &errortypes.BadInput{ - Message: fmt.Sprintf("Ignoring imp id=%s, error while decoding extImpBidder, err: %s.", imp.ID, err), - }) - continue - } - impExt := openrtb_ext.ExtImpEngageBDR{} - err := json.Unmarshal(bidderExt.Bidder, &impExt) - if err != nil { - errors = append(errors, &errortypes.BadInput{ - Message: fmt.Sprintf("Ignoring imp id=%s, error while decoding impExt, err: %s.", imp.ID, err), - }) - continue - } - if impExt.Sspid == "" { - errors = append(errors, &errortypes.BadInput{ - Message: fmt.Sprintf("Ignoring imp id=%s, no sspid present.", imp.ID), - }) - continue - } - sspidImps[impExt.Sspid] = append(sspidImps[impExt.Sspid], imp) - } - - var adapterRequests []*adapters.RequestData - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - - for sspid, imps := range sspidImps { - if len(imps) > 0 { - // Make a copy as we don't want to change the original request - reqCopy := *request - reqCopy.Imp = imps - reqJSON, err := json.Marshal(reqCopy) - if err != nil { - errors = append(errors, err) - return nil, errors - } - adapterReq := adapters.RequestData{ - Method: "POST", - Uri: adapter.URI + "?zoneid=" + sspid, - Body: reqJSON, - Headers: headers, - } - adapterRequests = append(adapterRequests, &adapterReq) - } - } - - return adapterRequests, errors -} - -func (adapter *EngageBDRAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if response.StatusCode == http.StatusNoContent { - return nil, nil - } - - if response.StatusCode == http.StatusBadRequest { - return nil, []error{&errortypes.BadInput{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", response.StatusCode), - }} - } - - if response.StatusCode != http.StatusOK { - return nil, []error{&errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info", response.StatusCode), - }} - } - - var bidResp openrtb2.BidResponse - if err := json.Unmarshal(response.Body, &bidResp); err != nil { - return nil, []error{err} - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(5) - - for _, sb := range bidResp.SeatBid { - for i := range sb.Bid { - bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ - Bid: &sb.Bid[i], - BidType: getMediaTypeForImp(sb.Bid[i].ImpID, internalRequest.Imp), - }) - } - } - return bidResponse, nil -} - -func getMediaTypeForImp(impId string, imps []openrtb2.Imp) openrtb_ext.BidType { - mediaType := openrtb_ext.BidTypeBanner - for _, imp := range imps { - if imp.ID == impId { - if imp.Video != nil { - mediaType = openrtb_ext.BidTypeVideo - } else if imp.Native != nil { - mediaType = openrtb_ext.BidTypeNative - } - return mediaType - } - } - return mediaType -} - -// Builder builds a new instance of the EngageBDR adapter for the given bidder with the given config. -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &EngageBDRAdapter{ - URI: config.Endpoint, - } - return bidder, nil -} diff --git a/adapters/engagebdr/engagebdr_test.go b/adapters/engagebdr/engagebdr_test.go deleted file mode 100644 index 0877750cb19..00000000000 --- a/adapters/engagebdr/engagebdr_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package engagebdr - -import ( - "testing" - - "github.com/prebid/prebid-server/adapters/adapterstest" - "github.com/prebid/prebid-server/config" - "github.com/prebid/prebid-server/openrtb_ext" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderEngageBDR, config.Adapter{ - Endpoint: "http://dsp.bnmla.com/hb"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "engagebdrtest", bidder) -} diff --git a/adapters/engagebdr/engagebdrtest/exemplary/banner.json b/adapters/engagebdr/engagebdrtest/exemplary/banner.json deleted file mode 100644 index 92b79e8f349..00000000000 --- a/adapters/engagebdr/engagebdrtest/exemplary/banner.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid": "99999" - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99999", - "body":{ - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid":"99999" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id" : "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "
", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - } - ], - "seat": "test-request-id" - } - ], - "bidid": "test-request-id", - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "
", - "adomain": ["advertiserdomain.com"], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - "type": "banner" - } - ] - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/exemplary/multi-banner.json b/adapters/engagebdr/engagebdrtest/exemplary/multi-banner.json deleted file mode 100644 index d11e38c46fc..00000000000 --- a/adapters/engagebdr/engagebdrtest/exemplary/multi-banner.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid": "99999" - } - } - }, - { - "id": "test-imp-id-2", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "sspid": "99999" - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99999", - "body":{ - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid":"99999" - } - } - }, - { - "id": "test-imp-id-2", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - "bidder": { - "sspid":"99999" - } - } - } - ] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id" : "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "
", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - { - "id" : "test-imp-id-2", - "impid": "test-imp-id-2", - "price": 7.50, - "adid": "abcde-12345-2", - "adm": "
", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345-2", - "w": 320, - "h": 50 - } - ], - "seat": "test-request-id" - } - ], - "bidid": "test-request-id", - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "
", - "adomain": ["advertiserdomain.com"], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - "type": "banner" - }, - { - "bid": { - "id": "test-imp-id-2", - "impid": "test-imp-id-2", - "price": 7.50, - "adid": "abcde-12345-2", - "adm": "
", - "adomain": ["advertiserdomain.com"], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345-2", - "w": 320, - "h": 50 - }, - "type": "banner" - } - ] - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/exemplary/multi-video.json b/adapters/engagebdr/engagebdrtest/exemplary/multi-video.json deleted file mode 100644 index 9506c963578..00000000000 --- a/adapters/engagebdr/engagebdrtest/exemplary/multi-video.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "w": 300, - "mimes": null, - "h": 250 - }, - "ext": { - "bidder": { - "sspid": "99998" - } - } - }, - { - "id": "test-imp-id-2", - "video": { - "w": 320, - "mimes": null, - "h": 50 - }, - "ext": { - "bidder": { - "sspid": "99998" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99998", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "w": 300, - "mimes": null, - "h": 250 - }, - "ext": { - "bidder": { - "sspid": "99998" - } - } - }, - { - "id": "test-imp-id-2", - "video": { - "w": 320, - "mimes": null, - "h": 50 - }, - "ext": { - "bidder": { - "sspid": "99998" - } - } - } - ] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "\nStatic VASTStatic VAST Tag", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "https://cdn0.bnmla.com/vtest.xml", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - { - "id": "test-imp-id-2", - "impid": "test-imp-id-2", - "price": 7.81, - "adid": "abcde-12345-2", - "adm": "\nStatic VASTStatic VAST Tag", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "https://cdn0.bnmla.com/vtest.xml", - "cid": "campaign1", - "crid": "abcde-12345-2", - "w": 320, - "h": 50 - } - ], - "seat": "test-request-id" - } - ], - "bidid": "test-request-id", - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "\nStatic VASTStatic VAST Tag", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "https://cdn0.bnmla.com/vtest.xml", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - "type": "video" - }, - { - "bid": { - "id": "test-imp-id-2", - "impid": "test-imp-id-2", - "price": 7.81, - "adid": "abcde-12345-2", - "adm": "\nStatic VASTStatic VAST Tag", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "https://cdn0.bnmla.com/vtest.xml", - "cid": "campaign1", - "crid": "abcde-12345-2", - "w": 320, - "h": 50 - }, - "type": "video" - } - ] - } - ] -} diff --git a/adapters/engagebdr/engagebdrtest/exemplary/native.json b/adapters/engagebdr/engagebdrtest/exemplary/native.json deleted file mode 100644 index 963194fb8bd..00000000000 --- a/adapters/engagebdr/engagebdrtest/exemplary/native.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"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}}]}", - "ver":"1.1" - }, - "ext": { - "bidder": { - "sspid": "99997" - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99997", - "body":{ - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"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}}]}", - "ver":"1.1" - }, - "ext": { - "bidder": { - "sspid":"99997" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id" : "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "{\"native\":{\"link\":{\"url\":\"https://rtb-use.mfadsrvr.com/click/ESoNneAwqCPnn97YSh0EoJzPUnSmqwdERCYPCdrHr1_TJz_V-x2xjMgxcROeooIH5fe1exAsWt2aqg1ESQEVQM8i0TpI1QBcV4V87Uzmf_XfAR6-6xqvqfGuDs-pJDWqAYz0P0OtHlrvVztlMdWu6JT9_GAtVAnB9gp0JchRJLSqr1h_GRZwuNUri7NvveTD7m8ZUHKNFldKPwHCbom120NFFn2Z3a6v0owsZfIgOff-1YyvZ9WkzVr3755kGRT_D1FUy3r2kurY8HdfeTiRuZAajluniEkJql7yGlS6hVfQ3vT3X93BKIo1F_A3o4bfywT49tM-3l2X8vwlc-w9X-B5VudQPJ8kboJZ2OuaD5AN///\"},\"assets\":[{\"id\":0,\"title\":{\"text\":\"4 Signs Your Heart Is Quietly Failing You\"},\"required\":1},{\"id\":3,\"img\":{\"w\":1200,\"h\":627,\"url\":\"https://de9a11s35xj3d.cloudfront.net/5922785fd53de8084607850abdaace4f.jpg\"}},{\"id\":4,\"data\":{\"value\":\"PhysioTru\"}},{\"id\":6,\"data\":{\"value\":\"\\n How To Avoid A Heart Attack (Do This For 7 Seconds Twice A Day)\\n \"}}],\"imptrackers\":[\"https://rtb-use.mfadsrvr.com/imp_c2s/v1/ESoNneAwqCPnn97YSh0EoJzPUnSmqwdERCYPCdrHr1_TJz_V-x2xjMgxcROeooIH5fe1exAsWt2aqg1ESQEVQM8i0TpI1QBcV4V87Uzmf_XfAR6-6xqvqfGuDs-pJDWqAYz0P0OtHlrvVztlMdWu6JT9_GAtVAnB9gp0JchRJLSqr1h_GRZwuNUri7NvveTD7m8ZUHKNFldKPwHCbom120NFFn2Z3a6v0owsZfIgOff-1YyvZ9WkzVr3755kGRT_D1FUy3r2kurY8HdfeTiRuZAajluniEkJql7yGlS6hVfQ3vT3X93BKIo1F_A3o4bfywT49tM-3l2X8vwlc-w9X-B5VudQPJ8kboJZ2OuaD5AN/${AUCTION_PRICE}\"],\"ver\":1}}", - "adomain": [ - "advertiserdomain.com" - ], - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - } - ], - "seat": "test-request-id" - } - ], - "bidid": "test-request-id", - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "{\"native\":{\"link\":{\"url\":\"https://rtb-use.mfadsrvr.com/click/ESoNneAwqCPnn97YSh0EoJzPUnSmqwdERCYPCdrHr1_TJz_V-x2xjMgxcROeooIH5fe1exAsWt2aqg1ESQEVQM8i0TpI1QBcV4V87Uzmf_XfAR6-6xqvqfGuDs-pJDWqAYz0P0OtHlrvVztlMdWu6JT9_GAtVAnB9gp0JchRJLSqr1h_GRZwuNUri7NvveTD7m8ZUHKNFldKPwHCbom120NFFn2Z3a6v0owsZfIgOff-1YyvZ9WkzVr3755kGRT_D1FUy3r2kurY8HdfeTiRuZAajluniEkJql7yGlS6hVfQ3vT3X93BKIo1F_A3o4bfywT49tM-3l2X8vwlc-w9X-B5VudQPJ8kboJZ2OuaD5AN///\"},\"assets\":[{\"id\":0,\"title\":{\"text\":\"4 Signs Your Heart Is Quietly Failing You\"},\"required\":1},{\"id\":3,\"img\":{\"w\":1200,\"h\":627,\"url\":\"https://de9a11s35xj3d.cloudfront.net/5922785fd53de8084607850abdaace4f.jpg\"}},{\"id\":4,\"data\":{\"value\":\"PhysioTru\"}},{\"id\":6,\"data\":{\"value\":\"\\n How To Avoid A Heart Attack (Do This For 7 Seconds Twice A Day)\\n \"}}],\"imptrackers\":[\"https://rtb-use.mfadsrvr.com/imp_c2s/v1/ESoNneAwqCPnn97YSh0EoJzPUnSmqwdERCYPCdrHr1_TJz_V-x2xjMgxcROeooIH5fe1exAsWt2aqg1ESQEVQM8i0TpI1QBcV4V87Uzmf_XfAR6-6xqvqfGuDs-pJDWqAYz0P0OtHlrvVztlMdWu6JT9_GAtVAnB9gp0JchRJLSqr1h_GRZwuNUri7NvveTD7m8ZUHKNFldKPwHCbom120NFFn2Z3a6v0owsZfIgOff-1YyvZ9WkzVr3755kGRT_D1FUy3r2kurY8HdfeTiRuZAajluniEkJql7yGlS6hVfQ3vT3X93BKIo1F_A3o4bfywT49tM-3l2X8vwlc-w9X-B5VudQPJ8kboJZ2OuaD5AN/${AUCTION_PRICE}\"],\"ver\":1}}", - "adomain": ["advertiserdomain.com"], - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - "type": "native" - } - ] - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/exemplary/video.json b/adapters/engagebdr/engagebdrtest/exemplary/video.json deleted file mode 100644 index 53c00dc4523..00000000000 --- a/adapters/engagebdr/engagebdrtest/exemplary/video.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "w": 300, - "mimes": null, - "h": 250 - }, - "ext": { - "bidder": { - "sspid":"99998" - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99998", - "body":{ - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "video": { - "w": 300, - "mimes": null, - "h": 250 - }, - "ext": { - "bidder": { - "sspid":"99998" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "\nStatic VASTStatic VAST Tag", - "adomain":[ - "advertiserdomain.com" - ], - "iurl": "https://cdn0.bnmla.com/vtest.xml", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - } - ], - "seat": "test-request-id" - } - ], - "bidid": "test-request-id", - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "\nStatic VASTStatic VAST Tag", - "adomain": ["advertiserdomain.com"], - "iurl": "https://cdn0.bnmla.com/vtest.xml", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - "type": "video" - } - ] - - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/audio.json b/adapters/engagebdr/engagebdrtest/supplemental/audio.json deleted file mode 100644 index e03fdb50aa4..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/audio.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "audio": { - }, - "ext": { - "bidder": { - "sspid": "99996" - } - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Ignoring imp id=test-imp-id, invalid MediaType. EngageBDR only supports Banner, Video and Native.", - "comparison": "literal" - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/multi-1-invalid-imp.json b/adapters/engagebdr/engagebdrtest/supplemental/multi-1-invalid-imp.json deleted file mode 100644 index a2cd79c9deb..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/multi-1-invalid-imp.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid": "99999" - } - } - }, - { - "id": "test-imp-id-2", - "banner": { - "w": 320, - "h": 50 - }, - "ext": { - } - } - ] - }, - "expectedMakeRequestsErrors": [ - { - "value": "Ignoring imp id=test-imp-id-2, error while decoding impExt, err: unexpected end of JSON input.", - "comparison": "literal" - } - ], - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99999", - "body":{ - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid":"99999" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id" : "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "
", - "adomain": [ - "advertiserdomain.com" - ], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - } - ], - "seat": "test-request-id" - } - ], - "bidid": "test-request-id", - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test-imp-id", - "impid": "test-imp-id", - "price": 9.81, - "adid": "abcde-12345", - "adm": "
", - "adomain": ["advertiserdomain.com"], - "iurl": "http://match.bnmla.com/usersync?sspid=59&redir=", - "cid": "campaign1", - "crid": "abcde-12345", - "w": 300, - "h": 250 - }, - "type": "banner" - } - ] - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext-bidder.json b/adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext-bidder.json deleted file mode 100644 index 9aa8177fc8b..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext-bidder.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Ignoring imp id=test-imp-id, error while decoding impExt, err: unexpected end of JSON input.", - "comparison": "literal" - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext.json b/adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext.json deleted file mode 100644 index 04e167fd671..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/no-imp-ext.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Ignoring imp id=test-imp-id, error while decoding extImpBidder, err: unexpected end of JSON input.", - "comparison": "literal" - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/no-imp-sspid.json b/adapters/engagebdr/engagebdrtest/supplemental/no-imp-sspid.json deleted file mode 100644 index d193bf779fc..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/no-imp-sspid.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - } - } - } - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Ignoring imp id=test-imp-id, no sspid present.", - "comparison": "literal" - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/no-imp.json b/adapters/engagebdr/engagebdrtest/supplemental/no-imp.json deleted file mode 100644 index c5b0fa96042..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/no-imp.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - ] - }, - - "expectedMakeRequestsErrors": [ - { - "value": "Invalid BidRequest. No valid imp.", - "comparison": "literal" - } - ] -} - diff --git a/adapters/engagebdr/engagebdrtest/supplemental/response-500.json b/adapters/engagebdr/engagebdrtest/supplemental/response-500.json deleted file mode 100644 index ce750770a63..00000000000 --- a/adapters/engagebdr/engagebdrtest/supplemental/response-500.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid": "99999" - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://dsp.bnmla.com/hb?zoneid=99999", - "body":{ - "id": "test-request-id", - "imp": [{ - "id": "test-imp-id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "sspid":"99999" - } - } - }] - } - }, - "mockResponse": { - "status": 500 - } - } - ], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 500. Run with request.debug = 1 for more info", - "comparison": "literal" - } - ] -} - diff --git a/adapters/engagebdr/params_test.go b/adapters/engagebdr/params_test.go deleted file mode 100644 index c797d04ecc8..00000000000 --- a/adapters/engagebdr/params_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package engagebdr - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/openrtb_ext" -) - -func TestValidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderEngageBDR, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected beachfront params: %s", validParam) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json-schemas. %v", err) - } - - for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderEngageBDR, json.RawMessage(invalidParam)); err == nil { - t.Errorf("Schema allowed unexpected params: %s", invalidParam) - } - } -} - -var validParams = []string{ - `{"sspid":"12345"}`, -} - -var invalidParams = []string{ - ``, - `null`, - `true`, - `5`, - `4.2`, - `[]`, - `{}`, - `{"sspid":null}`, - `{"appId":"11bc5dd5-7421-4dd8-c926-40fa653bec76"}`, -} diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index d2cb777b18a..3a2f871e199 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -75,7 +75,6 @@ import ( "github.com/prebid/prebid-server/adapters/dmx" evolution "github.com/prebid/prebid-server/adapters/e_volution" "github.com/prebid/prebid-server/adapters/emtv" - "github.com/prebid/prebid-server/adapters/engagebdr" "github.com/prebid/prebid-server/adapters/eplanning" "github.com/prebid/prebid-server/adapters/epom" "github.com/prebid/prebid-server/adapters/flipp" @@ -267,7 +266,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderDmx: dmx.Builder, openrtb_ext.BidderEmtv: emtv.Builder, openrtb_ext.BidderEmxDigital: cadentaperturemx.Builder, - openrtb_ext.BidderEngageBDR: engagebdr.Builder, openrtb_ext.BidderEPlanning: eplanning.Builder, openrtb_ext.BidderEpom: epom.Builder, openrtb_ext.BidderEpsilon: conversant.Builder, diff --git a/exchange/adapter_util.go b/exchange/adapter_util.go index 7b762eb6794..8ce6f0df67c 100644 --- a/exchange/adapter_util.go +++ b/exchange/adapter_util.go @@ -118,6 +118,7 @@ func GetDisabledBidderWarningMessages(infos config.BidderInfos) map[string]strin "groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`, "verizonmedia": `Bidder "verizonmedia" is no longer available in Prebid Server. Please update your configuration.`, "brightroll": `Bidder "brightroll" is no longer available in Prebid Server. Please update your configuration.`, + "engagebdr": `Bidder "engagebdr" is no longer available in Prebid Server. Please update your configuration.`, "yeahmobi": `Bidder "yeahmobi" is no longer available in Prebid Server. Please update your configuration.`, "ninthdecimal": `Bidder "ninthdecimal" is no longer available in Prebid Server. Please update your configuration.`, "kubient": `Bidder "kubient" is no longer available in Prebid Server. Please update your configuration.`, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 0af0badef41..34c01f1ce32 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -95,7 +95,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderDmx, BidderEmtv, BidderEmxDigital, - BidderEngageBDR, BidderEPlanning, BidderEpom, BidderEpsilon, @@ -385,7 +384,6 @@ const ( BidderDmx BidderName = "dmx" BidderEmtv BidderName = "emtv" BidderEmxDigital BidderName = "emx_digital" - BidderEngageBDR BidderName = "engagebdr" BidderEPlanning BidderName = "eplanning" BidderEpsilon BidderName = "epsilon" BidderEpom BidderName = "epom" diff --git a/openrtb_ext/imp_engagebdr.go b/openrtb_ext/imp_engagebdr.go deleted file mode 100644 index db500111a78..00000000000 --- a/openrtb_ext/imp_engagebdr.go +++ /dev/null @@ -1,6 +0,0 @@ -package openrtb_ext - -// ExtImpEngageBDR defines the contract for bidrequest.imp[i].ext.prebid.bidder.engagebdr -type ExtImpEngageBDR struct { - Sspid string `json:"sspid"` -} diff --git a/static/bidder-info/engagebdr.yaml b/static/bidder-info/engagebdr.yaml deleted file mode 100644 index 8218040c605..00000000000 --- a/static/bidder-info/engagebdr.yaml +++ /dev/null @@ -1,14 +0,0 @@ -endpoint: "http://dsp.bnmla.com/hb" -maintainer: - email: "tech@engagebdr.com" -capabilities: - app: - mediaTypes: - - banner - - video - - native -userSync: - iframe: - url: "https://match.bnmla.com/usersync/s2s_sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r={{.RedirectURL}}" - userMacro: "${UUID}" - diff --git a/static/bidder-params/engagebdr.json b/static/bidder-params/engagebdr.json deleted file mode 100644 index 4f987004045..00000000000 --- a/static/bidder-params/engagebdr.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "EngageBDR Adapter Params", - "description": "A schema which validates params accepted by the EngageBDR adapter", - "type": "object", - "properties": { - "sspid": { - "type": "string", - "description": "SSPID parameter", - "pattern": "^[0-9]+$" - } - }, - "required": ["sspid"] -}