-
Notifications
You must be signed in to change notification settings - Fork 193
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
Adverxo: New adapter ported from Go #3705
base: master
Are you sure you want to change the base?
Conversation
Hi @AntoxaAntoxic, can You check my adapter because I have problem with AdverxoTest |
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/proto/openrtb/ext/request/adverxo/ExtImpAdverxo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/test/java/org/prebid/server/bidder/adverxo/AdverxoBidderTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/prebid/server/bidder/adverxo/AdverxoBidderTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/prebid/server/bidder/adverxo/AdverxoBidderTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/prebid/server/bidder/adverxo/AdverxoBidder.java
Outdated
Show resolved
Hide resolved
@Value | ||
@AllArgsConstructor(staticName = "of") |
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.
@Value(staticConstructor = "of")
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.
^^
|
||
@JsonProperty("adUnitId") | ||
Integer adUnitId; | ||
@JsonProperty("auth") |
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.
No need for @JsonProperty("auth")
BidderDeps adverxoBidderDeps(BidderConfigurationProperties adverxoConfigurationProperties, | ||
@NotBlank @Value("${external-url}") String externalUrl, | ||
JacksonMapper mapper, CurrencyConversionService currencyConversionService) { | ||
|
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.
Place each parameter on new different line
enabled: false | ||
endpoint: https://adport.pbsadverxo.com/auction?id={{adUnitId}}&auth={{auth}} | ||
usersync: | ||
enabled: true |
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.
enabled: false
for all aliases
// given | ||
final BidRequest bidRequest = givenBidRequest(impBuilder -> | ||
impBuilder.ext(mapper.valueToTree(ExtPrebid.of(null, mapper.createArrayNode()))) | ||
); |
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.
Place );
on previous line
impBuilder | ||
.bidfloor(bidFloor) | ||
.bidfloorcur(bidFloorCur) | ||
); |
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.
Same, and look for other occurrences
final String adUnitId = String.valueOf(extImp.getAdUnitId()); | ||
return endpointUrl | ||
.replace(ADUNIT_MACROS_ENDPOINT, | ||
extImp.getAdUnitId() == null ? StringUtils.EMPTY : String.valueOf(extImp.getAdUnitId())) | ||
.replace(ADUNIT_MACROS_ENDPOINT, adUnitId == null ? "0" : adUnitId) |
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.
.replace(ADUNIT_MACROS_ENDPOINT, Objects.toString(extImp.getAdUnitId(), "0"))
public AdverxoBidder(String endpointUrl, JacksonMapper mapper, | ||
CurrencyConversionService currencyConversionService) { | ||
this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl)); | ||
this.mapper = mapper; | ||
this.currencyConversionService = currencyConversionService; | ||
} |
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.
Last nitpick and we are good to go:
public AdverxoBidder(String endpointUrl,
JacksonMapper mapper,
CurrencyConversionService currencyConversionService) {
this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl));
this.mapper = Objects.requireNonNull(mapper);
this.currencyConversionService = Objects.requireNonNull(currencyConversionService);
}
@Value | ||
@AllArgsConstructor(staticName = "of") |
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.
^^
Integer adUnitId; | ||
String auth; |
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.
Please, add empty line between fields
🔧 Type of changes
✨ What's the context?
What's the context for the changes?
#3677 (comment)