Skip to content

feat: support video, native, and audio media types in ConnectAd Adapter#4506

Open
rtuschkany wants to merge 3 commits into
prebid:masterfrom
rtuschkany:master
Open

feat: support video, native, and audio media types in ConnectAd Adapter#4506
rtuschkany wants to merge 3 commits into
prebid:masterfrom
rtuschkany:master

Conversation

@rtuschkany

Copy link
Copy Markdown

…ropagate network/site IDs in imp extension

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines +62 to +64
if (imp.getBanner() == null && imp.getVideo() == null && imp.getXNative() == null && imp.getAudio() == null) {
throw new PreBidException("We need a Banner, Video, Native or Audio Object in the request");
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No need for this validation

};
}

if (bidRequest != null && CollectionUtils.isNotEmpty(bidRequest.getImp())) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

bidRequest can't be null.
bidRequest.getImp() can't be empty

.build();
}

private ObjectNode modifyImpExt(ObjectNode impExt, ExtImpConnectAd extImpConnectAd) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reorder methods, so they are in call order

}

private ObjectNode modifyImpExt(ObjectNode impExt, ExtImpConnectAd extImpConnectAd) {
final ObjectNode modifiedExt = impExt != null ? impExt.deepCopy() : mapper.mapper().createObjectNode();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

impExt can't be null

Comment on lines +124 to +141
if (networkId != null) {
try {
modifiedExt.put("networkId", Integer.parseInt(networkId));
} catch (NumberFormatException e) {
modifiedExt.put("networkId", networkId);
}
}

if (siteId != null) {
try {
modifiedExt.put("siteId", Integer.parseInt(siteId));
} catch (NumberFormatException e) {
modifiedExt.put("siteId", siteId);
}
}

return modifiedExt;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do you need this? This fields already present in initial impExt

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.

2 participants