From 731894e442419162e3d08f89a40b8de4f0c15d19 Mon Sep 17 00:00:00 2001 From: Rich Audience Date: Fri, 22 Oct 2021 04:47:57 +0200 Subject: [PATCH] New Adapter: RichAudience (#2001) Co-authored-by: sgimenez --- adapters/richaudience/params_test.go | 49 +++++ adapters/richaudience/richaudience.go | 202 ++++++++++++++++++ adapters/richaudience/richaudience_test.go | 161 ++++++++++++++ .../exemplary/single-banner-app.json | 122 +++++++++++ .../single-banner-defaultCurrency.json | 129 +++++++++++ .../exemplary/single-banner-deviceConfig.json | 132 ++++++++++++ .../exemplary/single-banner-extUser.json | 162 ++++++++++++++ .../exemplary/single-banner-floorPrice.json | 132 ++++++++++++ .../exemplary/single-banner-iPv6.json | 130 +++++++++++ .../exemplary/single-banner-nosecure.json | 130 +++++++++++ .../exemplary/single-banner-setCurrency.json | 131 ++++++++++++ .../exemplary/single-banner-sitePage.json | 130 +++++++++++ .../exemplary/single-banner.json | 130 +++++++++++ .../supplemental/formatNotFound.json | 39 ++++ .../supplemental/invalidParams.json | 38 ++++ .../supplemental/noIPDevice.json | 42 ++++ .../supplemental/notFoundParams.json | 36 ++++ .../supplemental/responseBlank.json | 90 ++++++++ .../supplemental/statusCode400.json | 93 ++++++++ .../supplemental/statusCodeError.json | 93 ++++++++ .../supplemental/unexpectedStatusCode.json | 93 ++++++++ config/config.go | 1 + exchange/adapter_builders.go | 4 +- exchange/bidder.go | 1 + openrtb_ext/bidders.go | 2 + openrtb_ext/imp_richaudience.go | 9 + static/bidder-info/richaudience.yaml | 15 ++ static/bidder-params/richaudience.json | 31 +++ 28 files changed, 2326 insertions(+), 1 deletion(-) create mode 100644 adapters/richaudience/params_test.go create mode 100644 adapters/richaudience/richaudience.go create mode 100644 adapters/richaudience/richaudience_test.go create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-app.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-defaultCurrency.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-deviceConfig.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-extUser.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-floorPrice.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-nosecure.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-setCurrency.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner-sitePage.json create mode 100644 adapters/richaudience/richaudiencetest/exemplary/single-banner.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/invalidParams.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/notFoundParams.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/responseBlank.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/statusCode400.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/statusCodeError.json create mode 100644 adapters/richaudience/richaudiencetest/supplemental/unexpectedStatusCode.json create mode 100644 openrtb_ext/imp_richaudience.go create mode 100644 static/bidder-info/richaudience.yaml create mode 100644 static/bidder-params/richaudience.json diff --git a/adapters/richaudience/params_test.go b/adapters/richaudience/params_test.go new file mode 100644 index 00000000000..038936f3cbf --- /dev/null +++ b/adapters/richaudience/params_test.go @@ -0,0 +1,49 @@ +package richaudience + +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 schema. %v", err) + } + + for _, p := range validParams { + if err := validator.Validate(openrtb_ext.BidderRichaudience, 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.BidderRichaudience, json.RawMessage(p)); err == nil { + t.Errorf("Schema allowed invalid params: %s", p) + } + } +} + +var validParams = []string{ + `{"pid":"hash", "supplyType":"site"}`, + `{"pid":"hash", "supplyType":"site", "test": true}`, +} + +var invalidParams = []string{ + `{"pid": 42}`, + `{"pid": "", "supplyType":0}`, + `{"pid": 11, "supplyType":"site"}`, + `{"pid": "hash", "supplyType":11}`, + `{"pid": "hash"}`, + `{"supplyType":"site"}`, + `{}`, +} diff --git a/adapters/richaudience/richaudience.go b/adapters/richaudience/richaudience.go new file mode 100644 index 00000000000..333df56408b --- /dev/null +++ b/adapters/richaudience/richaudience.go @@ -0,0 +1,202 @@ +package richaudience + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "github.com/mxmCherry/openrtb/v15/openrtb2" + "github.com/prebid/prebid-server/adapters" + "github.com/prebid/prebid-server/config" + "github.com/prebid/prebid-server/errortypes" + "github.com/prebid/prebid-server/openrtb_ext" +) + +type adapter struct { + endpoint string +} + +// Builder builds a new instance of the RichAudience adapter for the given bidder with the given config. +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + } + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + raiHeaders := http.Header{} + + setHeaders(&raiHeaders) + + isUrlSecure := getIsUrlSecure(request) + + resImps, err := setImp(request, isUrlSecure) + if err != nil { + return nil, []error{err} + } + + request.Imp = resImps + + if err = validateDevice(request); err != nil { + return nil, []error{err} + } + + req, err := json.Marshal(request) + if err != nil { + return nil, []error{err} + } + + requestData := &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: req, + Headers: raiHeaders, + } + + return []*adapters.RequestData{requestData}, nil +} + +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.StatusBadRequest { + err := &errortypes.BadInput{ + Message: "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", + } + return nil, []error{err} + } + + 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 bidResp openrtb2.BidResponse + if err := json.Unmarshal(responseData.Body, &bidResp); err != nil { + + return nil, []error{&errortypes.BadServerResponse{ + Message: err.Error(), + }} + } + + var response openrtb2.BidResponse + if err := json.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 { + b := &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: openrtb_ext.BidTypeBanner, + } + bidResponse.Bids = append(bidResponse.Bids, b) + } + } + + return bidResponse, nil +} + +func setHeaders(raiHeaders *http.Header) { + raiHeaders.Set("Content-Type", "application/json;charset=utf-8") + raiHeaders.Set("Accept", "application/json") + raiHeaders.Add("X-Openrtb-Version", "2.5") +} + +func setImp(request *openrtb2.BidRequest, isUrlSecure bool) (resImps []openrtb2.Imp, err error) { + for _, imp := range request.Imp { + var secure = int8(0) + raiExt, errImp := parseImpExt(&imp) + if errImp != nil { + return nil, errImp + } + + if raiExt != nil { + if raiExt.Pid != "" { + imp.TagID = raiExt.Pid + } + + if raiExt.Test { + request.Test = int8(1) + } + + if raiExt.BidFloorCur != "" { + imp.BidFloorCur = raiExt.BidFloorCur + } else if imp.BidFloorCur == "" { + imp.BidFloorCur = "USD" + } + } + if isUrlSecure { + secure = int8(1) + } + + imp.Secure = &secure + + if imp.Banner.W == nil && imp.Banner.H == nil { + if len(imp.Banner.Format) == 0 { + err = &errortypes.BadInput{ + Message: "request.Banner.Format is required", + } + return nil, err + } + } + + resImps = append(resImps, imp) + + } + return resImps, nil +} + +func getIsUrlSecure(request *openrtb2.BidRequest) (isUrlSecure bool) { + if request.Site != nil { + if request.Site.Page != "" { + pageURL, err := url.Parse(request.Site.Page) + if err == nil { + if request.Site.Domain == "" { + request.Site.Domain = pageURL.Host + } + isUrlSecure = pageURL.Scheme == "https" + } + } + } + return +} + +func validateDevice(request *openrtb2.BidRequest) (err error) { + + if request.Device != nil && request.Device.IP == "" && request.Device.IPv6 == "" { + err = &errortypes.BadInput{ + Message: "request.Device.IP is required", + } + return err + } + return err +} + +func parseImpExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpRichaudience, error) { + var bidderExt adapters.ExtImpBidder + if err := json.Unmarshal(imp.Ext, &bidderExt); err != nil { + err = &errortypes.BadInput{ + Message: fmt.Sprintf("not found parameters ext in ImpID : %s", imp.ID), + } + return nil, err + } + + var richaudienceExt openrtb_ext.ExtImpRichaudience + if err := json.Unmarshal(bidderExt.Bidder, &richaudienceExt); err != nil { + err = &errortypes.BadInput{ + Message: fmt.Sprintf("invalid parameters ext in ImpID: %s", imp.ID), + } + return nil, err + } + + return &richaudienceExt, nil +} diff --git a/adapters/richaudience/richaudience_test.go b/adapters/richaudience/richaudience_test.go new file mode 100644 index 00000000000..b1655a4d1d6 --- /dev/null +++ b/adapters/richaudience/richaudience_test.go @@ -0,0 +1,161 @@ +package richaudience + +import ( + "net/http" + "testing" + + "github.com/mxmCherry/openrtb/v15/openrtb2" + "github.com/prebid/prebid-server/adapters" + "github.com/prebid/prebid-server/adapters/adapterstest" + "github.com/prebid/prebid-server/config" + "github.com/prebid/prebid-server/openrtb_ext" + "github.com/stretchr/testify/assert" +) + +type richaudienceRequest struct { + ID string `json:"id,omitempty"` + Imp []openrtb2.Imp `json:"imp,omitempty"` + User richaudienceUser `json:"user,omitempty"` + Device richaudienceDevice `json:"device,omitempty"` + Site richaudienceSite `json:"site,omitempty"` + Test int8 `json:"test,omitempty"` +} + +type richaudienceUser struct { + BuyerUID string `json:"buyeruid,omitempty"` + Ext richaudienceUserExt `json:"ext,omitempty"` +} + +type richaudienceUserExt struct { + Eids []openrtb_ext.ExtUserEid `json:"eids,omitempty"` + Consent string `json:"consent,omitempty"` +} + +type richaudienceDevice struct { + IP string `json:"ip,omitempty"` + IPv6 string `json:"ipv6,omitempty"` + Lmt int8 `json:"lmt,omitempty"` + DNT int8 `json:"dnt,omitempty"` + UA string `json:"ua,omitempty"` +} + +type richaudienceSite struct { + Domain string `json:"domain,omitempty"` + Page string `json:"page,omitempty"` +} + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderRichaudience, config.Adapter{ + Endpoint: "http://ortb.richaudience.com/ortb/?bidder=pbs", + }) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "richaudiencetest", bidder) +} + +func TestGetBuilder(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderRichaudience, config.Adapter{ + Endpoint: "http://ortb.richaudience.com/ortb/?bidder=pbs"}) + + if buildErr != nil { + t.Errorf("error %s", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "richaudience", bidder) +} + +func TestGetSite(t *testing.T) { + raBidRequest := &openrtb2.BidRequest{ + Site: &openrtb2.Site{ + Domain: "www.test.com", + }, + } + + richaudienceRequestTest := &richaudienceRequest{ + Site: richaudienceSite{ + Domain: "www.test.com", + }, + } + + getIsUrlSecure(raBidRequest) + + if raBidRequest.Site.Domain != richaudienceRequestTest.Site.Domain { + t.Errorf("error %s", richaudienceRequestTest.Site.Domain) + } + + raBidRequest = &openrtb2.BidRequest{ + Site: &openrtb2.Site{ + Page: "http://www.test.com/test", + Domain: "", + }, + } + + richaudienceRequestTest = &richaudienceRequest{ + Site: richaudienceSite{ + Domain: "", + }, + } + + getIsUrlSecure(raBidRequest) +} + +func TestGetDevice(t *testing.T) { + + raBidRequest := &openrtb2.BidRequest{ + Device: &openrtb2.Device{ + IP: "11.222.33.44", + UA: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", + }, + } + + richaudienceRequestTest := &richaudienceRequest{ + Device: richaudienceDevice{ + IP: "11.222.33.44", + Lmt: 0, + DNT: 0, + UA: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", + }, + } + + validateDevice(raBidRequest) + + if raBidRequest.Device.IP != richaudienceRequestTest.Device.IP { + t.Errorf("error %s", richaudienceRequestTest.Device.IP) + } + + if richaudienceRequestTest.Device.Lmt == 1 { + t.Errorf("error %v", richaudienceRequestTest.Device.Lmt) + } + + if richaudienceRequestTest.Device.DNT == 1 { + t.Errorf("error %v", richaudienceRequestTest.Device.DNT) + } + + if raBidRequest.Device.UA != richaudienceRequestTest.Device.UA { + t.Errorf("error %s", richaudienceRequestTest.Device.UA) + } +} + +func TestResponseEmpty(t *testing.T) { + httpResp := &adapters.ResponseData{ + StatusCode: http.StatusNoContent, + } + bidder := new(adapter) + bidResponse, errs := bidder.MakeBids(nil, nil, httpResp) + + assert.Nil(t, bidResponse, "Expected Nil") + assert.Empty(t, errs, "Errors: %d", len(errs)) +} + +func TestEmptyConfig(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderRichaudience, config.Adapter{ + Endpoint: ``, + ExtraAdapterInfo: ``, + }) + + assert.NoError(t, buildErr) + assert.Empty(t, bidder) +} diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-app.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-app.json new file mode 100644 index 00000000000..430e1a27f02 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-app.json @@ -0,0 +1,122 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "device": { + "ip": "11.222.33.44", + "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 0, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "device": { + "ip": "11.222.33.44", + "ifa": "zxcjbzxmc-zxcbmz-zxbcz-zxczx" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-defaultCurrency.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-defaultCurrency.json new file mode 100644 index 00000000000..a6ebe54e95b --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-defaultCurrency.json @@ -0,0 +1,129 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-deviceConfig.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-deviceConfig.json new file mode 100644 index 00000000000..8b21864c63f --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-deviceConfig.json @@ -0,0 +1,132 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "dnt": 1, + "lmt": 1, + "ip": "11.222.33.44" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "dnt": 1, + "lmt": 1, + "ip": "11.222.33.44" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-extUser.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-extUser.json new file mode 100644 index 00000000000..72f5387dcf4 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-extUser.json @@ -0,0 +1,162 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + "eids": [ + { + "source": "id5-sync.com", + "uids": [ + { + "id": "ID5-ZHMOC5mEw0TZiThiUevdyq0gjh7Egh3A4p4i9XGP-w!ID5*NAbWTGXXH8AqlxI7DB9w3qTju41wihkerqwFIZs_FPgAABOqmcXN5sfliX2kQ4Ku", + "atype": 1, + "ext": { + "linkType": 2, + "abTestingControlGroup": false + } + } + ] + } + ], + "consent": "CPItQrlPItQrlAKAfAENBhCsAP_AAHLAAAiQIBtf_X__bX9j" + } + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + "consent": "CPItQrlPItQrlAKAfAENBhCsAP_AAHLAAAiQIBtf_X__bX9j", + "eids": [ + { + "source": "id5-sync.com", + "uids": [ + { + "id": "ID5-ZHMOC5mEw0TZiThiUevdyq0gjh7Egh3A4p4i9XGP-w!ID5*NAbWTGXXH8AqlxI7DB9w3qTju41wihkerqwFIZs_FPgAABOqmcXN5sfliX2kQ4Ku", + "atype": 1, + "ext": { + "linkType": 2, + "abTestingControlGroup": false + } + } + ] + } + ] + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-floorPrice.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-floorPrice.json new file mode 100644 index 00000000000..3dcc0f94db9 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-floorPrice.json @@ -0,0 +1,132 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true, + "BidFloor": 1.5 + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true, + "BidFloor": 1.5 + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json new file mode 100644 index 00000000000..f2162ed598b --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-iPv6.json @@ -0,0 +1,130 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ipv6": "2607:fb90:f27:4512:d800:cb23:a603:e245", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ipv6": "2607:fb90:f27:4512:d800:cb23:a603:e245", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-nosecure.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-nosecure.json new file mode 100644 index 00000000000..ffd92960718 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-nosecure.json @@ -0,0 +1,130 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "http://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 0, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "http://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-setCurrency.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-setCurrency.json new file mode 100644 index 00000000000..1d970605444 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-setCurrency.json @@ -0,0 +1,131 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true, + "bidfloorcur": "EUR" + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "EUR", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true, + "bidfloorcur": "EUR" + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "EUR", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner-sitePage.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner-sitePage.json new file mode 100644 index 00000000000..a1634235060 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner-sitePage.json @@ -0,0 +1,130 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/exemplary/single-banner.json b/adapters/richaudience/richaudiencetest/exemplary/single-banner.json new file mode 100644 index 00000000000..a1634235060 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/exemplary/single-banner.json @@ -0,0 +1,130 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"], + "X-Openrtb-Version": ["2.5"] + }, + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 1, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "ff935bea-4661-40bf-95b7-80c354cf0cdc", + "seatbid": [{ + "bid": [{ + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "crid": "999999", + "adm": "", + "adomain": ["richaudience.com"], + "h": 250, + "w": 300 + }] + }] + } + } + } + ], + + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "47286888", + "impid": "div-gpt-ad-1460505748561-0", + "price": 99, + "adm": "", + "adomain": ["richaudience.com"], + "crid": "999999", + "w": 300, + "h": 250 + }, + "type": "banner" + } + ] + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json b/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json new file mode 100644 index 00000000000..01fbd4184c5 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/formatNotFound.json @@ -0,0 +1,39 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "", + "ext": {} + } + }, + + "expectedMakeRequestsErrors": [{ + "value": "request.Banner.Format is required", + "comparison": "literal" + }] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/invalidParams.json b/adapters/richaudience/richaudiencetest/supplemental/invalidParams.json new file mode 100644 index 00000000000..2c727621101 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/invalidParams.json @@ -0,0 +1,38 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "expectedMakeRequestsErrors": [{ + "value": "invalid parameters ext in ImpID: div-gpt-ad-1460505748561-0", + "comparison": "literal" + }] +} \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json b/adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json new file mode 100644 index 00000000000..72148a7b376 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/noIPDevice.json @@ -0,0 +1,42 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": true + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "", + "ext": {} + } + }, + + "expectedMakeRequestsErrors": [{ + "value": "request.Device.IP is required", + "comparison": "literal" + }] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/notFoundParams.json b/adapters/richaudience/richaudiencetest/supplemental/notFoundParams.json new file mode 100644 index 00000000000..7b1cac83c54 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/notFoundParams.json @@ -0,0 +1,36 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "test": 0, + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD" + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "expectedMakeRequestsErrors": [{ + "value": "not found parameters ext in ImpID : div-gpt-ad-1460505748561-0", + "comparison": "literal" + }] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/responseBlank.json b/adapters/richaudience/richaudiencetest/supplemental/responseBlank.json new file mode 100644 index 00000000000..d8f53b9f027 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/responseBlank.json @@ -0,0 +1,90 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 204, + "body": { + + } + } + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/statusCode400.json b/adapters/richaudience/richaudiencetest/supplemental/statusCode400.json new file mode 100644 index 00000000000..8d67723c856 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/statusCode400.json @@ -0,0 +1,93 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 400 + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", + "comparison": "literal" + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/statusCodeError.json b/adapters/richaudience/richaudiencetest/supplemental/statusCodeError.json new file mode 100644 index 00000000000..5fd05c12e6a --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/statusCodeError.json @@ -0,0 +1,93 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "secure": 1, + "tagid" : "OsNsyeF68q", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 502 + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 502. Run with request.debug = 1 for more info.", + "comparison": "literal" + } + ] + } \ No newline at end of file diff --git a/adapters/richaudience/richaudiencetest/supplemental/unexpectedStatusCode.json b/adapters/richaudience/richaudiencetest/supplemental/unexpectedStatusCode.json new file mode 100644 index 00000000000..ba66f0b6c28 --- /dev/null +++ b/adapters/richaudience/richaudiencetest/supplemental/unexpectedStatusCode.json @@ -0,0 +1,93 @@ +{ + "mockBidRequest": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": {} + } + }, + + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://ortb.richaudience.com/ortb/?bidder=pbs", + "body": { + "id": "4d3f84eb-787b-42fb-a0cf-062690dadce3", + "imp": [ + { + "id": "div-gpt-ad-1460505748561-0", + "tagid" : "OsNsyeF68q", + "secure": 1, + "banner": { + "format" : [{ + "w": 300, + "h": 250 + }] + }, + "bidfloor": 1e-05, + "bidfloorcur": "USD", + "ext": { + "bidder": { + "pid": "OsNsyeF68q", + "supplyType": "site", + "test": false + } + } + } + ], + "site": { + "domain": "bridge.richmediastudio.com", + "page": "https://bridge.richmediastudio.com//ab083674fb8200b877a6983126e4477d/PrebidServer/indexRa.html?pbjs_debug=true" + }, + "device": { + "ip": "11.222.33.44", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + }, + "user": { + "buyeruid": "189f4055-78a3-46eb-b7fd-0915a1a43bd2a", + "ext": { + + } + } + } + }, + "mockResponse": { + "status": 800 + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 800. Run with request.debug = 1 for more info.", + "comparison": "literal" + } + ] + } \ No newline at end of file diff --git a/config/config.go b/config/config.go index 128b005af76..cdbaeab7fb0 100644 --- a/config/config.go +++ b/config/config.go @@ -861,6 +861,7 @@ func SetupViper(v *viper.Viper, filename string) { v.SetDefault("adapters.revcontent.disabled", true) v.SetDefault("adapters.revcontent.endpoint", "https://trends.revcontent.com/rtb") v.SetDefault("adapters.rhythmone.endpoint", "http://tag.1rx.io/rmp") + v.SetDefault("adapters.richaudience.endpoint", "http://ortb.richaudience.com/ortb/?bidder=pbs") v.SetDefault("adapters.rtbhouse.endpoint", "http://prebidserver-s2s-ams.creativecdn.com/bidder/prebidserver/bids") v.SetDefault("adapters.rubicon.disabled", true) v.SetDefault("adapters.rubicon.endpoint", "http://exapi-us-east.rubiconproject.com/a/api/exchange.json") diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index f34e74ea41b..10a45b99fae 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -2,7 +2,7 @@ package exchange import ( "github.com/prebid/prebid-server/adapters" - ttx "github.com/prebid/prebid-server/adapters/33across" + "github.com/prebid/prebid-server/adapters/33across" "github.com/prebid/prebid-server/adapters/aceex" "github.com/prebid/prebid-server/adapters/acuityads" "github.com/prebid/prebid-server/adapters/adagio" @@ -97,6 +97,7 @@ import ( "github.com/prebid/prebid-server/adapters/pulsepoint" "github.com/prebid/prebid-server/adapters/revcontent" "github.com/prebid/prebid-server/adapters/rhythmone" + "github.com/prebid/prebid-server/adapters/richaudience" "github.com/prebid/prebid-server/adapters/rtbhouse" "github.com/prebid/prebid-server/adapters/rubicon" salunamedia "github.com/prebid/prebid-server/adapters/sa_lunamedia" @@ -233,6 +234,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderPulsepoint: pulsepoint.Builder, openrtb_ext.BidderRevcontent: revcontent.Builder, openrtb_ext.BidderRhythmone: rhythmone.Builder, + openrtb_ext.BidderRichaudience: richaudience.Builder, openrtb_ext.BidderRTBHouse: rtbhouse.Builder, openrtb_ext.BidderRubicon: rubicon.Builder, openrtb_ext.BidderSharethrough: sharethrough.Builder, diff --git a/exchange/bidder.go b/exchange/bidder.go index 0bdaa648619..2aae63e21b8 100644 --- a/exchange/bidder.go +++ b/exchange/bidder.go @@ -130,6 +130,7 @@ type bidderAdapterConfig struct { } func (bidder *bidderAdapter) requestBid(ctx context.Context, request *openrtb2.BidRequest, name openrtb_ext.BidderName, bidAdjustment float64, conversions currency.Conversions, reqInfo *adapters.ExtraRequestInfo, accountDebugAllowed, headerDebugAllowed bool) (*pbsOrtbSeatBid, []error) { + reqData, errs := bidder.Bidder.MakeRequests(request, reqInfo) if len(reqData) == 0 { diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 14a261e314e..427ff6f45b5 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -168,6 +168,7 @@ const ( BidderPulsepoint BidderName = "pulsepoint" BidderRevcontent BidderName = "revcontent" BidderRhythmone BidderName = "rhythmone" + BidderRichaudience BidderName = "richaudience" BidderRTBHouse BidderName = "rtbhouse" BidderRubicon BidderName = "rubicon" BidderSharethrough BidderName = "sharethrough" @@ -304,6 +305,7 @@ func CoreBidderNames() []BidderName { BidderPulsepoint, BidderRevcontent, BidderRhythmone, + BidderRichaudience, BidderRTBHouse, BidderRubicon, BidderSharethrough, diff --git a/openrtb_ext/imp_richaudience.go b/openrtb_ext/imp_richaudience.go new file mode 100644 index 00000000000..bdcf7a96db9 --- /dev/null +++ b/openrtb_ext/imp_richaudience.go @@ -0,0 +1,9 @@ +package openrtb_ext + +type ExtImpRichaudience struct { + Pid string `json:"pid"` + SupplyType string `json:"supplyType"` + BidFloor float64 `json:"bidfloor"` + BidFloorCur string `json:"bidfloorcur"` + Test bool `json:"test"` +} diff --git a/static/bidder-info/richaudience.yaml b/static/bidder-info/richaudience.yaml new file mode 100644 index 00000000000..6b51aaa86e3 --- /dev/null +++ b/static/bidder-info/richaudience.yaml @@ -0,0 +1,15 @@ +maintainer: + email: partnerintegrations@richaudience.com +gvlVendorID: 108 +modifyingVastXmlAllowed: true +capabilities: + site: + mediaTypes: + - banner + app: + mediaTypes: + - banner +userSync: + iframe: + url: "https://sync.richaudience.com/74889303289e27f327ad0c6de7be7264/?consentString={{.GDPRConsent}}&r={{.RedirectURL}}" + userMacro: "[PDID]" diff --git a/static/bidder-params/richaudience.json b/static/bidder-params/richaudience.json new file mode 100644 index 00000000000..e10dc59bb30 --- /dev/null +++ b/static/bidder-params/richaudience.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "richaudience Adapter Params", + "description": "A schema which validates params accepted by the richaudience adapter", + "type": "object", + + "properties": { + "pid": { + "type": "string", + "description": "Placement ID" + }, + "supplyType": { + "type": "string", + "description": "Type integration" + }, + "test": { + "type": "boolean", + "description": "TestMode" + }, + "bidFloor": { + "type": "number", + "description": "floor price" + }, + "bidFloorCur": { + "type": "string", + "description": "currency floor price" + } + }, + + "required": ["pid", "supplyType"] +}