-
Notifications
You must be signed in to change notification settings - Fork 175
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
MinuteMedia: Add new bidder #3019
Conversation
70db825
to
4cd5cf5
Compare
public void openrtb2AuctionShouldRespondWithBidsFromMinuteMedia() throws IOException, JSONException { | ||
// given | ||
|
||
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/minutemedia-exchange")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you added query param to test application props pls add withQueryParam
check
@@ -0,0 +1,9 @@ | |||
package org.prebid.server.bidder.minutemedia.model; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be part of proto package
} else if (imp.getXNative() != null) { | ||
return BidType.xNative; | ||
} else if (imp.getAudio() != null) { | ||
return BidType.audio; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls cover native and banner with unit tests
} | ||
|
||
private static BidType getBidType(Bid bid, List<Imp> imps) { | ||
for (Imp imp : imps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From go they use mtype check
final String orgId; | ||
|
||
try { | ||
orgId = extractFirstImpOrdId(bidRequest.getImp()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are checking each imp for org, not just first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only first. They iterate over request.imp
object, but they return right away.
func extractOrg(openRTBRequest *openrtb2.BidRequest) (string, error) {
var err error
for _, imp := range openRTBRequest.Imp {
var bidderExt adapters.ExtImpBidder
if err = json.Unmarshal(imp.Ext, &bidderExt); err != nil {
return "", fmt.Errorf("failed to unmarshal bidderExt: %w", err)
}
var impExt openrtb_ext.ImpExtMinuteMedia
if err = json.Unmarshal(bidderExt.Bidder, &impExt); err != nil {
return "", fmt.Errorf("failed to unmarshal ImpExtMinuteMedia: %w", err)
}
return strings.TrimSpace(impExt.Org), nil
}
return "", errors.New("no imps in bid request")
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say that I like how it's done, but there was a discussion about it and they made an explicit decision to not do any kind of validation for this field...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, org
is the required field and always will be here
No description provided.