diff --git a/adapters/interactiveoffers/interactiveoffers.go b/adapters/interactiveoffers/interactiveoffers.go new file mode 100644 index 00000000000..fd4cd5807f5 --- /dev/null +++ b/adapters/interactiveoffers/interactiveoffers.go @@ -0,0 +1,79 @@ +package interactiveoffers + +import ( + "encoding/json" + "fmt" + "net/http" + + "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 +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + requestJSON, err := json.Marshal(request) + if err != nil { + return nil, []error{err} + } + + requestData := &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: requestJSON, + } + + 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 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 _, bid := range seatBid.Bid { + bid := bid // pin https://github.com/kyoh86/scopelint#whats-this + b := &adapters.TypedBid{ + Bid: &bid, + BidType: openrtb_ext.BidTypeBanner, + } + bidResponse.Bids = append(bidResponse.Bids, b) + } + } + return bidResponse, nil +} + +// Builder builds a new instance of the Interactiveoffers 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 +} diff --git a/adapters/interactiveoffers/interactiveoffers_test.go b/adapters/interactiveoffers/interactiveoffers_test.go new file mode 100644 index 00000000000..5746f123b41 --- /dev/null +++ b/adapters/interactiveoffers/interactiveoffers_test.go @@ -0,0 +1,20 @@ +package interactiveoffers + +import ( + "testing" + + "github.com/prebid/prebid-server/adapters/adapterstest" + "github.com/prebid/prebid-server/config" + "github.com/prebid/prebid-server/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderInteractiveoffers, config.Adapter{ + Endpoint: "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "interactiveofferstest", bidder) +} diff --git a/adapters/interactiveoffers/interactiveofferstest/exemplary/goodmultiplebidrequest.json b/adapters/interactiveoffers/interactiveofferstest/exemplary/goodmultiplebidrequest.json new file mode 100644 index 00000000000..946289e5401 --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/exemplary/goodmultiplebidrequest.json @@ -0,0 +1,136 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + },{ + "id": "test-imp-id-2", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + },{ + "id": "test-imp-id-2", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [{ + "seat": "interactiveoffers", + "bid": [{ + "id": "randomid", + "impid": "test-imp-id", + "price": 0.500000, + "adid": "12345678", + "adm": "some-test-ad", + "cid": "987", + "crid": "12345678", + "h": 250, + "w": 300 + },{ + "id": "randomid2", + "impid": "test-imp-id-2", + "price": 0.500000, + "adid": "12345678", + "adm": "some-test-ad", + "cid": "987", + "crid": "12345678", + "h": 250, + "w": 300 + }] + }], + "cur": "USD" + } + } + }], + + "expectedBidResponses": [{ + "currency": "USD", + "bids": [{ + "bid": { + "id": "randomid", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "adid": "12345678", + "cid": "987", + "crid": "12345678", + "w": 300, + "h": 250 + }, + "type": "banner" + },{ + "bid": { + "id": "randomid2", + "impid": "test-imp-id-2", + "price": 0.5, + "adm": "some-test-ad", + "adid": "12345678", + "cid": "987", + "crid": "12345678", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }] +} \ No newline at end of file diff --git a/adapters/interactiveoffers/interactiveofferstest/exemplary/goodsinglebidrequest.json b/adapters/interactiveoffers/interactiveofferstest/exemplary/goodsinglebidrequest.json new file mode 100644 index 00000000000..2f49d5451c8 --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/exemplary/goodsinglebidrequest.json @@ -0,0 +1,87 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [{ + "seat": "interactiveoffers", + "bid": [{ + "id": "randomid", + "impid": "test-imp-id", + "price": 0.500000, + "adid": "12345678", + "adm": "some-test-ad", + "cid": "987", + "crid": "12345678", + "h": 250, + "w": 300 + }] + }], + "cur": "USD" + } + } + }], + + "expectedBidResponses": [{ + "currency": "USD", + "bids": [{ + "bid": { + "id": "randomid", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "adid": "12345678", + "cid": "987", + "crid": "12345678", + "w": 300, + "h": 250 + }, + "type": "banner" + }] + }] +} \ No newline at end of file diff --git a/adapters/interactiveoffers/interactiveofferstest/params/race/banner.json b/adapters/interactiveoffers/interactiveofferstest/params/race/banner.json new file mode 100644 index 00000000000..d81c02a5dc3 --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/params/race/banner.json @@ -0,0 +1,3 @@ +{ + "pubid": 35 +} diff --git a/adapters/interactiveoffers/interactiveofferstest/supplemental/204.json b/adapters/interactiveoffers/interactiveofferstest/supplemental/204.json new file mode 100644 index 00000000000..0d56311a188 --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/supplemental/204.json @@ -0,0 +1,55 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + } + }, + "mockResponse": { + "status": 204, + "body": {} + } + }], + + "expectedBidResponses": [], + "expectedMakeBidsErrors": [] +} diff --git a/adapters/interactiveoffers/interactiveofferstest/supplemental/400.json b/adapters/interactiveoffers/interactiveofferstest/supplemental/400.json new file mode 100644 index 00000000000..9aaf12cb239 --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/supplemental/400.json @@ -0,0 +1,60 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + } + }, + "mockResponse": { + "status": 400, + "body": "" + } + }], + + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 400. Bad request from publisher. Run with request.debug = 1 for more info.", + "comparison": "literal" + } + ] +} diff --git a/adapters/interactiveoffers/interactiveofferstest/supplemental/not200.json b/adapters/interactiveoffers/interactiveofferstest/supplemental/not200.json new file mode 100644 index 00000000000..222be912a92 --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/supplemental/not200.json @@ -0,0 +1,60 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + } + }, + "mockResponse": { + "status": 202, + "body": "" + } + }], + + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 202. Run with request.debug = 1 for more info.", + "comparison": "literal" + } + ] +} diff --git a/adapters/interactiveoffers/interactiveofferstest/supplemental/wrongjsonresponse.json b/adapters/interactiveoffers/interactiveofferstest/supplemental/wrongjsonresponse.json new file mode 100644 index 00000000000..7ae16d4a95a --- /dev/null +++ b/adapters/interactiveoffers/interactiveofferstest/supplemental/wrongjsonresponse.json @@ -0,0 +1,60 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "pubid": 35 + } + } + }] + } + }, + "mockResponse": { + "status": 200, + "body": "" + } + }], + + "expectedBidResponses": [], + "expectedMakeBidsErrors": [ + { + "value": "json: cannot unmarshal string into Go value of type openrtb2.BidResponse", + "comparison": "literal" + } + ] +} diff --git a/adapters/interactiveoffers/params_test.go b/adapters/interactiveoffers/params_test.go new file mode 100644 index 00000000000..754be842a80 --- /dev/null +++ b/adapters/interactiveoffers/params_test.go @@ -0,0 +1,44 @@ +package interactiveoffers + +import ( + "encoding/json" + "github.com/prebid/prebid-server/openrtb_ext" + "testing" +) + +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, validParam := range validParams { + if err := validator.Validate(openrtb_ext.BidderInteractiveoffers, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected interactiveoffers params: %s", validParam) + } + } +} + +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, invalidParam := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderInteractiveoffers, json.RawMessage(invalidParam)); err == nil { + t.Errorf("Schema allowed unexpected params: %s", invalidParam) + } + } +} + +var validParams = []string{ + `{"pubid":35}`, +} + +var invalidParams = []string{ + `{"pubid":"35"}`, + `{"pubId":35}`, + `{"PubId":35}`, + `{}`, +} diff --git a/config/config.go b/config/config.go index d2e62d036df..61135e89b02 100644 --- a/config/config.go +++ b/config/config.go @@ -860,6 +860,7 @@ func SetupViper(v *viper.Viper, filename string) { v.SetDefault("adapters.gumgum.endpoint", "https://g2.gumgum.com/providers/prbds2s/bid") v.SetDefault("adapters.improvedigital.endpoint", "http://ad.360yield.com/pbs") v.SetDefault("adapters.inmobi.endpoint", "https://api.w.inmobi.com/showad/openrtb/bidder/prebid") + v.SetDefault("adapters.interactiveoffers.endpoint", "https://rtb.ioadx.com/bidRequest/?partnerId=d9e56d418c4825d466ee96c7a31bf1da6b62fa04") v.SetDefault("adapters.ix.disabled", true) v.SetDefault("adapters.jixie.endpoint", "https://hb.jixie.io/v2/hbsvrpost") v.SetDefault("adapters.krushmedia.endpoint", "http://ads4.krushmedia.com/?c=rtb&m=req&key={{.AccountID}}") diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 530e62742cc..f28d98f3f14 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -2,7 +2,7 @@ package exchange import ( "github.com/prebid/prebid-server/adapters" - "github.com/prebid/prebid-server/adapters/33across" + ttx "github.com/prebid/prebid-server/adapters/33across" "github.com/prebid/prebid-server/adapters/acuityads" "github.com/prebid/prebid-server/adapters/adf" "github.com/prebid/prebid-server/adapters/adform" @@ -53,6 +53,7 @@ import ( "github.com/prebid/prebid-server/adapters/gumgum" "github.com/prebid/prebid-server/adapters/improvedigital" "github.com/prebid/prebid-server/adapters/inmobi" + "github.com/prebid/prebid-server/adapters/interactiveoffers" "github.com/prebid/prebid-server/adapters/invibes" "github.com/prebid/prebid-server/adapters/ix" "github.com/prebid/prebid-server/adapters/jixie" @@ -116,113 +117,114 @@ import ( func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { return map[openrtb_ext.BidderName]adapters.Builder{ - openrtb_ext.Bidder33Across: ttx.Builder, - openrtb_ext.BidderAcuityAds: acuityads.Builder, - openrtb_ext.BidderAdf: adf.Builder, - openrtb_ext.BidderAdform: adform.Builder, - openrtb_ext.BidderAdgeneration: adgeneration.Builder, - openrtb_ext.BidderAdhese: adhese.Builder, - openrtb_ext.BidderAdkernel: adkernel.Builder, - openrtb_ext.BidderAdkernelAdn: adkernelAdn.Builder, - openrtb_ext.BidderAdman: adman.Builder, - openrtb_ext.BidderAdmixer: admixer.Builder, - openrtb_ext.BidderAdOcean: adocean.Builder, - openrtb_ext.BidderAdoppler: adoppler.Builder, - openrtb_ext.BidderAdpone: adpone.Builder, - openrtb_ext.BidderAdot: adot.Builder, - openrtb_ext.BidderAdprime: adprime.Builder, - openrtb_ext.BidderAdtarget: adtarget.Builder, - openrtb_ext.BidderAdtelligent: adtelligent.Builder, - openrtb_ext.BidderAdvangelists: advangelists.Builder, - openrtb_ext.BidderAdxcg: adxcg.Builder, - openrtb_ext.BidderAdyoulike: adyoulike.Builder, - openrtb_ext.BidderAJA: aja.Builder, - openrtb_ext.BidderAMX: amx.Builder, - openrtb_ext.BidderApplogy: applogy.Builder, - openrtb_ext.BidderAppnexus: appnexus.Builder, - openrtb_ext.BidderAudienceNetwork: audienceNetwork.Builder, - openrtb_ext.BidderAvocet: avocet.Builder, - openrtb_ext.BidderBeachfront: beachfront.Builder, - openrtb_ext.BidderBeintoo: beintoo.Builder, - openrtb_ext.BidderBetween: between.Builder, - openrtb_ext.BidderBidmachine: bidmachine.Builder, - openrtb_ext.BidderBrightroll: brightroll.Builder, - openrtb_ext.BidderColossus: colossus.Builder, - openrtb_ext.BidderConnectAd: connectad.Builder, - openrtb_ext.BidderConsumable: consumable.Builder, - openrtb_ext.BidderConversant: conversant.Builder, - openrtb_ext.BidderCpmstar: cpmstar.Builder, - openrtb_ext.BidderCriteo: criteo.Builder, - openrtb_ext.BidderDatablocks: datablocks.Builder, - openrtb_ext.BidderDecenterAds: decenterads.Builder, - openrtb_ext.BidderDeepintent: deepintent.Builder, - openrtb_ext.BidderDmx: dmx.Builder, - openrtb_ext.BidderEmxDigital: emx_digital.Builder, - openrtb_ext.BidderEngageBDR: engagebdr.Builder, - openrtb_ext.BidderEPlanning: eplanning.Builder, - openrtb_ext.BidderEpom: epom.Builder, - openrtb_ext.BidderGamma: gamma.Builder, - openrtb_ext.BidderGamoshi: gamoshi.Builder, - openrtb_ext.BidderGrid: grid.Builder, - openrtb_ext.BidderGumGum: gumgum.Builder, - openrtb_ext.BidderImprovedigital: improvedigital.Builder, - openrtb_ext.BidderInMobi: inmobi.Builder, - openrtb_ext.BidderInvibes: invibes.Builder, - openrtb_ext.BidderIx: ix.Builder, - openrtb_ext.BidderJixie: jixie.Builder, - openrtb_ext.BidderKidoz: kidoz.Builder, - openrtb_ext.BidderKrushmedia: krushmedia.Builder, - openrtb_ext.BidderKubient: kubient.Builder, - openrtb_ext.BidderLockerDome: lockerdome.Builder, - openrtb_ext.BidderLogicad: logicad.Builder, - openrtb_ext.BidderLunaMedia: lunamedia.Builder, - openrtb_ext.BidderMadvertise: madvertise.Builder, - openrtb_ext.BidderMarsmedia: marsmedia.Builder, - openrtb_ext.BidderMediafuse: adtelligent.Builder, - openrtb_ext.BidderMgid: mgid.Builder, - openrtb_ext.BidderMobfoxpb: mobfoxpb.Builder, - openrtb_ext.BidderMobileFuse: mobilefuse.Builder, - openrtb_ext.BidderNanoInteractive: nanointeractive.Builder, - openrtb_ext.BidderNinthDecimal: ninthdecimal.Builder, - openrtb_ext.BidderNoBid: nobid.Builder, - openrtb_ext.BidderOneTag: onetag.Builder, - openrtb_ext.BidderOpenx: openx.Builder, - openrtb_ext.BidderOrbidder: orbidder.Builder, - openrtb_ext.BidderOutbrain: outbrain.Builder, - openrtb_ext.BidderPangle: pangle.Builder, - openrtb_ext.BidderPubmatic: pubmatic.Builder, - openrtb_ext.BidderPubnative: pubnative.Builder, - openrtb_ext.BidderPulsepoint: pulsepoint.Builder, - openrtb_ext.BidderRevcontent: revcontent.Builder, - openrtb_ext.BidderRhythmone: rhythmone.Builder, - openrtb_ext.BidderRTBHouse: rtbhouse.Builder, - openrtb_ext.BidderRubicon: rubicon.Builder, - openrtb_ext.BidderSharethrough: sharethrough.Builder, - openrtb_ext.BidderSilverMob: silvermob.Builder, - openrtb_ext.BidderSmaato: smaato.Builder, - openrtb_ext.BidderSmartAdserver: smartadserver.Builder, - openrtb_ext.BidderSmartRTB: smartrtb.Builder, - openrtb_ext.BidderSmartyAds: smartyads.Builder, - openrtb_ext.BidderSomoaudience: somoaudience.Builder, - openrtb_ext.BidderSonobi: sonobi.Builder, - openrtb_ext.BidderSovrn: sovrn.Builder, - openrtb_ext.BidderSynacormedia: synacormedia.Builder, - openrtb_ext.BidderTappx: tappx.Builder, - openrtb_ext.BidderTelaria: telaria.Builder, - openrtb_ext.BidderTriplelift: triplelift.Builder, - openrtb_ext.BidderTripleliftNative: triplelift_native.Builder, - openrtb_ext.BidderTrustX: grid.Builder, - openrtb_ext.BidderUcfunnel: ucfunnel.Builder, - openrtb_ext.BidderUnicorn: unicorn.Builder, - openrtb_ext.BidderUnruly: unruly.Builder, - openrtb_ext.BidderValueImpression: valueimpression.Builder, - openrtb_ext.BidderVerizonMedia: verizonmedia.Builder, - openrtb_ext.BidderVisx: visx.Builder, - openrtb_ext.BidderVrtcal: vrtcal.Builder, - openrtb_ext.BidderYeahmobi: yeahmobi.Builder, - openrtb_ext.BidderYieldlab: yieldlab.Builder, - openrtb_ext.BidderYieldmo: yieldmo.Builder, - openrtb_ext.BidderYieldone: yieldone.Builder, - openrtb_ext.BidderZeroClickFraud: zeroclickfraud.Builder, + openrtb_ext.Bidder33Across: ttx.Builder, + openrtb_ext.BidderAcuityAds: acuityads.Builder, + openrtb_ext.BidderAdf: adf.Builder, + openrtb_ext.BidderAdform: adform.Builder, + openrtb_ext.BidderAdgeneration: adgeneration.Builder, + openrtb_ext.BidderAdhese: adhese.Builder, + openrtb_ext.BidderAdkernel: adkernel.Builder, + openrtb_ext.BidderAdkernelAdn: adkernelAdn.Builder, + openrtb_ext.BidderAdman: adman.Builder, + openrtb_ext.BidderAdmixer: admixer.Builder, + openrtb_ext.BidderAdOcean: adocean.Builder, + openrtb_ext.BidderAdoppler: adoppler.Builder, + openrtb_ext.BidderAdpone: adpone.Builder, + openrtb_ext.BidderAdot: adot.Builder, + openrtb_ext.BidderAdprime: adprime.Builder, + openrtb_ext.BidderAdtarget: adtarget.Builder, + openrtb_ext.BidderAdtelligent: adtelligent.Builder, + openrtb_ext.BidderAdvangelists: advangelists.Builder, + openrtb_ext.BidderAdxcg: adxcg.Builder, + openrtb_ext.BidderAdyoulike: adyoulike.Builder, + openrtb_ext.BidderAJA: aja.Builder, + openrtb_ext.BidderAMX: amx.Builder, + openrtb_ext.BidderApplogy: applogy.Builder, + openrtb_ext.BidderAppnexus: appnexus.Builder, + openrtb_ext.BidderAudienceNetwork: audienceNetwork.Builder, + openrtb_ext.BidderAvocet: avocet.Builder, + openrtb_ext.BidderBeachfront: beachfront.Builder, + openrtb_ext.BidderBeintoo: beintoo.Builder, + openrtb_ext.BidderBetween: between.Builder, + openrtb_ext.BidderBidmachine: bidmachine.Builder, + openrtb_ext.BidderBrightroll: brightroll.Builder, + openrtb_ext.BidderColossus: colossus.Builder, + openrtb_ext.BidderConnectAd: connectad.Builder, + openrtb_ext.BidderConsumable: consumable.Builder, + openrtb_ext.BidderConversant: conversant.Builder, + openrtb_ext.BidderCpmstar: cpmstar.Builder, + openrtb_ext.BidderCriteo: criteo.Builder, + openrtb_ext.BidderDatablocks: datablocks.Builder, + openrtb_ext.BidderDecenterAds: decenterads.Builder, + openrtb_ext.BidderDeepintent: deepintent.Builder, + openrtb_ext.BidderDmx: dmx.Builder, + openrtb_ext.BidderEmxDigital: emx_digital.Builder, + openrtb_ext.BidderEngageBDR: engagebdr.Builder, + openrtb_ext.BidderEPlanning: eplanning.Builder, + openrtb_ext.BidderEpom: epom.Builder, + openrtb_ext.BidderGamma: gamma.Builder, + openrtb_ext.BidderGamoshi: gamoshi.Builder, + openrtb_ext.BidderGrid: grid.Builder, + openrtb_ext.BidderGumGum: gumgum.Builder, + openrtb_ext.BidderImprovedigital: improvedigital.Builder, + openrtb_ext.BidderInMobi: inmobi.Builder, + openrtb_ext.BidderInteractiveoffers: interactiveoffers.Builder, + openrtb_ext.BidderInvibes: invibes.Builder, + openrtb_ext.BidderIx: ix.Builder, + openrtb_ext.BidderJixie: jixie.Builder, + openrtb_ext.BidderKidoz: kidoz.Builder, + openrtb_ext.BidderKrushmedia: krushmedia.Builder, + openrtb_ext.BidderKubient: kubient.Builder, + openrtb_ext.BidderLockerDome: lockerdome.Builder, + openrtb_ext.BidderLogicad: logicad.Builder, + openrtb_ext.BidderLunaMedia: lunamedia.Builder, + openrtb_ext.BidderMadvertise: madvertise.Builder, + openrtb_ext.BidderMarsmedia: marsmedia.Builder, + openrtb_ext.BidderMediafuse: adtelligent.Builder, + openrtb_ext.BidderMgid: mgid.Builder, + openrtb_ext.BidderMobfoxpb: mobfoxpb.Builder, + openrtb_ext.BidderMobileFuse: mobilefuse.Builder, + openrtb_ext.BidderNanoInteractive: nanointeractive.Builder, + openrtb_ext.BidderNinthDecimal: ninthdecimal.Builder, + openrtb_ext.BidderNoBid: nobid.Builder, + openrtb_ext.BidderOneTag: onetag.Builder, + openrtb_ext.BidderOpenx: openx.Builder, + openrtb_ext.BidderOrbidder: orbidder.Builder, + openrtb_ext.BidderOutbrain: outbrain.Builder, + openrtb_ext.BidderPangle: pangle.Builder, + openrtb_ext.BidderPubmatic: pubmatic.Builder, + openrtb_ext.BidderPubnative: pubnative.Builder, + openrtb_ext.BidderPulsepoint: pulsepoint.Builder, + openrtb_ext.BidderRevcontent: revcontent.Builder, + openrtb_ext.BidderRhythmone: rhythmone.Builder, + openrtb_ext.BidderRTBHouse: rtbhouse.Builder, + openrtb_ext.BidderRubicon: rubicon.Builder, + openrtb_ext.BidderSharethrough: sharethrough.Builder, + openrtb_ext.BidderSilverMob: silvermob.Builder, + openrtb_ext.BidderSmaato: smaato.Builder, + openrtb_ext.BidderSmartAdserver: smartadserver.Builder, + openrtb_ext.BidderSmartRTB: smartrtb.Builder, + openrtb_ext.BidderSmartyAds: smartyads.Builder, + openrtb_ext.BidderSomoaudience: somoaudience.Builder, + openrtb_ext.BidderSonobi: sonobi.Builder, + openrtb_ext.BidderSovrn: sovrn.Builder, + openrtb_ext.BidderSynacormedia: synacormedia.Builder, + openrtb_ext.BidderTappx: tappx.Builder, + openrtb_ext.BidderTelaria: telaria.Builder, + openrtb_ext.BidderTriplelift: triplelift.Builder, + openrtb_ext.BidderTripleliftNative: triplelift_native.Builder, + openrtb_ext.BidderTrustX: grid.Builder, + openrtb_ext.BidderUcfunnel: ucfunnel.Builder, + openrtb_ext.BidderUnicorn: unicorn.Builder, + openrtb_ext.BidderUnruly: unruly.Builder, + openrtb_ext.BidderValueImpression: valueimpression.Builder, + openrtb_ext.BidderVerizonMedia: verizonmedia.Builder, + openrtb_ext.BidderVisx: visx.Builder, + openrtb_ext.BidderVrtcal: vrtcal.Builder, + openrtb_ext.BidderYeahmobi: yeahmobi.Builder, + openrtb_ext.BidderYieldlab: yieldlab.Builder, + openrtb_ext.BidderYieldmo: yieldmo.Builder, + openrtb_ext.BidderYieldone: yieldone.Builder, + openrtb_ext.BidderZeroClickFraud: zeroclickfraud.Builder, } } diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 80b3fc28300..08194955a48 100755 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -73,115 +73,116 @@ func IsBidderNameReserved(name string) bool { // // Please keep this list alphabetized to minimize merge conflicts. const ( - Bidder33Across BidderName = "33across" - BidderAcuityAds BidderName = "acuityads" - BidderAdf BidderName = "adf" - BidderAdform BidderName = "adform" - BidderAdgeneration BidderName = "adgeneration" - BidderAdhese BidderName = "adhese" - BidderAdkernel BidderName = "adkernel" - BidderAdkernelAdn BidderName = "adkernelAdn" - BidderAdman BidderName = "adman" - BidderAdmixer BidderName = "admixer" - BidderAdOcean BidderName = "adocean" - BidderAdoppler BidderName = "adoppler" - BidderAdot BidderName = "adot" - BidderAdpone BidderName = "adpone" - BidderAdprime BidderName = "adprime" - BidderAdtarget BidderName = "adtarget" - BidderAdtelligent BidderName = "adtelligent" - BidderAdvangelists BidderName = "advangelists" - BidderAdxcg BidderName = "adxcg" - BidderAdyoulike BidderName = "adyoulike" - BidderAJA BidderName = "aja" - BidderAMX BidderName = "amx" - BidderApplogy BidderName = "applogy" - BidderAppnexus BidderName = "appnexus" - BidderAudienceNetwork BidderName = "audienceNetwork" - BidderAvocet BidderName = "avocet" - BidderBeachfront BidderName = "beachfront" - BidderBeintoo BidderName = "beintoo" - BidderBetween BidderName = "between" - BidderBidmachine BidderName = "bidmachine" - BidderBrightroll BidderName = "brightroll" - BidderColossus BidderName = "colossus" - BidderConnectAd BidderName = "connectad" - BidderConsumable BidderName = "consumable" - BidderConversant BidderName = "conversant" - BidderCpmstar BidderName = "cpmstar" - BidderCriteo BidderName = "criteo" - BidderDatablocks BidderName = "datablocks" - BidderDmx BidderName = "dmx" - BidderDecenterAds BidderName = "decenterads" - BidderDeepintent BidderName = "deepintent" - BidderEmxDigital BidderName = "emx_digital" - BidderEngageBDR BidderName = "engagebdr" - BidderEPlanning BidderName = "eplanning" - BidderEpom BidderName = "epom" - BidderGamma BidderName = "gamma" - BidderGamoshi BidderName = "gamoshi" - BidderGrid BidderName = "grid" - BidderGumGum BidderName = "gumgum" - BidderImprovedigital BidderName = "improvedigital" - BidderInMobi BidderName = "inmobi" - BidderInvibes BidderName = "invibes" - BidderIx BidderName = "ix" - BidderJixie BidderName = "jixie" - BidderKidoz BidderName = "kidoz" - BidderKrushmedia BidderName = "krushmedia" - BidderKubient BidderName = "kubient" - BidderLifestreet BidderName = "lifestreet" - BidderLockerDome BidderName = "lockerdome" - BidderLogicad BidderName = "logicad" - BidderLunaMedia BidderName = "lunamedia" - BidderMadvertise BidderName = "madvertise" - BidderMarsmedia BidderName = "marsmedia" - BidderMediafuse BidderName = "mediafuse" - BidderMgid BidderName = "mgid" - BidderMobfoxpb BidderName = "mobfoxpb" - BidderMobileFuse BidderName = "mobilefuse" - BidderNanoInteractive BidderName = "nanointeractive" - BidderNinthDecimal BidderName = "ninthdecimal" - BidderNoBid BidderName = "nobid" - BidderOneTag BidderName = "onetag" - BidderOpenx BidderName = "openx" - BidderOrbidder BidderName = "orbidder" - BidderOutbrain BidderName = "outbrain" - BidderPangle BidderName = "pangle" - BidderPubmatic BidderName = "pubmatic" - BidderPubnative BidderName = "pubnative" - BidderPulsepoint BidderName = "pulsepoint" - BidderRevcontent BidderName = "revcontent" - BidderRhythmone BidderName = "rhythmone" - BidderRTBHouse BidderName = "rtbhouse" - BidderRubicon BidderName = "rubicon" - BidderSharethrough BidderName = "sharethrough" - BidderSilverMob BidderName = "silvermob" - BidderSmaato BidderName = "smaato" - BidderSmartAdserver BidderName = "smartadserver" - BidderSmartRTB BidderName = "smartrtb" - BidderSmartyAds BidderName = "smartyads" - BidderSomoaudience BidderName = "somoaudience" - BidderSonobi BidderName = "sonobi" - BidderSovrn BidderName = "sovrn" - BidderSynacormedia BidderName = "synacormedia" - BidderTappx BidderName = "tappx" - BidderTelaria BidderName = "telaria" - BidderTriplelift BidderName = "triplelift" - BidderTripleliftNative BidderName = "triplelift_native" - BidderTrustX BidderName = "trustx" - BidderUcfunnel BidderName = "ucfunnel" - BidderUnicorn BidderName = "unicorn" - BidderUnruly BidderName = "unruly" - BidderValueImpression BidderName = "valueimpression" - BidderVerizonMedia BidderName = "verizonmedia" - BidderVisx BidderName = "visx" - BidderVrtcal BidderName = "vrtcal" - BidderYeahmobi BidderName = "yeahmobi" - BidderYieldlab BidderName = "yieldlab" - BidderYieldmo BidderName = "yieldmo" - BidderYieldone BidderName = "yieldone" - BidderZeroClickFraud BidderName = "zeroclickfraud" + Bidder33Across BidderName = "33across" + BidderAcuityAds BidderName = "acuityads" + BidderAdf BidderName = "adf" + BidderAdform BidderName = "adform" + BidderAdgeneration BidderName = "adgeneration" + BidderAdhese BidderName = "adhese" + BidderAdkernel BidderName = "adkernel" + BidderAdkernelAdn BidderName = "adkernelAdn" + BidderAdman BidderName = "adman" + BidderAdmixer BidderName = "admixer" + BidderAdOcean BidderName = "adocean" + BidderAdoppler BidderName = "adoppler" + BidderAdot BidderName = "adot" + BidderAdpone BidderName = "adpone" + BidderAdprime BidderName = "adprime" + BidderAdtarget BidderName = "adtarget" + BidderAdtelligent BidderName = "adtelligent" + BidderAdvangelists BidderName = "advangelists" + BidderAdxcg BidderName = "adxcg" + BidderAdyoulike BidderName = "adyoulike" + BidderAJA BidderName = "aja" + BidderAMX BidderName = "amx" + BidderApplogy BidderName = "applogy" + BidderAppnexus BidderName = "appnexus" + BidderAudienceNetwork BidderName = "audienceNetwork" + BidderAvocet BidderName = "avocet" + BidderBeachfront BidderName = "beachfront" + BidderBeintoo BidderName = "beintoo" + BidderBetween BidderName = "between" + BidderBidmachine BidderName = "bidmachine" + BidderBrightroll BidderName = "brightroll" + BidderColossus BidderName = "colossus" + BidderConnectAd BidderName = "connectad" + BidderConsumable BidderName = "consumable" + BidderConversant BidderName = "conversant" + BidderCpmstar BidderName = "cpmstar" + BidderCriteo BidderName = "criteo" + BidderDatablocks BidderName = "datablocks" + BidderDmx BidderName = "dmx" + BidderDecenterAds BidderName = "decenterads" + BidderDeepintent BidderName = "deepintent" + BidderEmxDigital BidderName = "emx_digital" + BidderEngageBDR BidderName = "engagebdr" + BidderEPlanning BidderName = "eplanning" + BidderEpom BidderName = "epom" + BidderGamma BidderName = "gamma" + BidderGamoshi BidderName = "gamoshi" + BidderGrid BidderName = "grid" + BidderGumGum BidderName = "gumgum" + BidderImprovedigital BidderName = "improvedigital" + BidderInMobi BidderName = "inmobi" + BidderInteractiveoffers BidderName = "interactiveoffers" + BidderInvibes BidderName = "invibes" + BidderIx BidderName = "ix" + BidderJixie BidderName = "jixie" + BidderKidoz BidderName = "kidoz" + BidderKrushmedia BidderName = "krushmedia" + BidderKubient BidderName = "kubient" + BidderLifestreet BidderName = "lifestreet" + BidderLockerDome BidderName = "lockerdome" + BidderLogicad BidderName = "logicad" + BidderLunaMedia BidderName = "lunamedia" + BidderMadvertise BidderName = "madvertise" + BidderMarsmedia BidderName = "marsmedia" + BidderMediafuse BidderName = "mediafuse" + BidderMgid BidderName = "mgid" + BidderMobfoxpb BidderName = "mobfoxpb" + BidderMobileFuse BidderName = "mobilefuse" + BidderNanoInteractive BidderName = "nanointeractive" + BidderNinthDecimal BidderName = "ninthdecimal" + BidderNoBid BidderName = "nobid" + BidderOneTag BidderName = "onetag" + BidderOpenx BidderName = "openx" + BidderOrbidder BidderName = "orbidder" + BidderOutbrain BidderName = "outbrain" + BidderPangle BidderName = "pangle" + BidderPubmatic BidderName = "pubmatic" + BidderPubnative BidderName = "pubnative" + BidderPulsepoint BidderName = "pulsepoint" + BidderRevcontent BidderName = "revcontent" + BidderRhythmone BidderName = "rhythmone" + BidderRTBHouse BidderName = "rtbhouse" + BidderRubicon BidderName = "rubicon" + BidderSharethrough BidderName = "sharethrough" + BidderSilverMob BidderName = "silvermob" + BidderSmaato BidderName = "smaato" + BidderSmartAdserver BidderName = "smartadserver" + BidderSmartRTB BidderName = "smartrtb" + BidderSmartyAds BidderName = "smartyads" + BidderSomoaudience BidderName = "somoaudience" + BidderSonobi BidderName = "sonobi" + BidderSovrn BidderName = "sovrn" + BidderSynacormedia BidderName = "synacormedia" + BidderTappx BidderName = "tappx" + BidderTelaria BidderName = "telaria" + BidderTriplelift BidderName = "triplelift" + BidderTripleliftNative BidderName = "triplelift_native" + BidderTrustX BidderName = "trustx" + BidderUcfunnel BidderName = "ucfunnel" + BidderUnicorn BidderName = "unicorn" + BidderUnruly BidderName = "unruly" + BidderValueImpression BidderName = "valueimpression" + BidderVerizonMedia BidderName = "verizonmedia" + BidderVisx BidderName = "visx" + BidderVrtcal BidderName = "vrtcal" + BidderYeahmobi BidderName = "yeahmobi" + BidderYieldlab BidderName = "yieldlab" + BidderYieldmo BidderName = "yieldmo" + BidderYieldone BidderName = "yieldone" + BidderZeroClickFraud BidderName = "zeroclickfraud" ) // CoreBidderNames returns a slice of all core bidders. @@ -238,6 +239,7 @@ func CoreBidderNames() []BidderName { BidderGumGum, BidderImprovedigital, BidderInMobi, + BidderInteractiveoffers, BidderInvibes, BidderIx, BidderJixie, diff --git a/openrtb_ext/imp_interactiveoffers.go b/openrtb_ext/imp_interactiveoffers.go new file mode 100644 index 00000000000..2f8fdf0324e --- /dev/null +++ b/openrtb_ext/imp_interactiveoffers.go @@ -0,0 +1,5 @@ +package openrtb_ext + +type ExtImpInteractiveoffers struct { + PubID int `json:"pubid"` +} diff --git a/static/bidder-info/interactiveoffers.yaml b/static/bidder-info/interactiveoffers.yaml new file mode 100644 index 00000000000..56d0d5de083 --- /dev/null +++ b/static/bidder-info/interactiveoffers.yaml @@ -0,0 +1,9 @@ +maintainer: + email: "dev@interactiveoffers.com" +capabilities: + app: + mediaTypes: + - banner + site: + mediaTypes: + - banner \ No newline at end of file diff --git a/static/bidder-params/interactiveoffers.json b/static/bidder-params/interactiveoffers.json new file mode 100644 index 00000000000..79338dcc40a --- /dev/null +++ b/static/bidder-params/interactiveoffers.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Interactive Offers Adapter Params", + "description": "A schema which validates params accepted by Interactive Offers adapter", + "type": "object", + "properties": { + "pubid": { + "type": "integer", + "description": "The publisher id" + } + }, + "required": ["pubid"] +} \ No newline at end of file diff --git a/usersync/usersyncers/syncer_test.go b/usersync/usersyncers/syncer_test.go index e9d3801d374..3a6a7a15379 100755 --- a/usersync/usersyncers/syncer_test.go +++ b/usersync/usersyncers/syncer_test.go @@ -104,29 +104,30 @@ func TestNewSyncerMap(t *testing.T) { } adaptersWithoutSyncers := map[openrtb_ext.BidderName]bool{ - openrtb_ext.BidderAdgeneration: true, - openrtb_ext.BidderAdhese: true, - openrtb_ext.BidderAdoppler: true, - openrtb_ext.BidderAdot: true, - openrtb_ext.BidderAdprime: true, - openrtb_ext.BidderApplogy: true, - openrtb_ext.BidderBidmachine: true, - openrtb_ext.BidderEpom: true, - openrtb_ext.BidderDecenterAds: true, - openrtb_ext.BidderInMobi: true, - openrtb_ext.BidderKidoz: true, - openrtb_ext.BidderKubient: true, - openrtb_ext.BidderMadvertise: true, - openrtb_ext.BidderMobfoxpb: true, - openrtb_ext.BidderMobileFuse: true, - openrtb_ext.BidderOrbidder: true, - openrtb_ext.BidderPangle: true, - openrtb_ext.BidderPubnative: true, - openrtb_ext.BidderRevcontent: true, - openrtb_ext.BidderSilverMob: true, - openrtb_ext.BidderSmaato: true, - openrtb_ext.BidderUnicorn: true, - openrtb_ext.BidderYeahmobi: true, + openrtb_ext.BidderAdgeneration: true, + openrtb_ext.BidderAdhese: true, + openrtb_ext.BidderAdoppler: true, + openrtb_ext.BidderAdot: true, + openrtb_ext.BidderAdprime: true, + openrtb_ext.BidderApplogy: true, + openrtb_ext.BidderBidmachine: true, + openrtb_ext.BidderEpom: true, + openrtb_ext.BidderDecenterAds: true, + openrtb_ext.BidderInMobi: true, + openrtb_ext.BidderInteractiveoffers: true, + openrtb_ext.BidderKidoz: true, + openrtb_ext.BidderKubient: true, + openrtb_ext.BidderMadvertise: true, + openrtb_ext.BidderMobfoxpb: true, + openrtb_ext.BidderMobileFuse: true, + openrtb_ext.BidderOrbidder: true, + openrtb_ext.BidderPangle: true, + openrtb_ext.BidderPubnative: true, + openrtb_ext.BidderRevcontent: true, + openrtb_ext.BidderSilverMob: true, + openrtb_ext.BidderSmaato: true, + openrtb_ext.BidderUnicorn: true, + openrtb_ext.BidderYeahmobi: true, } for bidder, config := range cfg.Adapters {