Skip to content

Conversation

@przemkaczmarek
Copy link
Collaborator

🔧 Type of changes

  • new bid adapter

✨ What's the context?

#3667

@Net-burst Net-burst linked an issue Jan 21, 2025 that may be closed by this pull request
Copy link
Collaborator

@AntoxaAntoxic AntoxaAntoxic left a comment

Choose a reason for hiding this comment

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

Ping me when you finish addressing the comments, probably this time I commented too early

AntoxaAntoxic
AntoxaAntoxic previously approved these changes Feb 14, 2025
@osulzhenko osulzhenko changed the title Kobler: New adapter (#3667) Kobler: New adapter ported from Go Feb 27, 2025
@osulzhenko
Copy link
Collaborator

Required update based on the comments

@bretg
Copy link
Contributor

bretg commented Apr 1, 2025

@TommyHPettersen - heads up that we've ported this adapter from Go to Java.

Also - noticed that the Prebid docs page https://docs.prebid.org/dev-docs/pbs-bidders.html#kobler doesn't list Prebid Server parameters, just PBJS params. Please consider updating https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/kobler.md with a note about PBS params -- I guess that there's no required param since you utilize referrer.

thanks

Comment on lines 201 to 239
final Result<List<BidderBid>> result = target.makeBids(httpCall, BidRequest.builder().build());

// then
assertThat(result.getErrors()).isEmpty();
assertThat(result.getValue())
.extracting(BidderBid::getType)
.containsExactly(BidType.banner);
}

@Test
public void makeBidsShouldReturnBannerWhenTypeIsNullOrMissing() throws JsonProcessingException {
// given
final Bid bid = Bid.builder()
.ext(mapper.valueToTree(Map.of("prebid", Map.of("type", "null"))))
.build();

final BidderCall<BidRequest> httpCall = givenHttpCall(givenBidResponse(bid));

// when
final Result<List<BidderBid>> result = target.makeBids(httpCall, BidRequest.builder().build());

// then
assertThat(result.getErrors()).isEmpty();
assertThat(result.getValue())
.extracting(BidderBid::getType)
.containsExactly(BidType.banner);
}

@Test
public void makeBidsShouldDefaultToBannerWhenPrebidTypeIsMissing() throws JsonProcessingException {
// given
final Bid bid = Bid.builder()
.ext(mapper.valueToTree(Map.of("prebid", Map.of())))
.build();

final BidderCall<BidRequest> httpCall = givenHttpCall(givenBidResponse(bid));

// when
final Result<List<BidderBid>> result = target.makeBids(httpCall, BidRequest.builder().build());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove unnecessary BidRequest objects. I have written comments about this in other places, but accidentally missed it in these tests.

@osulzhenko osulzhenko requested a review from CTMBNara April 2, 2025 17:30
@CTMBNara CTMBNara merged commit 4c8bcc0 into master Apr 3, 2025
8 checks passed
@CTMBNara CTMBNara deleted the Kobler;-New-Adapter-(#3667) branch April 3, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment