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

New adapter readpeak (#3142) #3198

Merged
merged 18 commits into from
Jul 2, 2024
Merged

Conversation

przemkaczmarek
Copy link
Collaborator

@AntoxaAntoxic
Copy link
Collaborator

Hi @przemkaczmarek

The logic of the bidder doesn't match the logic of the Go version, please replicate the prebid/prebid-server#3610

@SerhiiNahornyi
Copy link
Collaborator

@przemkaczmarek Builds are failed. Please fix them

@SerhiiNahornyi SerhiiNahornyi linked an issue Jun 3, 2024 that may be closed by this pull request
Comment on lines 148 to 165
private Result<List<BidderBid>> bidsFromResponse(BidResponse bidResponse) {
final List<BidderError> errors = new ArrayList<>();
final List<BidderBid> validBids = new ArrayList<>();

for (SeatBid seatBid : bidResponse.getSeatbid()) {
if (seatBid != null) {
for (Bid bid : seatBid.getBid()) {
if (bid != null) {
try {
final BidderBid bidderBid = makeBid(bid, bidResponse);
validBids.add(bidderBid);
} catch (PreBidException e) {
errors.add(BidderError.badInput(e.getMessage()));
}
}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

please use the similar style

       bidResponse.getSeatbid().stream()
                .filter(Objects::nonNull)
                .map(SeatBid::getBid)
                .filter(Objects::nonNull)
                .flatMap(Collection::stream)
                .map(bid -> makeBid(bid, bidResponse.getCur(), errors))
                .filter(Objects::nonNull)
                .toList();

@SerhiiNahornyi SerhiiNahornyi merged commit 2a90a68 into master Jul 2, 2024
5 checks passed
@SerhiiNahornyi SerhiiNahornyi deleted the new-adapter-readpeak-(#3142) branch July 2, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port PR from PBS-Go: New Adapter: Readpeak
3 participants