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

Added medianet adapter #1378

Merged
merged 10 commits into from
Aug 4, 2021
Merged

Added medianet adapter #1378

merged 10 commits into from
Aug 4, 2021

Conversation

garrix-fan
Copy link
Contributor

Adds Media.Net Bidder Adapter.
Vendor ID: 142
Maintainer Email: prebid@media.net

@garrix-fan garrix-fan marked this pull request as ready for review July 21, 2021 09:38
@garrix-fan
Copy link
Contributor Author

Hey, @And1sS @snahornyi .
We have made all the suggested changes. You may resolve the comments.
Thank You,
Tushar Singh,
Media.Net

public class MedianetBidderTest extends VertxTest {

private static final String ENDPOINT_URL = "https://test.media.net?src=external.prebidserver.com";
private static final BidRequest DUMMY_REQUEST = BidRequest.builder()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We prefer to use givenBidRequest method, you can check examples in another test classes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to 'given' nomenclature

Comment on lines 56 to 57
String encodedExternalUrl = HttpUtil.encodeUrl(externalUrl);
String bidderEndpoint = configEndpoint.replace(EXTERNAL_URL_MACRO, encodedExternalUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

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

56 line can be merged to 57 and also we prefer to declare variables as final

Copy link
Collaborator

Choose a reason for hiding this comment

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

And even more better, pls create create method resolveEndpoint and then pass it to constructor, which will be in medianetBidderDeps method

Copy link
Collaborator

Choose a reason for hiding this comment

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

private String resolveEndpoint(String configEndpoint) {
        return configEndpoint.replace(EXTERNAL_URL_MACRO, HttpUtil.encodeUrl(externalUrl));
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this method, and calling it in medianetBidderDeps()

@SerhiiNahornyi SerhiiNahornyi self-requested a review August 4, 2021 15:37
Copy link
Collaborator

@SerhiiNahornyi SerhiiNahornyi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks)

@rpanchyk rpanchyk merged commit 3157843 into prebid:master Aug 4, 2021
nickluck9 pushed a commit that referenced this pull request Aug 9, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
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.

4 participants