From 230213dceac479e5fb785af6e9d3bb3ac2c5a5d5 Mon Sep 17 00:00:00 2001 From: radubarbos Date: Wed, 5 Jul 2023 12:01:18 +0300 Subject: [PATCH] YahooAdvertising rebranding to Yahoo Ads. (#2872) Co-authored-by: oath-jac --- .../params_test.go | 16 ++++++++-------- .../yahooAds.go} | 12 ++++++------ .../yahooAds_test.go} | 14 +++++++------- .../exemplary/simple-app-banner.json | 2 +- .../exemplary/simple-banner.json | 2 +- .../yahooAdstest}/exemplary/simple-video.json | 2 +- .../supplemental/empty-banner-format.json | 0 .../supplemental/invalid-banner-height.json | 0 .../supplemental/invalid-banner-width.json | 0 .../non-supported-requests-bids-ignored.json | 2 +- .../supplemental/required-nobidder-info.json | 0 .../supplemental/server-error.json | 0 .../server-response-wrong-impid.json | 2 +- .../simple-banner-gpp-overwrite.json | 2 +- .../supplemental/simple-banner-gpp.json | 2 +- ...nner-ignore-width-when-height-missing.json | 2 +- exchange/adapter_builders.go | 7 ++++--- exchange/adapter_util.go | 2 +- exchange/adapter_util_test.go | 8 ++++---- openrtb_ext/bidders.go | 2 ++ openrtb_ext/bidders_validate_test.go | 2 +- openrtb_ext/imp_yahooAds.go | 7 +++++++ static/bidder-info/yahooAds.yaml | 18 ++++++++++++++++++ static/bidder-params/yahooAds.json | 19 +++++++++++++++++++ 24 files changed, 85 insertions(+), 38 deletions(-) rename adapters/{yahooAdvertising => yahooAds}/params_test.go (63%) rename adapters/{yahooAdvertising/yahooAdvertising.go => yahooAds/yahooAds.go} (93%) rename adapters/{yahooAdvertising/yahooAdvertising_test.go => yahooAds/yahooAds_test.go} (51%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/exemplary/simple-app-banner.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/exemplary/simple-banner.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/exemplary/simple-video.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/empty-banner-format.json (100%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/invalid-banner-height.json (100%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/invalid-banner-width.json (100%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/non-supported-requests-bids-ignored.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/required-nobidder-info.json (100%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/server-error.json (100%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/server-response-wrong-impid.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/simple-banner-gpp-overwrite.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/simple-banner-gpp.json (98%) rename adapters/{yahooAdvertising/yahooAdvertisingtest => yahooAds/yahooAdstest}/supplemental/simple-banner-ignore-width-when-height-missing.json (98%) create mode 100644 openrtb_ext/imp_yahooAds.go create mode 100644 static/bidder-info/yahooAds.yaml create mode 100644 static/bidder-params/yahooAds.json diff --git a/adapters/yahooAdvertising/params_test.go b/adapters/yahooAds/params_test.go similarity index 63% rename from adapters/yahooAdvertising/params_test.go rename to adapters/yahooAds/params_test.go index 10d504cb291..c0deaaa32c9 100644 --- a/adapters/yahooAdvertising/params_test.go +++ b/adapters/yahooAds/params_test.go @@ -1,4 +1,4 @@ -package yahooAdvertising +package yahooAds import ( "encoding/json" @@ -7,11 +7,11 @@ import ( "github.com/prebid/prebid-server/openrtb_ext" ) -// This file actually intends to test static/bidder-params/yahooAdvertising.json +// This file actually intends to test static/bidder-params/yahooAds.json // -// These also validate the format of the external API: request.imp[i].ext.yahooAdvertising +// These also validate the format of the external API: request.imp[i].ext.yahooAds -// TestValidParams makes sure that the yahooAdvertising schema accepts all imp.ext fields which we intend to support. +// TestValidParams makes sure that the yahooAds schema accepts all imp.ext fields which we intend to support. func TestValidParams(t *testing.T) { validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") if err != nil { @@ -19,13 +19,13 @@ func TestValidParams(t *testing.T) { } for _, validParam := range validParams { - if err := validator.Validate(openrtb_ext.BidderYahooAdvertising, json.RawMessage(validParam)); err != nil { - t.Errorf("Schema rejected yahooAdvertising params: %s", validParam) + if err := validator.Validate(openrtb_ext.BidderYahooAds, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected yahooAds params: %s", validParam) } } } -// TestInvalidParams makes sure that the yahooAdvertising schema rejects all the imp.ext fields we don't support. +// TestInvalidParams makes sure that the yahooAds schema rejects all the imp.ext fields we don't support. func TestInvalidParams(t *testing.T) { validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") if err != nil { @@ -33,7 +33,7 @@ func TestInvalidParams(t *testing.T) { } for _, invalidParam := range invalidParams { - if err := validator.Validate(openrtb_ext.BidderYahooAdvertising, json.RawMessage(invalidParam)); err == nil { + if err := validator.Validate(openrtb_ext.BidderYahooAds, json.RawMessage(invalidParam)); err == nil { t.Errorf("Schema allowed unexpected params: %s", invalidParam) } } diff --git a/adapters/yahooAdvertising/yahooAdvertising.go b/adapters/yahooAds/yahooAds.go similarity index 93% rename from adapters/yahooAdvertising/yahooAdvertising.go rename to adapters/yahooAds/yahooAds.go index d476adb4e8e..3597d0e359c 100644 --- a/adapters/yahooAdvertising/yahooAdvertising.go +++ b/adapters/yahooAds/yahooAds.go @@ -1,4 +1,4 @@ -package yahooAdvertising +package yahooAds import ( "encoding/json" @@ -41,8 +41,8 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E continue } - var yahooAdvertisingExt openrtb_ext.ExtImpYahooAdvertising - err = json.Unmarshal(bidderExt.Bidder, &yahooAdvertisingExt) + var yahooAdsExt openrtb_ext.ExtImpYahooAds + err = json.Unmarshal(bidderExt.Bidder, &yahooAdsExt) if err != nil { err = &errortypes.BadInput{ Message: fmt.Sprintf("imp #%d: %s", idx, err.Error()), @@ -64,7 +64,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E reqCopy.App = &appCopy } - if err := changeRequestForBidService(&reqCopy, &yahooAdvertisingExt); err != nil { + if err := changeRequestForBidService(&reqCopy, &yahooAdsExt); err != nil { errors = append(errors, err) continue } @@ -150,7 +150,7 @@ func getImpInfo(impId string, imps []openrtb2.Imp) (bool, openrtb_ext.BidType) { return exists, mediaType } -func changeRequestForBidService(request *openrtb2.BidRequest, extension *openrtb_ext.ExtImpYahooAdvertising) error { +func changeRequestForBidService(request *openrtb2.BidRequest, extension *openrtb_ext.ExtImpYahooAds) error { /* Always override the tag ID and (site ID or app ID) of the request */ request.Imp[0].TagID = extension.Pos if request.Site != nil { @@ -218,7 +218,7 @@ func validateBanner(banner *openrtb2.Banner) error { return nil } -// Builder builds a new instance of the YahooAdvertising adapter for the given bidder with the given config. +// Builder builds a new instance of the YahooAds adapter for the given bidder with the given config. func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { bidder := &adapter{ URI: config.Endpoint, diff --git a/adapters/yahooAdvertising/yahooAdvertising_test.go b/adapters/yahooAds/yahooAds_test.go similarity index 51% rename from adapters/yahooAdvertising/yahooAdvertising_test.go rename to adapters/yahooAds/yahooAds_test.go index e701c3335c1..924eabd5ec1 100644 --- a/adapters/yahooAdvertising/yahooAdvertising_test.go +++ b/adapters/yahooAds/yahooAds_test.go @@ -1,4 +1,4 @@ -package yahooAdvertising +package yahooAds import ( "testing" @@ -10,8 +10,8 @@ import ( "github.com/prebid/prebid-server/openrtb_ext" ) -func TestYahooAdvertisingBidderEndpointConfig(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderYahooAdvertising, config.Adapter{ +func TestYahooAdsBidderEndpointConfig(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderYahooAds, config.Adapter{ Endpoint: "http://localhost/bid", }, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) @@ -19,17 +19,17 @@ func TestYahooAdvertisingBidderEndpointConfig(t *testing.T) { t.Fatalf("Builder returned unexpected error %v", buildErr) } - bidderYahooAdvertising := bidder.(*adapter) + bidderYahooAds := bidder.(*adapter) - assert.Equal(t, "http://localhost/bid", bidderYahooAdvertising.URI) + assert.Equal(t, "http://localhost/bid", bidderYahooAds.URI) } func TestJsonSamples(t *testing.T) { - bidder, buildErr := Builder(openrtb_ext.BidderYahooAdvertising, config.Adapter{}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + bidder, buildErr := Builder(openrtb_ext.BidderYahooAds, config.Adapter{}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) if buildErr != nil { t.Fatalf("Builder returned unexpected error %v", buildErr) } - adapterstest.RunJSONBidderTest(t, "yahooAdvertisingtest", bidder) + adapterstest.RunJSONBidderTest(t, "yahooAdstest", bidder) } diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-app-banner.json b/adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-app-banner.json rename to adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json index d5e77c71d3d..7ad41161915 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-app-banner.json +++ b/adapters/yahooAds/yahooAdstest/exemplary/simple-app-banner.json @@ -77,7 +77,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-banner.json b/adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-banner.json rename to adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json index d08bdf06019..7036664d4ad 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-banner.json +++ b/adapters/yahooAds/yahooAdstest/exemplary/simple-banner.json @@ -77,7 +77,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-video.json b/adapters/yahooAds/yahooAdstest/exemplary/simple-video.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-video.json rename to adapters/yahooAds/yahooAdstest/exemplary/simple-video.json index ea95ec40306..ebf7af93d53 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/exemplary/simple-video.json +++ b/adapters/yahooAds/yahooAdstest/exemplary/simple-video.json @@ -92,7 +92,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/empty-banner-format.json b/adapters/yahooAds/yahooAdstest/supplemental/empty-banner-format.json similarity index 100% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/empty-banner-format.json rename to adapters/yahooAds/yahooAdstest/supplemental/empty-banner-format.json diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/invalid-banner-height.json b/adapters/yahooAds/yahooAdstest/supplemental/invalid-banner-height.json similarity index 100% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/invalid-banner-height.json rename to adapters/yahooAds/yahooAdstest/supplemental/invalid-banner-height.json diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/invalid-banner-width.json b/adapters/yahooAds/yahooAdstest/supplemental/invalid-banner-width.json similarity index 100% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/invalid-banner-width.json rename to adapters/yahooAds/yahooAdstest/supplemental/invalid-banner-width.json diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/non-supported-requests-bids-ignored.json b/adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/non-supported-requests-bids-ignored.json rename to adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json index a44020daf3f..c0d77fa496b 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/non-supported-requests-bids-ignored.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/non-supported-requests-bids-ignored.json @@ -74,7 +74,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/required-nobidder-info.json b/adapters/yahooAds/yahooAdstest/supplemental/required-nobidder-info.json similarity index 100% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/required-nobidder-info.json rename to adapters/yahooAds/yahooAdstest/supplemental/required-nobidder-info.json diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/server-error.json b/adapters/yahooAds/yahooAdstest/supplemental/server-error.json similarity index 100% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/server-error.json rename to adapters/yahooAds/yahooAdstest/supplemental/server-error.json diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/server-response-wrong-impid.json b/adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/server-response-wrong-impid.json rename to adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json index 1fcf61e12b7..f40819497a8 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/server-response-wrong-impid.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/server-response-wrong-impid.json @@ -76,7 +76,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "wrong", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-gpp-overwrite.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-overwrite.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-gpp-overwrite.json rename to adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-overwrite.json index 190f96bf0a6..94c895b996d 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-gpp-overwrite.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp-overwrite.json @@ -92,7 +92,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-gpp.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-gpp.json rename to adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json index 81c89f55c3d..3d5aff6c531 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-gpp.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-gpp.json @@ -87,7 +87,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-ignore-width-when-height-missing.json b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json similarity index 98% rename from adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-ignore-width-when-height-missing.json rename to adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json index 353d5e29e71..1206005970c 100644 --- a/adapters/yahooAdvertising/yahooAdvertisingtest/supplemental/simple-banner-ignore-width-when-height-missing.json +++ b/adapters/yahooAds/yahooAdstest/supplemental/simple-banner-ignore-width-when-height-missing.json @@ -78,7 +78,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "yahooAdvertising", + "seat": "yahooAds", "bid": [{ "id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", "impid": "test-imp-id", diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 3c6f8d32575..3818a16a03a 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -170,7 +170,7 @@ import ( "github.com/prebid/prebid-server/adapters/visx" "github.com/prebid/prebid-server/adapters/vrtcal" "github.com/prebid/prebid-server/adapters/xeworks" - "github.com/prebid/prebid-server/adapters/yahooAdvertising" + "github.com/prebid/prebid-server/adapters/yahooAds" "github.com/prebid/prebid-server/adapters/yeahmobi" "github.com/prebid/prebid-server/adapters/yieldlab" "github.com/prebid/prebid-server/adapters/yieldmo" @@ -369,8 +369,9 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderVisx: visx.Builder, openrtb_ext.BidderVrtcal: vrtcal.Builder, openrtb_ext.BidderXeworks: xeworks.Builder, - openrtb_ext.BidderYahooAdvertising: yahooAdvertising.Builder, - openrtb_ext.BidderYahooSSP: yahooAdvertising.Builder, + openrtb_ext.BidderYahooAds: yahooAds.Builder, + openrtb_ext.BidderYahooAdvertising: yahooAds.Builder, + openrtb_ext.BidderYahooSSP: yahooAds.Builder, openrtb_ext.BidderYeahmobi: yeahmobi.Builder, openrtb_ext.BidderYieldlab: yieldlab.Builder, openrtb_ext.BidderYieldmo: yieldmo.Builder, diff --git a/exchange/adapter_util.go b/exchange/adapter_util.go index d8f683b35d2..ad1866a63c8 100644 --- a/exchange/adapter_util.go +++ b/exchange/adapter_util.go @@ -88,7 +88,7 @@ func GetDisabledBiddersErrorMessages(infos config.BidderInfos) map[string]string "lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`, "adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`, "somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`, - "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`, + "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAds" in your configuration.`, "andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`, "oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`, "groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`, diff --git a/exchange/adapter_util_test.go b/exchange/adapter_util_test.go index 9d2a5c3cd5f..2dd0fd04ab7 100644 --- a/exchange/adapter_util_test.go +++ b/exchange/adapter_util_test.go @@ -210,7 +210,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) { "lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`, "adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`, "somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`, - "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`, + "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAds" in your configuration.`, "andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`, "oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`, "groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`, @@ -224,7 +224,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) { "lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`, "adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`, "somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`, - "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`, + "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAds" in your configuration.`, "andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`, "oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`, "groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`, @@ -238,7 +238,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) { "lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`, "adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`, "somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`, - "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`, + "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAds" in your configuration.`, "appnexus": `Bidder "appnexus" has been disabled on this instance of Prebid Server. Please work with the PBS host to enable this bidder again.`, "andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`, "oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`, @@ -253,7 +253,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) { "lifestreet": `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`, "adagio": `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`, "somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`, - "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAdvertising" in your configuration.`, + "yssp": `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahooAds" in your configuration.`, "appnexus": `Bidder "appnexus" has been disabled on this instance of Prebid Server. Please work with the PBS host to enable this bidder again.`, "andbeyondmedia": `Bidder "andbeyondmedia" is no longer available in Prebid Server. If you're looking to use the AndBeyond.Media SSP adapter, please rename it to "beyondmedia" in your configuration.`, "oftmedia": `Bidder "oftmedia" is no longer available in Prebid Server. Please update your configuration.`, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index e6be30d7400..9906d12e1b8 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -270,6 +270,7 @@ const ( BidderVisx BidderName = "visx" BidderVrtcal BidderName = "vrtcal" BidderXeworks BidderName = "xeworks" + BidderYahooAds BidderName = "yahooAds" BidderYahooAdvertising BidderName = "yahooAdvertising" BidderYahooSSP BidderName = "yahoossp" BidderYeahmobi BidderName = "yeahmobi" @@ -467,6 +468,7 @@ func CoreBidderNames() []BidderName { BidderVisx, BidderVrtcal, BidderXeworks, + BidderYahooAds, BidderYahooAdvertising, BidderYahooSSP, BidderYeahmobi, diff --git a/openrtb_ext/bidders_validate_test.go b/openrtb_ext/bidders_validate_test.go index 530f260c761..87a8c96d6f8 100644 --- a/openrtb_ext/bidders_validate_test.go +++ b/openrtb_ext/bidders_validate_test.go @@ -50,7 +50,7 @@ func TestBidderUniquenessGatekeeping(t *testing.T) { // - Exclude duplicates of adapters for the same bidder, as it's unlikely a publisher will use both. var bidders []string for _, bidder := range CoreBidderNames() { - if bidder != BidderTripleliftNative && bidder != BidderAdkernelAdn && bidder != BidderFreewheelSSPOld { + if bidder != BidderTripleliftNative && bidder != BidderAdkernelAdn && bidder != BidderFreewheelSSPOld && bidder != BidderYahooAdvertising { bidders = append(bidders, string(bidder)) } } diff --git a/openrtb_ext/imp_yahooAds.go b/openrtb_ext/imp_yahooAds.go new file mode 100644 index 00000000000..36a4a0f618b --- /dev/null +++ b/openrtb_ext/imp_yahooAds.go @@ -0,0 +1,7 @@ +package openrtb_ext + +// ExtImpYahooAds defines the contract for bidrequest.imp[i].ext.prebid.bidder.yahooAds +type ExtImpYahooAds struct { + Dcn string `json:"dcn"` + Pos string `json:"pos"` +} diff --git a/static/bidder-info/yahooAds.yaml b/static/bidder-info/yahooAds.yaml new file mode 100644 index 00000000000..a2581387152 --- /dev/null +++ b/static/bidder-info/yahooAds.yaml @@ -0,0 +1,18 @@ +endpoint: "https://s2shb.ssp.yahoo.com/admax/bid/partners/PBS" +maintainer: + email: "hb-fe-tech@yahooinc.com" +gvlVendorID: 25 +capabilities: + app: + mediaTypes: + - banner + - video + site: + mediaTypes: + - banner + - video +userSync: + # yahooAds supports user syncing, but requires configuration by the host. contact this + # bidder directly at the email address in this file to ask about enabling user sync. + supports: + - redirect \ No newline at end of file diff --git a/static/bidder-params/yahooAds.json b/static/bidder-params/yahooAds.json new file mode 100644 index 00000000000..77e7107350c --- /dev/null +++ b/static/bidder-params/yahooAds.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "YahooAds Adapter Params", + "description": "A schema which validates params accepted by the YahooAds adapter", + "type": "object", + "properties": { + "dcn": { + "type": "string", + "minLength": 1, + "description": "Site ID provided by One Mobile" + }, + "pos": { + "type": "string", + "minLength": 1, + "description": "Placement ID" + } + }, + "required": ["dcn", "pos"] +}