Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tradplus #3508

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Tradplus #3508

wants to merge 5 commits into from

Conversation

tradplus
Copy link

TradPlus is a leading, stable, and reliable ad monetization platform that is committed to providing global developers with fair, transparent and efficient monetization solutions. We also provide ADX and Saas ADX services. We serve 2,000+ global developers. Moreover, Our SDK has been certified by IAB Tech Lab and also joins Google Play SDK Index. And we have Information Security Management Certification.

Our advertising business spans the world. This is our official website: https://tradplusad.com/en. You can get more details about TradPlus.

this is TradPlus adapter version 1.0.

Thank!


@Override
public Result<List<HttpRequest<BidRequest>>> makeHttpRequests(BidRequest bidRequest) {
final Map<ExtImpTradPlus, List<Imp>> extToImps = new HashMap<>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using a map here is an overhead since only one single imp is really utilized to retrieve the ext object, please get rid of it

Comment on lines +96 to +99
private static List<Imp> removeFirstImpExt(List<Imp> imps) {
imps.set(0, imps.getFirst().toBuilder().ext(null).build());
return imps;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks redundant since the list of imps always has a single imp

public Result<List<BidderBid>> makeBids(BidderCall<BidRequest> httpCall, BidRequest bidRequest) {
try {
final BidResponse bidResponse = mapper.decodeValue(httpCall.getResponse().getBody(), BidResponse.class);
return Result.of(extractBids(bidResponse, httpCall.getRequest().getPayload()), Collections.emptyList());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result.withValues()

import static org.prebid.server.proto.openrtb.ext.response.BidType.video;
import static org.prebid.server.proto.openrtb.ext.response.BidType.xNative;

public class TradPlusBidderTest extends VertxTest {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no any test that covers the outgoing http request:

  • payload: the basic logic of using only a single imp ignoring others
  • headers
  • impIds object

@@ -455,6 +455,8 @@ adapters.telaria.enabled=true
adapters.telaria.endpoint=http://localhost:8090/telaria-exchange/
adapters.theadx.enabled=true
adapters.theadx.endpoint=http://localhost:8090/theadx-exchange
adapters.tradplus.enabled=true
adapters.tradplus.endpoint=http://localhost:8090/tradplus-exchange
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the macros to the url to check them in the integration test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants