From b9a4ba663b00a32992dd47880d7b6e4e44805633 Mon Sep 17 00:00:00 2001 From: Nuba Date: Fri, 10 Oct 2025 14:43:23 +0300 Subject: [PATCH 1/8] feature/nuba-adapter --- adapters/nuba/nuba.go | 156 ++++++++++++++++++ adapters/nuba/nuba_test.go | 20 +++ .../nuba/nubatest/exemplary/endpointId.json | 134 +++++++++++++++ .../nubatest/exemplary/simple-banner.json | 134 +++++++++++++++ .../nubatest/exemplary/simple-native.json | 118 +++++++++++++ .../nuba/nubatest/exemplary/simple-video.json | 129 +++++++++++++++ .../nubatest/exemplary/simple-web-banner.json | 134 +++++++++++++++ .../nubatest/supplemental/bad_media_type.json | 87 ++++++++++ .../nubatest/supplemental/bad_response.json | 85 ++++++++++ .../nubatest/supplemental/status-204.json | 80 +++++++++ .../nubatest/supplemental/status-not-200.json | 85 ++++++++++ adapters/nuba/params_test.go | 47 ++++++ exchange/adapter_builders.go | 2 + openrtb_ext/bidders.go | 2 + openrtb_ext/imp_nuba.go | 6 + static/bidder-info/nuba.yaml | 16 ++ static/bidder-params/nuba.json | 23 +++ 17 files changed, 1258 insertions(+) create mode 100644 adapters/nuba/nuba.go create mode 100644 adapters/nuba/nuba_test.go create mode 100644 adapters/nuba/nubatest/exemplary/endpointId.json create mode 100644 adapters/nuba/nubatest/exemplary/simple-banner.json create mode 100644 adapters/nuba/nubatest/exemplary/simple-native.json create mode 100644 adapters/nuba/nubatest/exemplary/simple-video.json create mode 100644 adapters/nuba/nubatest/exemplary/simple-web-banner.json create mode 100644 adapters/nuba/nubatest/supplemental/bad_media_type.json create mode 100644 adapters/nuba/nubatest/supplemental/bad_response.json create mode 100644 adapters/nuba/nubatest/supplemental/status-204.json create mode 100644 adapters/nuba/nubatest/supplemental/status-not-200.json create mode 100644 adapters/nuba/params_test.go create mode 100644 openrtb_ext/imp_nuba.go create mode 100644 static/bidder-info/nuba.yaml create mode 100644 static/bidder-params/nuba.json diff --git a/adapters/nuba/nuba.go b/adapters/nuba/nuba.go new file mode 100644 index 00000000000..cec8f0b9299 --- /dev/null +++ b/adapters/nuba/nuba.go @@ -0,0 +1,156 @@ +package nuba + +import ( + "encoding/json" + "fmt" + "net/http" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +type adapter struct { + endpoint string +} + +type reqBodyExt struct { + NubaBidderExt reqBodyExtBidder `json:"bidder"` +} + +type reqBodyExtBidder struct { + Type string `json:"type"` + PlacementID string `json:"placementId,omitempty"` + EndpointID string `json:"endpointId,omitempty"` +} + +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + var err error + var adapterRequests []*adapters.RequestData + + reqCopy := *request + for _, imp := range request.Imp { + reqCopy.Imp = []openrtb2.Imp{imp} + + var bidderExt adapters.ExtImpBidder + var nubaExt openrtb_ext.ImpExtNuba + + if err = jsonutil.Unmarshal(reqCopy.Imp[0].Ext, &bidderExt); err != nil { + return nil, []error{err} + } + if err = jsonutil.Unmarshal(bidderExt.Bidder, &nubaExt); err != nil { + return nil, []error{err} + } + + temp := reqBodyExt{NubaBidderExt: reqBodyExtBidder{}} + + if nubaExt.PlacementID != "" { + temp.NubaBidderExt.PlacementID = nubaExt.PlacementID + temp.NubaBidderExt.Type = "publisher" + } else if nubaExt.EndpointID != "" { + temp.NubaBidderExt.EndpointID = nubaExt.EndpointID + temp.NubaBidderExt.Type = "network" + } + + finalyImpExt, err := json.Marshal(temp) + if err != nil { + return nil, []error{err} + } + + reqCopy.Imp[0].Ext = finalyImpExt + + adapterReq, err := a.makeRequest(&reqCopy) + if err != nil { + return nil, []error{err} + } + + if adapterReq != nil { + adapterRequests = append(adapterRequests, adapterReq) + } + } + return adapterRequests, nil +} + +func (a *adapter) makeRequest(request *openrtb2.BidRequest) (*adapters.RequestData, error) { + reqJSON, err := json.Marshal(request) + if err != nil { + return nil, err + } + + headers := http.Header{} + headers.Add("Content-Type", "application/json;charset=utf-8") + headers.Add("Accept", "application/json") + return &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: reqJSON, + Headers: headers, + ImpIDs: openrtb_ext.GetImpIDs(request.Imp), + }, err +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if responseData.StatusCode == http.StatusNoContent { + return nil, nil + } + + if responseData.StatusCode != http.StatusOK { + err := &errortypes.BadServerResponse{ + Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode), + } + return nil, []error{err} + } + + var response openrtb2.BidResponse + if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) + bidResponse.Currency = response.Cur + for _, seatBid := range response.SeatBid { + for i := range seatBid.Bid { + bidType, err := getMediaTypeForImp(seatBid.Bid[i].ImpID, request.Imp) + if err != nil { + return nil, []error{err} + } + + b := &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: bidType, + } + bidResponse.Bids = append(bidResponse.Bids, b) + } + } + return bidResponse, nil +} + +func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, error) { + for _, imp := range imps { + if imp.ID == impID { + if imp.Banner != nil { + return openrtb_ext.BidTypeBanner, nil + } + if imp.Video != nil { + return openrtb_ext.BidTypeVideo, nil + } + if imp.Native != nil { + return openrtb_ext.BidTypeNative, nil + } + } + } + + return "", &errortypes.BadInput{ + Message: fmt.Sprintf("Failed to find impression \"%s\"", impID), + } +} diff --git a/adapters/nuba/nuba_test.go b/adapters/nuba/nuba_test.go new file mode 100644 index 00000000000..d67f61e3997 --- /dev/null +++ b/adapters/nuba/nuba_test.go @@ -0,0 +1,20 @@ +package nuba + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderNuba, config.Adapter{ + Endpoint: "http://sa-lb.deliverimp.com/pserver"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "nubatest", bidder) +} diff --git a/adapters/nuba/nubatest/exemplary/endpointId.json b/adapters/nuba/nubatest/exemplary/endpointId.json new file mode 100644 index 00000000000..0d00a286e4d --- /dev/null +++ b/adapters/nuba/nubatest/exemplary/endpointId.json @@ -0,0 +1,134 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "endpointId": "test", + "type": "network" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "nuba" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-banner.json b/adapters/nuba/nubatest/exemplary/simple-banner.json new file mode 100644 index 00000000000..09aba849c4b --- /dev/null +++ b/adapters/nuba/nubatest/exemplary/simple-banner.json @@ -0,0 +1,134 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "nuba" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-native.json b/adapters/nuba/nubatest/exemplary/simple-native.json new file mode 100644 index 00000000000..88430a8e068 --- /dev/null +++ b/adapters/nuba/nubatest/exemplary/simple-native.json @@ -0,0 +1,118 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "native": { + "request": "{\"ver\":\"1.1\",\"layout\":1,\"adunit\":2,\"plcmtcnt\":6,\"plcmttype\":4,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":492,\"hmin\":328,\"type\":3,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":4,\"required\":0,\"data\":{\"type\":6}},{\"id\":5,\"required\":0,\"data\":{\"type\":7}},{\"id\":6,\"required\":0,\"data\":{\"type\":1,\"len\":20}}]}", + "ver": "1.1" + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "native": { + "request": "{\"ver\":\"1.1\",\"layout\":1,\"adunit\":2,\"plcmtcnt\":6,\"plcmttype\":4,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":492,\"hmin\":328,\"type\":3,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":4,\"required\":0,\"data\":{\"type\":6}},{\"id\":5,\"required\":0,\"data\":{\"type\":7}},{\"id\":6,\"required\":0,\"data\":{\"type\":1,\"len\":20}}]}", + "ver": "1.1" + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "native" + } + } + } + ], + "seat": "nuba" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "native" + } + } + }, + "type": "native" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-video.json b/adapters/nuba/nubatest/exemplary/simple-video.json new file mode 100644 index 00000000000..b1d01d3b1a5 --- /dev/null +++ b/adapters/nuba/nubatest/exemplary/simple-video.json @@ -0,0 +1,129 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 5 + ], + "w": 1024, + "h": 576 + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "video": { + "mimes": [ + "video/mp4" + ], + "protocols": [ + 2, + 5 + ], + "w": 1024, + "h": 576 + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ] + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "00:01:00", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "ext": { + "prebid": { + "type": "video" + } + } + } + ], + "seat": "nuba" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "00:01:00", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "ext": { + "prebid": { + "type": "video" + } + } + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-web-banner.json b/adapters/nuba/nubatest/exemplary/simple-web-banner.json new file mode 100644 index 00000000000..ac0e7b56016 --- /dev/null +++ b/adapters/nuba/nubatest/exemplary/simple-web-banner.json @@ -0,0 +1,134 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "site": { + "id": "1", + "domain": "test.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Ubuntu" + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "site": { + "id": "1", + "domain": "test.com" + }, + "device": { + "ip": "123.123.123.123", + "ua": "Ubuntu" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 468, + "h": 60, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "nuba" + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 468, + "h": 60, + "ext": { + "prebid": { + "type": "banner" + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/nuba/nubatest/supplemental/bad_media_type.json b/adapters/nuba/nubatest/supplemental/bad_media_type.json new file mode 100644 index 00000000000..04f0ea0a501 --- /dev/null +++ b/adapters/nuba/nubatest/supplemental/bad_media_type.json @@ -0,0 +1,87 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.27543, + "adm": "", + "cid": "test_cid", + "crid": "test_crid", + "dealid": "test_dealid", + "w": 300, + "h": 250, + "ext": { + "prebid": { + "type": "banner" + } + } + } + ], + "seat": "nuba" + } + ], + "cur": "USD" + } + } + }], + "expectedMakeBidsErrors": [ + { + "value": "Failed to find impression \"test-imp-id\"", + "comparison": "literal" + } + ] +} diff --git a/adapters/nuba/nubatest/supplemental/bad_response.json b/adapters/nuba/nubatest/supplemental/bad_response.json new file mode 100644 index 00000000000..ca81c4cc167 --- /dev/null +++ b/adapters/nuba/nubatest/supplemental/bad_response.json @@ -0,0 +1,85 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": "" + } + }], + "expectedMakeBidsErrors": [ + { + "value": "expect { or n, but found \"", + "comparison": "literal" + } + ] +} diff --git a/adapters/nuba/nubatest/supplemental/status-204.json b/adapters/nuba/nubatest/supplemental/status-204.json new file mode 100644 index 00000000000..1e99bea063f --- /dev/null +++ b/adapters/nuba/nubatest/supplemental/status-204.json @@ -0,0 +1,80 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + }], + "expectedBidResponses": [] +} diff --git a/adapters/nuba/nubatest/supplemental/status-not-200.json b/adapters/nuba/nubatest/supplemental/status-not-200.json new file mode 100644 index 00000000000..4b268e6a2d4 --- /dev/null +++ b/adapters/nuba/nubatest/supplemental/status-not-200.json @@ -0,0 +1,85 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "http://sa-lb.deliverimp.com/pserver", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + } + ] + }, + "ext": { + "bidder": { + "placementId": "test", + "type": "publisher" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.wls.testwlsapplication" + }, + "device": { + "ip": "123.123.123.123", + "ifa": "sdjfksdf-dfsds-dsdg-dsgg" + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 404, + "body": {} + } + }], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 404. Run with request.debug = 1 for more info.", + "comparison": "literal" + } + ] +} diff --git a/adapters/nuba/params_test.go b/adapters/nuba/params_test.go new file mode 100644 index 00000000000..b3f9101a798 --- /dev/null +++ b/adapters/nuba/params_test.go @@ -0,0 +1,47 @@ +package nuba + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/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 schema. %v", err) + } + + for _, p := range validParams { + if err := validator.Validate(openrtb_ext.BidderNuba, json.RawMessage(p)); err != nil { + t.Errorf("Schema rejected valid params: %s", p) + } + } +} + +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json schema. %v", err) + } + + for _, p := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderNuba, json.RawMessage(p)); err == nil { + t.Errorf("Schema allowed invalid params: %s", p) + } + } +} + +var validParams = []string{ + `{"placementId": "test"}`, + `{"placementId": "1"}`, + `{"endpointId": "test"}`, + `{"endpointId": "1"}`, +} + +var invalidParams = []string{ + `{"placementId": 42}`, + `{"endpointId": 42}`, + `{"placementId": "1", "endpointId": "1"}`, +} diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index e025eb0ed3c..675ae42074b 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -169,6 +169,7 @@ import ( "github.com/prebid/prebid-server/v3/adapters/nextmillennium" "github.com/prebid/prebid-server/v3/adapters/nexx360" "github.com/prebid/prebid-server/v3/adapters/nobid" + "github.com/prebid/prebid-server/v3/adapters/nuba" "github.com/prebid/prebid-server/v3/adapters/ogury" "github.com/prebid/prebid-server/v3/adapters/oms" "github.com/prebid/prebid-server/v3/adapters/onetag" @@ -437,6 +438,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderNextMillennium: nextmillennium.Builder, openrtb_ext.BidderNexx360: nexx360.Builder, openrtb_ext.BidderNoBid: nobid.Builder, + openrtb_ext.BidderNuba: nuba.Builder, openrtb_ext.BidderOgury: ogury.Builder, openrtb_ext.BidderOms: oms.Builder, openrtb_ext.BidderOneTag: onetag.Builder, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index cdb6dcd2c7c..fdf5f828f56 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -187,6 +187,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderNextMillennium, BidderNexx360, BidderNoBid, + BidderNuba, BidderOgury, BidderOms, BidderOneTag, @@ -558,6 +559,7 @@ const ( BidderNativo BidderName = "nativo" BidderNextMillennium BidderName = "nextmillennium" BidderNexx360 BidderName = "nexx360" + BidderNuba BidderName = "nuba" BidderNoBid BidderName = "nobid" BidderOgury BidderName = "ogury" BidderOms BidderName = "oms" diff --git a/openrtb_ext/imp_nuba.go b/openrtb_ext/imp_nuba.go new file mode 100644 index 00000000000..83d7f6a3a52 --- /dev/null +++ b/openrtb_ext/imp_nuba.go @@ -0,0 +1,6 @@ +package openrtb_ext + +type ImpExtNuba struct { + PlacementID string `json:"placementId"` + EndpointID string `json:"endpointId"` +} diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml new file mode 100644 index 00000000000..18882f458b9 --- /dev/null +++ b/static/bidder-info/nuba.yaml @@ -0,0 +1,16 @@ +endpoint: "http://sa-lb.deliverimp.com/pserver" +maintainer: + email: "ssp@nuba.io" +gvlVendorID: null +capabilities: + site: + mediaTypes: + - banner + - video + - native + + app: + mediaTypes: + - banner + - video + - native diff --git a/static/bidder-params/nuba.json b/static/bidder-params/nuba.json new file mode 100644 index 00000000000..2aa65ff8c50 --- /dev/null +++ b/static/bidder-params/nuba.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Nuba Adapter Params", + "description": "A schema which validates params accepted by the Nuba adapter", + "type": "object", + + "properties": { + "placementId": { + "type": "string", + "minLength": 1, + "description": "Placement ID" + }, + "endpointId": { + "type": "string", + "minLength": 1, + "description": "Endpoint ID" + } + }, + "oneOf": [ + { "required": ["placementId"] }, + { "required": ["endpointId"] } + ] +} \ No newline at end of file From 6c9d9f22d99200e5f37a7045ba8250c3e2134a74 Mon Sep 17 00:00:00 2001 From: Nuba Date: Tue, 14 Oct 2025 10:23:34 +0300 Subject: [PATCH 2/8] feature/nuba-adapter --- adapters/nuba/nuba.go | 23 ++++++++++++++++--- .../nuba/nubatest/exemplary/endpointId.json | 2 ++ .../nubatest/exemplary/simple-banner.json | 2 ++ .../nubatest/exemplary/simple-native.json | 2 ++ .../nuba/nubatest/exemplary/simple-video.json | 2 ++ .../nubatest/exemplary/simple-web-banner.json | 2 ++ .../nubatest/supplemental/bad_media_type.json | 1 + adapters/nuba/params_test.go | 2 +- 8 files changed, 32 insertions(+), 4 deletions(-) diff --git a/adapters/nuba/nuba.go b/adapters/nuba/nuba.go index cec8f0b9299..4f5d5128591 100644 --- a/adapters/nuba/nuba.go +++ b/adapters/nuba/nuba.go @@ -120,9 +120,14 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R bidResponse.Currency = response.Cur for _, seatBid := range response.SeatBid { for i := range seatBid.Bid { - bidType, err := getMediaTypeForImp(seatBid.Bid[i].ImpID, request.Imp) + + bidType, err := getMediaTypeForBid(seatBid.Bid[i]) if err != nil { - return nil, []error{err} + fb, fbErr := getMediaTypeForImp(seatBid.Bid[i].ImpID, request.Imp) + if fbErr != nil { + return nil, []error{fbErr} + } + bidType = fb } b := &adapters.TypedBid{ @@ -149,8 +154,20 @@ func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, } } } - return "", &errortypes.BadInput{ Message: fmt.Sprintf("Failed to find impression \"%s\"", impID), } } + +func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { + switch bid.MType { + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + case openrtb2.MarkupVideo: + return openrtb_ext.BidTypeVideo, nil + case openrtb2.MarkupNative: + return openrtb_ext.BidTypeNative, nil + default: + return "", fmt.Errorf("failed to parse bid mtype (%d) for impression id \"%s\"", bid.MType, bid.ImpID) + } +} diff --git a/adapters/nuba/nubatest/exemplary/endpointId.json b/adapters/nuba/nubatest/exemplary/endpointId.json index 0d00a286e4d..af03e31288d 100644 --- a/adapters/nuba/nubatest/exemplary/endpointId.json +++ b/adapters/nuba/nubatest/exemplary/endpointId.json @@ -91,6 +91,7 @@ "dealid": "test_dealid", "w": 300, "h": 250, + "mtype": 1, "ext": { "prebid": { "type": "banner" @@ -118,6 +119,7 @@ "cid": "test_cid", "crid": "test_crid", "dealid": "test_dealid", + "mtype": 1, "w": 300, "h": 250, "ext": { diff --git a/adapters/nuba/nubatest/exemplary/simple-banner.json b/adapters/nuba/nubatest/exemplary/simple-banner.json index 09aba849c4b..27eea2316a1 100644 --- a/adapters/nuba/nubatest/exemplary/simple-banner.json +++ b/adapters/nuba/nubatest/exemplary/simple-banner.json @@ -91,6 +91,7 @@ "dealid": "test_dealid", "w": 300, "h": 250, + "mtype": 1, "ext": { "prebid": { "type": "banner" @@ -120,6 +121,7 @@ "dealid": "test_dealid", "w": 300, "h": 250, + "mtype": 1, "ext": { "prebid": { "type": "banner" diff --git a/adapters/nuba/nubatest/exemplary/simple-native.json b/adapters/nuba/nubatest/exemplary/simple-native.json index 88430a8e068..bd9aa745cdb 100644 --- a/adapters/nuba/nubatest/exemplary/simple-native.json +++ b/adapters/nuba/nubatest/exemplary/simple-native.json @@ -73,6 +73,7 @@ "cid": "test_cid", "crid": "test_crid", "dealid": "test_dealid", + "mtype": 4, "w": 300, "h": 250, "ext": { @@ -104,6 +105,7 @@ "dealid": "test_dealid", "w": 300, "h": 250, + "mtype": 4, "ext": { "prebid": { "type": "native" diff --git a/adapters/nuba/nubatest/exemplary/simple-video.json b/adapters/nuba/nubatest/exemplary/simple-video.json index b1d01d3b1a5..c1b195300f2 100644 --- a/adapters/nuba/nubatest/exemplary/simple-video.json +++ b/adapters/nuba/nubatest/exemplary/simple-video.json @@ -87,6 +87,7 @@ "cid": "test_cid", "crid": "test_crid", "dealid": "test_dealid", + "mtype": 2, "ext": { "prebid": { "type": "video" @@ -115,6 +116,7 @@ "cid": "test_cid", "crid": "test_crid", "dealid": "test_dealid", + "mtype": 2, "ext": { "prebid": { "type": "video" diff --git a/adapters/nuba/nubatest/exemplary/simple-web-banner.json b/adapters/nuba/nubatest/exemplary/simple-web-banner.json index ac0e7b56016..fb7b6518725 100644 --- a/adapters/nuba/nubatest/exemplary/simple-web-banner.json +++ b/adapters/nuba/nubatest/exemplary/simple-web-banner.json @@ -91,6 +91,7 @@ "dealid": "test_dealid", "w": 468, "h": 60, + "mtype": 1, "ext": { "prebid": { "type": "banner" @@ -120,6 +121,7 @@ "dealid": "test_dealid", "w": 468, "h": 60, + "mtype": 1, "ext": { "prebid": { "type": "banner" diff --git a/adapters/nuba/nubatest/supplemental/bad_media_type.json b/adapters/nuba/nubatest/supplemental/bad_media_type.json index 04f0ea0a501..71a154157ae 100644 --- a/adapters/nuba/nubatest/supplemental/bad_media_type.json +++ b/adapters/nuba/nubatest/supplemental/bad_media_type.json @@ -64,6 +64,7 @@ "dealid": "test_dealid", "w": 300, "h": 250, + "mtype": 0, "ext": { "prebid": { "type": "banner" diff --git a/adapters/nuba/params_test.go b/adapters/nuba/params_test.go index b3f9101a798..74b1c700f79 100644 --- a/adapters/nuba/params_test.go +++ b/adapters/nuba/params_test.go @@ -15,7 +15,7 @@ func TestValidParams(t *testing.T) { for _, p := range validParams { if err := validator.Validate(openrtb_ext.BidderNuba, json.RawMessage(p)); err != nil { - t.Errorf("Schema rejected valid params: %s", p) + t.Errorf("Schema rejected valid params: %s: %s", p, err) } } } From 6737f7b84c43011ee0accbef97791dcf7503c4ae Mon Sep 17 00:00:00 2001 From: Nuba Date: Fri, 21 Nov 2025 15:05:51 +0200 Subject: [PATCH 3/8] feature/nuba-adapter --- adapters/nuba/nuba.go | 173 ------------------ adapters/nuba/nuba_test.go | 20 -- .../nuba/nubatest/exemplary/endpointId.json | 136 -------------- .../nubatest/exemplary/simple-banner.json | 136 -------------- .../nubatest/exemplary/simple-native.json | 120 ------------ .../nuba/nubatest/exemplary/simple-video.json | 131 ------------- .../nubatest/exemplary/simple-web-banner.json | 136 -------------- .../nubatest/supplemental/bad_media_type.json | 88 --------- .../nubatest/supplemental/bad_response.json | 85 --------- .../nubatest/supplemental/status-204.json | 80 -------- .../nubatest/supplemental/status-not-200.json | 85 --------- adapters/nuba/params_test.go | 47 ----- exchange/adapter_builders.go | 2 - openrtb_ext/bidders.go | 2 - openrtb_ext/imp_nuba.go | 6 - static/bidder-info/nuba.yaml | 22 +-- static/bidder-params/nuba.json | 23 --- 17 files changed, 9 insertions(+), 1283 deletions(-) delete mode 100644 adapters/nuba/nuba.go delete mode 100644 adapters/nuba/nuba_test.go delete mode 100644 adapters/nuba/nubatest/exemplary/endpointId.json delete mode 100644 adapters/nuba/nubatest/exemplary/simple-banner.json delete mode 100644 adapters/nuba/nubatest/exemplary/simple-native.json delete mode 100644 adapters/nuba/nubatest/exemplary/simple-video.json delete mode 100644 adapters/nuba/nubatest/exemplary/simple-web-banner.json delete mode 100644 adapters/nuba/nubatest/supplemental/bad_media_type.json delete mode 100644 adapters/nuba/nubatest/supplemental/bad_response.json delete mode 100644 adapters/nuba/nubatest/supplemental/status-204.json delete mode 100644 adapters/nuba/nubatest/supplemental/status-not-200.json delete mode 100644 adapters/nuba/params_test.go delete mode 100644 openrtb_ext/imp_nuba.go delete mode 100644 static/bidder-params/nuba.json diff --git a/adapters/nuba/nuba.go b/adapters/nuba/nuba.go deleted file mode 100644 index 4f5d5128591..00000000000 --- a/adapters/nuba/nuba.go +++ /dev/null @@ -1,173 +0,0 @@ -package nuba - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v3/adapters" - "github.com/prebid/prebid-server/v3/config" - "github.com/prebid/prebid-server/v3/errortypes" - "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v3/util/jsonutil" -) - -type adapter struct { - endpoint string -} - -type reqBodyExt struct { - NubaBidderExt reqBodyExtBidder `json:"bidder"` -} - -type reqBodyExtBidder struct { - Type string `json:"type"` - PlacementID string `json:"placementId,omitempty"` - EndpointID string `json:"endpointId,omitempty"` -} - -func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { - bidder := &adapter{ - endpoint: config.Endpoint, - } - return bidder, nil -} - -func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - var err error - var adapterRequests []*adapters.RequestData - - reqCopy := *request - for _, imp := range request.Imp { - reqCopy.Imp = []openrtb2.Imp{imp} - - var bidderExt adapters.ExtImpBidder - var nubaExt openrtb_ext.ImpExtNuba - - if err = jsonutil.Unmarshal(reqCopy.Imp[0].Ext, &bidderExt); err != nil { - return nil, []error{err} - } - if err = jsonutil.Unmarshal(bidderExt.Bidder, &nubaExt); err != nil { - return nil, []error{err} - } - - temp := reqBodyExt{NubaBidderExt: reqBodyExtBidder{}} - - if nubaExt.PlacementID != "" { - temp.NubaBidderExt.PlacementID = nubaExt.PlacementID - temp.NubaBidderExt.Type = "publisher" - } else if nubaExt.EndpointID != "" { - temp.NubaBidderExt.EndpointID = nubaExt.EndpointID - temp.NubaBidderExt.Type = "network" - } - - finalyImpExt, err := json.Marshal(temp) - if err != nil { - return nil, []error{err} - } - - reqCopy.Imp[0].Ext = finalyImpExt - - adapterReq, err := a.makeRequest(&reqCopy) - if err != nil { - return nil, []error{err} - } - - if adapterReq != nil { - adapterRequests = append(adapterRequests, adapterReq) - } - } - return adapterRequests, nil -} - -func (a *adapter) makeRequest(request *openrtb2.BidRequest) (*adapters.RequestData, error) { - reqJSON, err := json.Marshal(request) - if err != nil { - return nil, err - } - - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - return &adapters.RequestData{ - Method: "POST", - Uri: a.endpoint, - Body: reqJSON, - Headers: headers, - ImpIDs: openrtb_ext.GetImpIDs(request.Imp), - }, err -} - -func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - if responseData.StatusCode == http.StatusNoContent { - return nil, nil - } - - if responseData.StatusCode != http.StatusOK { - err := &errortypes.BadServerResponse{ - Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode), - } - return nil, []error{err} - } - - var response openrtb2.BidResponse - if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { - return nil, []error{err} - } - - bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - bidResponse.Currency = response.Cur - for _, seatBid := range response.SeatBid { - for i := range seatBid.Bid { - - bidType, err := getMediaTypeForBid(seatBid.Bid[i]) - if err != nil { - fb, fbErr := getMediaTypeForImp(seatBid.Bid[i].ImpID, request.Imp) - if fbErr != nil { - return nil, []error{fbErr} - } - bidType = fb - } - - b := &adapters.TypedBid{ - Bid: &seatBid.Bid[i], - BidType: bidType, - } - bidResponse.Bids = append(bidResponse.Bids, b) - } - } - return bidResponse, nil -} - -func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType, error) { - for _, imp := range imps { - if imp.ID == impID { - if imp.Banner != nil { - return openrtb_ext.BidTypeBanner, nil - } - if imp.Video != nil { - return openrtb_ext.BidTypeVideo, nil - } - if imp.Native != nil { - return openrtb_ext.BidTypeNative, nil - } - } - } - return "", &errortypes.BadInput{ - Message: fmt.Sprintf("Failed to find impression \"%s\"", impID), - } -} - -func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) { - switch bid.MType { - case openrtb2.MarkupBanner: - return openrtb_ext.BidTypeBanner, nil - case openrtb2.MarkupVideo: - return openrtb_ext.BidTypeVideo, nil - case openrtb2.MarkupNative: - return openrtb_ext.BidTypeNative, nil - default: - return "", fmt.Errorf("failed to parse bid mtype (%d) for impression id \"%s\"", bid.MType, bid.ImpID) - } -} diff --git a/adapters/nuba/nuba_test.go b/adapters/nuba/nuba_test.go deleted file mode 100644 index d67f61e3997..00000000000 --- a/adapters/nuba/nuba_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package nuba - -import ( - "testing" - - "github.com/prebid/prebid-server/v3/adapters/adapterstest" - "github.com/prebid/prebid-server/v3/config" - "github.com/prebid/prebid-server/v3/openrtb_ext" -) - -func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderNuba, config.Adapter{ - Endpoint: "http://sa-lb.deliverimp.com/pserver"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "nubatest", bidder) -} diff --git a/adapters/nuba/nubatest/exemplary/endpointId.json b/adapters/nuba/nubatest/exemplary/endpointId.json deleted file mode 100644 index af03e31288d..00000000000 --- a/adapters/nuba/nubatest/exemplary/endpointId.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - }, - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "endpointId": "test" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "endpointId": "test", - "type": "network" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 300, - "h": 250, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ], - "seat": "nuba" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "mtype": 1, - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-banner.json b/adapters/nuba/nubatest/exemplary/simple-banner.json deleted file mode 100644 index 27eea2316a1..00000000000 --- a/adapters/nuba/nubatest/exemplary/simple-banner.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - }, - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 300, - "h": 250, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ], - "seat": "nuba" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 300, - "h": 250, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-native.json b/adapters/nuba/nubatest/exemplary/simple-native.json deleted file mode 100644 index bd9aa745cdb..00000000000 --- a/adapters/nuba/nubatest/exemplary/simple-native.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - }, - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "native": { - "request": "{\"ver\":\"1.1\",\"layout\":1,\"adunit\":2,\"plcmtcnt\":6,\"plcmttype\":4,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":492,\"hmin\":328,\"type\":3,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":4,\"required\":0,\"data\":{\"type\":6}},{\"id\":5,\"required\":0,\"data\":{\"type\":7}},{\"id\":6,\"required\":0,\"data\":{\"type\":1,\"len\":20}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "native": { - "request": "{\"ver\":\"1.1\",\"layout\":1,\"adunit\":2,\"plcmtcnt\":6,\"plcmttype\":4,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":75}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":492,\"hmin\":328,\"type\":3,\"mimes\":[\"image/jpeg\",\"image/jpg\",\"image/png\"]}},{\"id\":4,\"required\":0,\"data\":{\"type\":6}},{\"id\":5,\"required\":0,\"data\":{\"type\":7}},{\"id\":6,\"required\":0,\"data\":{\"type\":1,\"len\":20}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "mtype": 4, - "w": 300, - "h": 250, - "ext": { - "prebid": { - "type": "native" - } - } - } - ], - "seat": "nuba" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 300, - "h": 250, - "mtype": 4, - "ext": { - "prebid": { - "type": "native" - } - } - }, - "type": "native" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-video.json b/adapters/nuba/nubatest/exemplary/simple-video.json deleted file mode 100644 index c1b195300f2..00000000000 --- a/adapters/nuba/nubatest/exemplary/simple-video.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - }, - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "video": { - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 5 - ], - "w": 1024, - "h": 576 - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ] - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "device": { - "ip": "123.123.123.123", - "ua": "iPad" - }, - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "video": { - "mimes": [ - "video/mp4" - ], - "protocols": [ - 2, - 5 - ], - "w": 1024, - "h": 576 - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ] - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "00:01:00", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - } - ], - "seat": "nuba" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "00:01:00", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "mtype": 2, - "ext": { - "prebid": { - "type": "video" - } - } - }, - "type": "video" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/nuba/nubatest/exemplary/simple-web-banner.json b/adapters/nuba/nubatest/exemplary/simple-web-banner.json deleted file mode 100644 index fb7b6518725..00000000000 --- a/adapters/nuba/nubatest/exemplary/simple-web-banner.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ], - "site": { - "id": "1", - "domain": "test.com" - }, - "device": { - "ip": "123.123.123.123", - "ua": "Ubuntu" - } - }, - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "tagid": "test", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "site": { - "id": "1", - "domain": "test.com" - }, - "device": { - "ip": "123.123.123.123", - "ua": "Ubuntu" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 468, - "h": 60, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ], - "seat": "nuba" - } - ], - "cur": "USD" - } - } - } - ], - "expectedBidResponses": [ - { - "bids": [ - { - "bid": { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 468, - "h": 60, - "mtype": 1, - "ext": { - "prebid": { - "type": "banner" - } - } - }, - "type": "banner" - } - ] - } - ] -} \ No newline at end of file diff --git a/adapters/nuba/nubatest/supplemental/bad_media_type.json b/adapters/nuba/nubatest/supplemental/bad_media_type.json deleted file mode 100644 index 71a154157ae..00000000000 --- a/adapters/nuba/nubatest/supplemental/bad_media_type.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "bid": [ - { - "id": "test_bid_id", - "impid": "test-imp-id", - "price": 0.27543, - "adm": "", - "cid": "test_cid", - "crid": "test_crid", - "dealid": "test_dealid", - "w": 300, - "h": 250, - "mtype": 0, - "ext": { - "prebid": { - "type": "banner" - } - } - } - ], - "seat": "nuba" - } - ], - "cur": "USD" - } - } - }], - "expectedMakeBidsErrors": [ - { - "value": "Failed to find impression \"test-imp-id\"", - "comparison": "literal" - } - ] -} diff --git a/adapters/nuba/nubatest/supplemental/bad_response.json b/adapters/nuba/nubatest/supplemental/bad_response.json deleted file mode 100644 index ca81c4cc167..00000000000 --- a/adapters/nuba/nubatest/supplemental/bad_response.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 200, - "body": "" - } - }], - "expectedMakeBidsErrors": [ - { - "value": "expect { or n, but found \"", - "comparison": "literal" - } - ] -} diff --git a/adapters/nuba/nubatest/supplemental/status-204.json b/adapters/nuba/nubatest/supplemental/status-204.json deleted file mode 100644 index 1e99bea063f..00000000000 --- a/adapters/nuba/nubatest/supplemental/status-204.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 204, - "body": {} - } - }], - "expectedBidResponses": [] -} diff --git a/adapters/nuba/nubatest/supplemental/status-not-200.json b/adapters/nuba/nubatest/supplemental/status-not-200.json deleted file mode 100644 index 4b268e6a2d4..00000000000 --- a/adapters/nuba/nubatest/supplemental/status-not-200.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://sa-lb.deliverimp.com/pserver", - "body": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 250 - }, - { - "w": 300, - "h": 600 - } - ] - }, - "ext": { - "bidder": { - "placementId": "test", - "type": "publisher" - } - } - } - ], - "app": { - "id": "1", - "bundle": "com.wls.testwlsapplication" - }, - "device": { - "ip": "123.123.123.123", - "ifa": "sdjfksdf-dfsds-dsdg-dsgg" - } - }, - "impIDs":["test-imp-id"] - }, - "mockResponse": { - "status": 404, - "body": {} - } - }], - "expectedMakeBidsErrors": [ - { - "value": "Unexpected status code: 404. Run with request.debug = 1 for more info.", - "comparison": "literal" - } - ] -} diff --git a/adapters/nuba/params_test.go b/adapters/nuba/params_test.go deleted file mode 100644 index 74b1c700f79..00000000000 --- a/adapters/nuba/params_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package nuba - -import ( - "encoding/json" - "testing" - - "github.com/prebid/prebid-server/v3/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 schema. %v", err) - } - - for _, p := range validParams { - if err := validator.Validate(openrtb_ext.BidderNuba, json.RawMessage(p)); err != nil { - t.Errorf("Schema rejected valid params: %s: %s", p, err) - } - } -} - -func TestInvalidParams(t *testing.T) { - validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") - if err != nil { - t.Fatalf("Failed to fetch the json schema. %v", err) - } - - for _, p := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderNuba, json.RawMessage(p)); err == nil { - t.Errorf("Schema allowed invalid params: %s", p) - } - } -} - -var validParams = []string{ - `{"placementId": "test"}`, - `{"placementId": "1"}`, - `{"endpointId": "test"}`, - `{"endpointId": "1"}`, -} - -var invalidParams = []string{ - `{"placementId": 42}`, - `{"endpointId": 42}`, - `{"placementId": "1", "endpointId": "1"}`, -} diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 675ae42074b..e025eb0ed3c 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -169,7 +169,6 @@ import ( "github.com/prebid/prebid-server/v3/adapters/nextmillennium" "github.com/prebid/prebid-server/v3/adapters/nexx360" "github.com/prebid/prebid-server/v3/adapters/nobid" - "github.com/prebid/prebid-server/v3/adapters/nuba" "github.com/prebid/prebid-server/v3/adapters/ogury" "github.com/prebid/prebid-server/v3/adapters/oms" "github.com/prebid/prebid-server/v3/adapters/onetag" @@ -438,7 +437,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderNextMillennium: nextmillennium.Builder, openrtb_ext.BidderNexx360: nexx360.Builder, openrtb_ext.BidderNoBid: nobid.Builder, - openrtb_ext.BidderNuba: nuba.Builder, openrtb_ext.BidderOgury: ogury.Builder, openrtb_ext.BidderOms: oms.Builder, openrtb_ext.BidderOneTag: onetag.Builder, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index fdf5f828f56..cdb6dcd2c7c 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -187,7 +187,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderNextMillennium, BidderNexx360, BidderNoBid, - BidderNuba, BidderOgury, BidderOms, BidderOneTag, @@ -559,7 +558,6 @@ const ( BidderNativo BidderName = "nativo" BidderNextMillennium BidderName = "nextmillennium" BidderNexx360 BidderName = "nexx360" - BidderNuba BidderName = "nuba" BidderNoBid BidderName = "nobid" BidderOgury BidderName = "ogury" BidderOms BidderName = "oms" diff --git a/openrtb_ext/imp_nuba.go b/openrtb_ext/imp_nuba.go deleted file mode 100644 index 83d7f6a3a52..00000000000 --- a/openrtb_ext/imp_nuba.go +++ /dev/null @@ -1,6 +0,0 @@ -package openrtb_ext - -type ImpExtNuba struct { - PlacementID string `json:"placementId"` - EndpointID string `json:"endpointId"` -} diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml index 18882f458b9..ebf416aab75 100644 --- a/static/bidder-info/nuba.yaml +++ b/static/bidder-info/nuba.yaml @@ -1,16 +1,12 @@ +aliasOf: "teqblaze" endpoint: "http://sa-lb.deliverimp.com/pserver" maintainer: email: "ssp@nuba.io" -gvlVendorID: null -capabilities: - site: - mediaTypes: - - banner - - video - - native - - app: - mediaTypes: - - banner - - video - - native +gvlVendorID: 1473 +userSync: + redirect: + url: "https://cs.screencore.io/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&coppa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" + userMacro: "[UID]" + iframe: + url: "https://cs.screencore.io/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" + userMacro: "[UID]" \ No newline at end of file diff --git a/static/bidder-params/nuba.json b/static/bidder-params/nuba.json deleted file mode 100644 index 2aa65ff8c50..00000000000 --- a/static/bidder-params/nuba.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Nuba Adapter Params", - "description": "A schema which validates params accepted by the Nuba adapter", - "type": "object", - - "properties": { - "placementId": { - "type": "string", - "minLength": 1, - "description": "Placement ID" - }, - "endpointId": { - "type": "string", - "minLength": 1, - "description": "Endpoint ID" - } - }, - "oneOf": [ - { "required": ["placementId"] }, - { "required": ["endpointId"] } - ] -} \ No newline at end of file From c0b10f1706b26076029a792d18840327126aceb8 Mon Sep 17 00:00:00 2001 From: Nuba Date: Fri, 21 Nov 2025 15:27:08 +0200 Subject: [PATCH 4/8] feature/nuba-adapter --- static/bidder-info/nuba.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml index ebf416aab75..8c6761d7fa3 100644 --- a/static/bidder-info/nuba.yaml +++ b/static/bidder-info/nuba.yaml @@ -1,12 +1,4 @@ aliasOf: "teqblaze" endpoint: "http://sa-lb.deliverimp.com/pserver" maintainer: - email: "ssp@nuba.io" -gvlVendorID: 1473 -userSync: - redirect: - url: "https://cs.screencore.io/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&coppa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" - userMacro: "[UID]" - iframe: - url: "https://cs.screencore.io/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}" - userMacro: "[UID]" \ No newline at end of file + email: "ssp@nuba.io" \ No newline at end of file From 371011d5f3fccc8a948f8367405b918a3f1b4acc Mon Sep 17 00:00:00 2001 From: Nuba Date: Fri, 21 Nov 2025 15:32:44 +0200 Subject: [PATCH 5/8] feature/nuba-adapter --- static/bidder-info/nuba.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml index 8c6761d7fa3..52f374956c3 100644 --- a/static/bidder-info/nuba.yaml +++ b/static/bidder-info/nuba.yaml @@ -1,4 +1,4 @@ aliasOf: "teqblaze" -endpoint: "http://sa-lb.deliverimp.com/pserver" +endpoint: "https://ads.nuba.io/openrtb2/auction" maintainer: email: "ssp@nuba.io" \ No newline at end of file From 787da29df02543c038c67ef32c54bfe78a43969f Mon Sep 17 00:00:00 2001 From: Nuba Date: Fri, 21 Nov 2025 15:33:06 +0200 Subject: [PATCH 6/8] feature/nuba-adapter --- static/bidder-info/nuba.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml index 52f374956c3..18d276cd2bf 100644 --- a/static/bidder-info/nuba.yaml +++ b/static/bidder-info/nuba.yaml @@ -1,4 +1,4 @@ aliasOf: "teqblaze" endpoint: "https://ads.nuba.io/openrtb2/auction" maintainer: - email: "ssp@nuba.io" \ No newline at end of file + email: "ssp@nuba.io" From 91b2762ada79e6beefbbbc6941b2bf35cae59fbe Mon Sep 17 00:00:00 2001 From: Nuba Date: Mon, 12 Jan 2026 21:33:07 +0200 Subject: [PATCH 7/8] Nuba Bid Adapter: Update endpoint --- static/bidder-info/nuba.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml index 18d276cd2bf..78834777f47 100644 --- a/static/bidder-info/nuba.yaml +++ b/static/bidder-info/nuba.yaml @@ -1,4 +1,4 @@ aliasOf: "teqblaze" -endpoint: "https://ads.nuba.io/openrtb2/auction" +endpoint: "https://ads.nuba.io/pserver" maintainer: email: "ssp@nuba.io" From 46b22014425d368bfa167813993476e3a9e03d8d Mon Sep 17 00:00:00 2001 From: Nuba Date: Thu, 5 Mar 2026 19:43:12 +0200 Subject: [PATCH 8/8] Update maintainer email --- static/bidder-info/nuba.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/bidder-info/nuba.yaml b/static/bidder-info/nuba.yaml index 78834777f47..803402c68a1 100644 --- a/static/bidder-info/nuba.yaml +++ b/static/bidder-info/nuba.yaml @@ -1,4 +1,4 @@ aliasOf: "teqblaze" endpoint: "https://ads.nuba.io/pserver" maintainer: - email: "ssp@nuba.io" + email: "tech@nuba.io"