From ef25797de96046d1fb40cf1b9754a50f9687ba4c Mon Sep 17 00:00:00 2001 From: tradplus <58809719+tradplus@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:08:33 +0800 Subject: [PATCH] feat: change makeRequest code --- adapters/tradplus/tradplus.go | 2 -- adapters/tradplus/tradplustest/exemplary/no-bid.json | 6 ++++++ adapters/tradplus/tradplustest/exemplary/simple-banner.json | 6 ++++++ adapters/tradplus/tradplustest/exemplary/simple-native.json | 6 ++++++ adapters/tradplus/tradplustest/exemplary/simple-video.json | 6 ++++++ .../tradplus/tradplustest/supplemental/bad_response.json | 6 ++++++ adapters/tradplus/tradplustest/supplemental/status_400.json | 6 ++++++ adapters/tradplus/tradplustest/supplemental/status_500.json | 6 ++++++ 8 files changed, 42 insertions(+), 2 deletions(-) diff --git a/adapters/tradplus/tradplus.go b/adapters/tradplus/tradplus.go index c3277f96c1b..4800c73e84b 100644 --- a/adapters/tradplus/tradplus.go +++ b/adapters/tradplus/tradplus.go @@ -46,8 +46,6 @@ func (a *adapter) makeRequest(request *openrtb2.BidRequest) (*adapters.RequestDa return nil, []error{err} } - request.Imp[0].Ext = nil - url, err := a.buildEndpointURL(tradplusExt) if err != nil { return nil, []error{err} diff --git a/adapters/tradplus/tradplustest/exemplary/no-bid.json b/adapters/tradplus/tradplustest/exemplary/no-bid.json index 96d51bf92fa..6a30d91d639 100644 --- a/adapters/tradplus/tradplustest/exemplary/no-bid.json +++ b/adapters/tradplus/tradplustest/exemplary/no-bid.json @@ -37,6 +37,12 @@ "h": 50 } ] + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "" + } } } ] diff --git a/adapters/tradplus/tradplustest/exemplary/simple-banner.json b/adapters/tradplus/tradplustest/exemplary/simple-banner.json index 6b9df199009..b84c6bb0751 100644 --- a/adapters/tradplus/tradplustest/exemplary/simple-banner.json +++ b/adapters/tradplus/tradplustest/exemplary/simple-banner.json @@ -37,6 +37,12 @@ "h": 50 } ] + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "us-" + } } } ] diff --git a/adapters/tradplus/tradplustest/exemplary/simple-native.json b/adapters/tradplus/tradplustest/exemplary/simple-native.json index 6dd785a753c..8ff3a4b1521 100644 --- a/adapters/tradplus/tradplustest/exemplary/simple-native.json +++ b/adapters/tradplus/tradplustest/exemplary/simple-native.json @@ -29,6 +29,12 @@ "native": { "request": "{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":2,\"required\":1,\"title\":{\"len\":90}},{\"id\":6,\"required\":1,\"img\":{\"type\":3,\"wmin\":128,\"hmin\":128,\"mimes\":[\"image/jpg\",\"image/jpeg\",\"image/png\"]}},{\"id\":7,\"required\":1,\"data\":{\"type\":2,\"len\":120}}]}", "ver": "1.2" + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "" + } } } ] diff --git a/adapters/tradplus/tradplustest/exemplary/simple-video.json b/adapters/tradplus/tradplustest/exemplary/simple-video.json index 70328306357..c1fbda2f0be 100644 --- a/adapters/tradplus/tradplustest/exemplary/simple-video.json +++ b/adapters/tradplus/tradplustest/exemplary/simple-video.json @@ -35,6 +35,12 @@ "mimes": [ "video/mp4" ] + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "" + } } } ] diff --git a/adapters/tradplus/tradplustest/supplemental/bad_response.json b/adapters/tradplus/tradplustest/supplemental/bad_response.json index 29ef512126f..1ac332a3b67 100644 --- a/adapters/tradplus/tradplustest/supplemental/bad_response.json +++ b/adapters/tradplus/tradplustest/supplemental/bad_response.json @@ -37,6 +37,12 @@ "h": 50 } ] + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "" + } } } ] diff --git a/adapters/tradplus/tradplustest/supplemental/status_400.json b/adapters/tradplus/tradplustest/supplemental/status_400.json index 0cc859a7cd8..e4f4ca2fc61 100644 --- a/adapters/tradplus/tradplustest/supplemental/status_400.json +++ b/adapters/tradplus/tradplustest/supplemental/status_400.json @@ -37,6 +37,12 @@ "h": 50 } ] + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "" + } } } ] diff --git a/adapters/tradplus/tradplustest/supplemental/status_500.json b/adapters/tradplus/tradplustest/supplemental/status_500.json index d3f08b4e17d..60e7f4f28f4 100644 --- a/adapters/tradplus/tradplustest/supplemental/status_500.json +++ b/adapters/tradplus/tradplustest/supplemental/status_500.json @@ -37,6 +37,12 @@ "h": 50 } ] + }, + "ext": { + "bidder": { + "accountId": "fake-account-id", + "zoneId": "" + } } } ]