diff --git a/adapters/applogy/applogy.go b/adapters/applogy/applogy.go deleted file mode 100644 index 14826ec1873..00000000000 --- a/adapters/applogy/applogy.go +++ /dev/null @@ -1,163 +0,0 @@ -package applogy - -import ( - "encoding/json" - "errors" - "net/http" - "strconv" - - "github.com/prebid/openrtb/v19/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 ApplogyAdapter struct { - endpoint string -} - -func (a *ApplogyAdapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { - headers := http.Header{} - headers.Add("Content-Type", "application/json;charset=utf-8") - headers.Add("Accept", "application/json") - impressions := request.Imp - result := make([]*adapters.RequestData, 0, len(impressions)) - errs := make([]error, 0, len(impressions)) - - for _, impression := range impressions { - if impression.Banner == nil && impression.Video == nil && impression.Native == nil { - errs = append(errs, &errortypes.BadInput{ - Message: "Applogy only supports banner, video or native ads", - }) - continue - } - if impression.Banner != nil { - if impression.Banner.W == nil || impression.Banner.H == nil || *impression.Banner.W == 0 || *impression.Banner.H == 0 { - if len(impression.Banner.Format) == 0 { - errs = append(errs, &errortypes.BadInput{ - Message: "banner size information missing", - }) - continue - } - banner := *impression.Banner - banner.W = openrtb2.Int64Ptr(banner.Format[0].W) - banner.H = openrtb2.Int64Ptr(banner.Format[0].H) - impression.Banner = &banner - } - } - if len(impression.Ext) == 0 { - errs = append(errs, errors.New("impression extensions required")) - continue - } - var bidderExt adapters.ExtImpBidder - err := json.Unmarshal(impression.Ext, &bidderExt) - if err != nil { - errs = append(errs, err) - continue - } - if len(bidderExt.Bidder) == 0 { - errs = append(errs, errors.New("bidder required")) - continue - } - var impressionExt openrtb_ext.ExtImpApplogy - err = json.Unmarshal(bidderExt.Bidder, &impressionExt) - if err != nil { - errs = append(errs, err) - continue - } - if impressionExt.Token == "" { - errs = append(errs, errors.New("Applogy token required")) - continue - } - request.Imp = []openrtb2.Imp{impression} - body, err := json.Marshal(request) - if err != nil { - errs = append(errs, err) - continue - } - result = append(result, &adapters.RequestData{ - Method: "POST", - Uri: a.endpoint + "/" + impressionExt.Token, - Body: body, - Headers: headers, - }) - } - - request.Imp = impressions - - if len(result) == 0 { - return nil, errs - } - return result, errs -} - -func (a *ApplogyAdapter) MakeBids(request *openrtb2.BidRequest, _ *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { - var errs []error - - switch responseData.StatusCode { - case http.StatusNoContent: - return nil, nil - case http.StatusBadRequest: - return nil, []error{&errortypes.BadInput{ - Message: "unexpected status code: " + strconv.Itoa(responseData.StatusCode), - }} - case http.StatusOK: - break - default: - return nil, []error{&errortypes.BadServerResponse{ - Message: "unexpected status code: " + strconv.Itoa(responseData.StatusCode), - }} - } - - var bidResponse openrtb2.BidResponse - err := json.Unmarshal(responseData.Body, &bidResponse) - if err != nil { - return nil, []error{&errortypes.BadServerResponse{ - Message: err.Error(), - }} - } - - response := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) - - for _, seatBid := range bidResponse.SeatBid { - for _, bid := range seatBid.Bid { - bid := bid // pin https://github.com/kyoh86/scopelint#whats-this - var bidType openrtb_ext.BidType - for _, impression := range request.Imp { - if impression.ID != bid.ImpID { - continue - } - switch { - case impression.Banner != nil: - bidType = openrtb_ext.BidTypeBanner - case impression.Video != nil: - bidType = openrtb_ext.BidTypeVideo - case impression.Native != nil: - bidType = openrtb_ext.BidTypeNative - } - break - } - if bidType == "" { - errs = append(errs, &errortypes.BadServerResponse{ - Message: "ignoring bid id=" + bid.ID + ", request doesn't contain any valid impression with id=" + bid.ImpID, - }) - continue - } - response.Bids = append(response.Bids, &adapters.TypedBid{ - Bid: &bid, - BidType: bidType, - }) - } - } - - return response, errs -} - -// Builder builds a new instance of the Applogy 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 := &ApplogyAdapter{ - endpoint: config.Endpoint, - } - return bidder, nil -} diff --git a/adapters/applogy/applogy_test.go b/adapters/applogy/applogy_test.go deleted file mode 100644 index 1144f44c83c..00000000000 --- a/adapters/applogy/applogy_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package applogy - -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.BidderApplogy, config.Adapter{ - Endpoint: "http://example.com/prebid"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - adapterstest.RunJSONBidderTest(t, "applogytest", bidder) -} diff --git a/adapters/applogy/applogytest/exemplary/simple-banner.json b/adapters/applogy/applogytest/exemplary/simple-banner.json deleted file mode 100644 index a3926dea623..00000000000 --- a/adapters/applogy/applogytest/exemplary/simple-banner.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "format": [{ - "h": 250, - "w": 300 - }] - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }, { - "id": "test-impression-id-2", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }, { - "id": "test-impression-id-3", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "token": "test-token-2" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "format": [{ - "h": 250, - "w": 300 - }], - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-1", - "impid": "test-impression-id-1", - "price": 1 - }] - }] - } - } - }, { - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-2", - "banner": { - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-2", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-2", - "impid": "test-impression-id-2", - "price": 2 - }] - }] - } - } - }, { - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-2", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-3", - "banner": { - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-2" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-3", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-3", - "impid": "test-impression-id-3", - "price": 3 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "bids": [{ - "bid": { - "id": "test-bid-id-1", - "impid": "test-impression-id-1", - "price": 1 - }, - "type": "banner" - }] - }, { - "bids": [{ - "bid": { - "id": "test-bid-id-2", - "impid": "test-impression-id-2", - "price": 2 - }, - "type": "banner" - }] - }, { - "bids": [{ - "bid": { - "id": "test-bid-id-3", - "impid": "test-impression-id-3", - "price": 3 - }, - "type": "banner" - }] - }] -} diff --git a/adapters/applogy/applogytest/exemplary/simple-native.json b/adapters/applogy/applogytest/exemplary/simple-native.json deleted file mode 100644 index 84565ec5575..00000000000 --- a/adapters/applogy/applogytest/exemplary/simple-native.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }, { - "id": "test-impression-id-2", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }, { - "id": "test-impression-id-3", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "token": "test-token-2" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-1", - "impid": "test-impression-id-1", - "price": 1 - }] - }] - } - } - }, { - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-2", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-2", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-2", - "impid": "test-impression-id-2", - "price": 2 - }] - }] - } - } - }, { - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-2", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-3", - "native": { - "request": "{\"ver\":\"1.1\",\"context\":1,\"contextsubtype\":11,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":500}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"wmin\":1,\"hmin\":1}},{\"id\":3,\"required\":0,\"data\":{\"type\":1,\"len\":200}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":15000}},{\"id\":5,\"required\":0,\"data\":{\"type\":6,\"len\":40}},{\"id\":6,\"required\":0,\"data\":{\"type\":500}}]}", - "ver": "1.1" - }, - "ext": { - "bidder": { - "token": "test-token-2" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-3", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-3", - "impid": "test-impression-id-3", - "price": 3 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "bids": [{ - "bid": { - "id": "test-bid-id-1", - "impid": "test-impression-id-1", - "price": 1 - }, - "type": "native" - }] - }, { - "bids": [{ - "bid": { - "id": "test-bid-id-2", - "impid": "test-impression-id-2", - "price": 2 - }, - "type": "native" - }] - }, { - "bids": [{ - "bid": { - "id": "test-bid-id-3", - "impid": "test-impression-id-3", - "price": 3 - }, - "type": "native" - }] - }] -} diff --git a/adapters/applogy/applogytest/exemplary/simple-video.json b/adapters/applogy/applogytest/exemplary/simple-video.json deleted file mode 100644 index 30237cccd10..00000000000 --- a/adapters/applogy/applogytest/exemplary/simple-video.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "video": { - "w": 900, - "h": 250, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }, { - "id": "test-impression-id-2", - "video": { - "w": 900, - "h": 250, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }, { - "id": "test-impression-id-3", - "video": { - "w": 900, - "h": 250, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "token": "test-token-2" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "video": { - "w": 900, - "h": 250, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-1", - "impid": "test-impression-id-1", - "price": 1 - }] - }] - } - } - }, { - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-2", - "video": { - "w": 900, - "h": 250, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-2", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-2", - "impid": "test-impression-id-2", - "price": 2 - }] - }] - } - } - }, { - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-2", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-3", - "video": { - "w": 900, - "h": 250, - "mimes": [ - "video/mp4" - ] - }, - "ext": { - "bidder": { - "token": "test-token-2" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id-3", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-3", - "impid": "test-impression-id-3", - "price": 3 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "bids": [{ - "bid": { - "id": "test-bid-id-1", - "impid": "test-impression-id-1", - "price": 1 - }, - "type": "video" - }] - }, { - "bids": [{ - "bid": { - "id": "test-bid-id-2", - "impid": "test-impression-id-2", - "price": 2 - }, - "type": "video" - }] - }, { - "bids": [{ - "bid": { - "id": "test-bid-id-3", - "impid": "test-impression-id-3", - "price": 3 - }, - "type": "video" - }] - }] -} diff --git a/adapters/applogy/applogytest/supplemental/all-failed.json b/adapters/applogy/applogytest/supplemental/all-failed.json deleted file mode 100644 index 7f0244afcfb..00000000000 --- a/adapters/applogy/applogytest/supplemental/all-failed.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "w": 300, - "h": 250 - } - }] - }, - "expectedMakeRequestsErrors": [{ - "value": "impression extensions required", - "comparison": "literal" - }] -} diff --git a/adapters/applogy/applogytest/supplemental/invalid-params.json b/adapters/applogy/applogytest/supplemental/invalid-params.json deleted file mode 100644 index 6b5d5e3224d..00000000000 --- a/adapters/applogy/applogytest/supplemental/invalid-params.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": {} - }, { - "id": "test-impression-id-2", - "banner": { - "w": 300, - "h": 250 - } - }, { - "id": "test-impression-id-3", - "banner": { - "w": 300, - "h": 250 - }, - "ext": {} - }, { - "id": "test-impression-id-4" - }, { - "id": "test-impression-id-5", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "token": "test-token-5" - } - } - }, { - "id": "test-impression-id-0", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": "invalid bidder" - } - }, { - "id": "test-impression-id-0", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": {} - } - }, { - "id": "test-impression-id-0", - "banner": { - "w": 300, - "h": 250 - }, - "ext": "invalid ext" - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-5", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-5", - "banner": { - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-5" - } - } - }] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-response-id", - "seatbid": [{ - "bid": [{ - "id": "test-bid-id-5", - "impid": "test-impression-id-5", - "price": 5 - }, { - "id": "test-bid-id-6", - "impid": "test-impression-id-6", - "price": 6 - }] - }] - } - } - }], - "expectedBidResponses": [{ - "bids": [{ - "bid": { - "id": "test-bid-id-5", - "impid": "test-impression-id-5", - "price": 5 - }, - "type": "banner" - }] - }], - "expectedMakeRequestsErrors": [{ - "value": "banner size information missing", - "comparison": "literal" - }, { - "value": "impression extensions required", - "comparison": "literal" - }, { - "value": "bidder required", - "comparison": "literal" - }, { - "value": "Applogy only supports banner, video or native ads", - "comparison": "literal" - }, { - "value": "json: cannot unmarshal string into Go value of type openrtb_ext.ExtImpApplogy", - "comparison": "literal" - }, { - "value": "Applogy token required", - "comparison": "literal" - }, { - "value": "json: cannot unmarshal string into Go value of type adapters.ExtImpBidder", - "comparison": "literal" - }], - "expectedMakeBidsErrors": [{ - "value": "ignoring bid id=test-bid-id-6, request doesn't contain any valid impression with id=test-impression-id-6", - "comparison": "literal" - }] -} diff --git a/adapters/applogy/applogytest/supplemental/status-204.json b/adapters/applogy/applogytest/supplemental/status-204.json deleted file mode 100644 index 1c849b4fa3a..00000000000 --- a/adapters/applogy/applogytest/supplemental/status-204.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 204, - "body": {} - } - }], - "expectedBidResponses": [] -} diff --git a/adapters/applogy/applogytest/supplemental/status-400.json b/adapters/applogy/applogytest/supplemental/status-400.json deleted file mode 100644 index 95e271bae8e..00000000000 --- a/adapters/applogy/applogytest/supplemental/status-400.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 400, - "body": {} - } - }], - "expectedMakeBidsErrors": [{ - "value": "unexpected status code: 400", - "comparison": "literal" - }] -} diff --git a/adapters/applogy/applogytest/supplemental/status-502.json b/adapters/applogy/applogytest/supplemental/status-502.json deleted file mode 100644 index c0b1641653a..00000000000 --- a/adapters/applogy/applogytest/supplemental/status-502.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "mockBidRequest": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - }, - "httpCalls": [{ - "expectedRequest": { - "uri": "http://example.com/prebid/test-token-1", - "body": { - "id": "test-request-id", - "imp": [{ - "id": "test-impression-id-1", - "banner": { - "h": 250, - "w": 300 - }, - "ext": { - "bidder": { - "token": "test-token-1" - } - } - }] - } - }, - "mockResponse": { - "status": 502, - "body": {} - } - }], - "expectedMakeBidsErrors": [{ - "value": "unexpected status code: 502", - "comparison": "literal" - }] -} diff --git a/endpoints/openrtb2/sample-requests/hooks/amp_bidder_reject.json b/endpoints/openrtb2/sample-requests/hooks/amp_bidder_reject.json index c3ce226ff9c..7fc1e7d8721 100644 --- a/endpoints/openrtb2/sample-requests/hooks/amp_bidder_reject.json +++ b/endpoints/openrtb2/sample-requests/hooks/amp_bidder_reject.json @@ -4,7 +4,7 @@ "config": { "mockBidders": [ {"bidderName": "appnexus", "currency": "USD", "price": 2}, - {"bidderName": "applogy", "currency": "USD", "price": 1} + {"bidderName": "rubicon", "currency": "USD", "price": 1} ] }, "mockBidRequest": { @@ -29,7 +29,7 @@ "appnexus": { "placementId": 12883451 }, - "applogy": { + "rubicon": { "placementId": 12883451 } } @@ -42,23 +42,23 @@ "debug": true, "aliases": { "unknown": "appnexus", - "foo": "applogy" + "foo": "rubicon" } } } }, "expectedAmpResponse": { "targeting": { - "hb_bidder": "applogy", - "hb_bidder_applogy": "applogy", + "hb_bidder": "rubicon", + "hb_bidder_rubicon": "rubicon", "hb_cache_host": "www.pbcserver.com", - "hb_cache_host_applog": "www.pbcserver.com", + "hb_cache_host_rubico": "www.pbcserver.com", "hb_cache_id": "0", - "hb_cache_id_applogy": "0", + "hb_cache_id_rubicon": "0", "hb_cache_path": "/pbcache/endpoint", - "hb_cache_path_applog": "/pbcache/endpoint", + "hb_cache_path_rubico": "/pbcache/endpoint", "hb_pb": "1.00", - "hb_pb_applogy": "1.00" + "hb_pb_rubicon": "1.00" }, "ortb2": { "ext": { @@ -103,7 +103,7 @@ ] }, { - "entity": "applogy", + "entity": "rubicon", "groups": [ { "invocation_results": [ diff --git a/endpoints/openrtb2/sample-requests/hooks/amp_bidder_response_reject.json b/endpoints/openrtb2/sample-requests/hooks/amp_bidder_response_reject.json index fe654304c4f..4e38b5a2f2d 100644 --- a/endpoints/openrtb2/sample-requests/hooks/amp_bidder_response_reject.json +++ b/endpoints/openrtb2/sample-requests/hooks/amp_bidder_response_reject.json @@ -4,7 +4,7 @@ "config": { "mockBidders": [ {"bidderName": "appnexus", "currency": "USD", "price": 2}, - {"bidderName": "applogy", "currency": "USD", "price": 1} + {"bidderName": "rubicon", "currency": "USD", "price": 1} ] }, "mockBidRequest": { @@ -29,7 +29,7 @@ "appnexus": { "placementId": 12883451 }, - "applogy": { + "rubicon": { "placementId": 12883451 } } @@ -42,23 +42,23 @@ "debug": true, "aliases": { "unknown": "appnexus", - "foo": "applogy" + "foo": "rubicon" } } } }, "expectedAmpResponse": { "targeting": { - "hb_bidder": "applogy", - "hb_bidder_applogy": "applogy", + "hb_bidder": "rubicon", + "hb_bidder_rubicon": "rubicon", "hb_cache_host": "www.pbcserver.com", - "hb_cache_host_applog": "www.pbcserver.com", + "hb_cache_host_rubico": "www.pbcserver.com", "hb_cache_id": "0", - "hb_cache_id_applogy": "0", + "hb_cache_id_rubicon": "0", "hb_cache_path": "/pbcache/endpoint", - "hb_cache_path_applog": "/pbcache/endpoint", + "hb_cache_path_rubico": "/pbcache/endpoint", "hb_pb": "1.00", - "hb_pb_applogy": "1.00" + "hb_pb_rubicon": "1.00" }, "ortb2": { "ext": { @@ -103,7 +103,7 @@ ] }, { - "entity": "applogy", + "entity": "rubicon", "groups": [ { "invocation_results": [ diff --git a/endpoints/openrtb2/sample-requests/hooks/auction_bidder_reject.json b/endpoints/openrtb2/sample-requests/hooks/auction_bidder_reject.json index bece42277ef..94769e4f6cd 100644 --- a/endpoints/openrtb2/sample-requests/hooks/auction_bidder_reject.json +++ b/endpoints/openrtb2/sample-requests/hooks/auction_bidder_reject.json @@ -3,7 +3,7 @@ "config": { "mockBidders": [ {"bidderName": "appnexus", "currency": "USD", "price": 0.00}, - {"bidderName": "applogy", "currency": "USD", "price": 0.00} + {"bidderName": "rubicon", "currency": "USD", "price": 0.00} ] }, "mockBidRequest": { @@ -26,7 +26,7 @@ "appnexus": { "placementId": 12883451 }, - "applogy": { + "rubicon": { "placementId": 12883451 } } @@ -49,12 +49,12 @@ { "bid": [ { - "id": "applogy-bid", + "id": "rubicon-bid", "impid": "some-impression-id", "price": 0 } ], - "seat": "applogy" + "seat": "rubicon" } ], "ext": { @@ -99,7 +99,7 @@ ] }, { - "entity": "applogy", + "entity": "rubicon", "groups": [ { "invocation_results": [ diff --git a/endpoints/openrtb2/sample-requests/hooks/auction_bidder_response_reject.json b/endpoints/openrtb2/sample-requests/hooks/auction_bidder_response_reject.json index 32743d67b75..6198e3e23bc 100644 --- a/endpoints/openrtb2/sample-requests/hooks/auction_bidder_response_reject.json +++ b/endpoints/openrtb2/sample-requests/hooks/auction_bidder_response_reject.json @@ -3,7 +3,7 @@ "config": { "mockBidders": [ {"bidderName": "appnexus", "currency": "USD", "price": 0.00}, - {"bidderName": "applogy", "currency": "USD", "price": 0.00} + {"bidderName": "rubicon", "currency": "USD", "price": 0.00} ] }, "mockBidRequest": { @@ -26,7 +26,7 @@ "appnexus": { "placementId": 12883451 }, - "applogy": { + "rubicon": { "placementId": 12883451 } } @@ -49,12 +49,12 @@ { "bid": [ { - "id": "applogy-bid", + "id": "rubicon-bid", "impid": "some-impression-id", "price": 0 } ], - "seat": "applogy" + "seat": "rubicon" } ], "ext": { @@ -99,7 +99,7 @@ ] }, { - "entity": "applogy", + "entity": "rubicon", "groups": [ { "invocation_results": [ diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 825eff56353..8e80070bd79 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -34,7 +34,6 @@ import ( "github.com/prebid/prebid-server/adapters/algorix" "github.com/prebid/prebid-server/adapters/amx" "github.com/prebid/prebid-server/adapters/apacdex" - "github.com/prebid/prebid-server/adapters/applogy" "github.com/prebid/prebid-server/adapters/appnexus" "github.com/prebid/prebid-server/adapters/appush" "github.com/prebid/prebid-server/adapters/audienceNetwork" @@ -229,7 +228,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderAlgorix: algorix.Builder, openrtb_ext.BidderAMX: amx.Builder, openrtb_ext.BidderApacdex: apacdex.Builder, - openrtb_ext.BidderApplogy: applogy.Builder, openrtb_ext.BidderAppnexus: appnexus.Builder, openrtb_ext.BidderAppstock: limelightDigital.Builder, openrtb_ext.BidderAppush: appush.Builder, diff --git a/exchange/adapter_util.go b/exchange/adapter_util.go index 5a3b8a4ce99..f6c1ffe8b55 100644 --- a/exchange/adapter_util.go +++ b/exchange/adapter_util.go @@ -118,6 +118,7 @@ func GetDisabledBidderWarningMessages(infos config.BidderInfos) map[string]strin "groupm": `Bidder "groupm" is no longer available in Prebid Server. Please update your configuration.`, "verizonmedia": `Bidder "verizonmedia" is no longer available in Prebid Server. Please update your configuration.`, "brightroll": `Bidder "brightroll" is no longer available in Prebid Server. Please update your configuration.`, + "applogy": `Bidder "applogy" is no longer available in Prebid Server. Please update your configuration.`, "rhythmone": `Bidder "rhythmone" is no longer available in Prebid Server. Please update your configuration.`, } diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index f6636a00a48..cfed128e636 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -52,7 +52,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderAlgorix, BidderAMX, BidderApacdex, - BidderApplogy, BidderAppnexus, BidderAppstock, BidderAppush, @@ -346,7 +345,6 @@ const ( BidderAlgorix BidderName = "algorix" BidderAMX BidderName = "amx" BidderApacdex BidderName = "apacdex" - BidderApplogy BidderName = "applogy" BidderAppnexus BidderName = "appnexus" BidderAppstock BidderName = "appstock" BidderAppush BidderName = "appush" diff --git a/openrtb_ext/imp_applogy.go b/openrtb_ext/imp_applogy.go deleted file mode 100644 index 45774a05afb..00000000000 --- a/openrtb_ext/imp_applogy.go +++ /dev/null @@ -1,5 +0,0 @@ -package openrtb_ext - -type ExtImpApplogy struct { - Token string `json:"token"` -} diff --git a/static/bidder-info/applogy.yaml b/static/bidder-info/applogy.yaml deleted file mode 100644 index 62a70a17f28..00000000000 --- a/static/bidder-info/applogy.yaml +++ /dev/null @@ -1,14 +0,0 @@ -endpoint: "http://rtb.applogy.com/v1/prebid" -maintainer: - email: work@applogy.com -capabilities: - app: - mediaTypes: - - banner - - video - - native - site: - mediaTypes: - - banner - - video - - native diff --git a/static/bidder-params/applogy.json b/static/bidder-params/applogy.json deleted file mode 100644 index 2650640c115..00000000000 --- a/static/bidder-params/applogy.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Applogy Adapter Params", - "description": "A schema which validates params accepted by the Applogy adapter", - "type": "object", - "properties": { - "token": { - "type": "string", - "description": "Applogy token" - } - }, - "required": ["token"] -}