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

Sparteo Bid Adapter: add adUnitCode #12305

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

tanguylemeur-sparteo
Copy link
Contributor

@tanguylemeur-sparteo tanguylemeur-sparteo commented Oct 9, 2024

Type of change

  • Updated bidder adapter
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

Description of change

Collects adUnitCode and add it to the bid request.

Be sure to test the integration with your adserver using the Hello World sample page. -->

Thank you :-)

@@ -38,6 +38,7 @@ const converter = ortbConverter({
const imp = buildImp(bidRequest, context);

deepSetValue(imp, 'ext.sparteo.params', bidRequest.params);
imp.ext.sparteo.params.adUnitCode = bidRequest.adUnitCode;
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think the tests below would pass without this code change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for having a look!

What do you mean ? They don't pass if I remove this line:

  SparteoAdapter
    buildRequests
      Check method return
        ✖ should return the right formatted requests
          Chrome Headless 129.0.0.0 (Mac OS 10.15.7)
        AssertionError: expected { method: 'POST', …(2) } to deeply equal { method: 'POST', …(2) }

      + expected - actual

               }
               "ext": {
                 "sparteo": {
                   "params": {
      +              "adUnitCode": "id-1234"
                     "formats": [
                       "corner"
                     ]
                     "networkId": "1234567a-eb1b-1fae-1d23-e1fbaef234cf"
               "ext": {
                 "pbadslot": "video"
                 "sparteo": {
                   "params": {
      +              "adUnitCode": "id-5678"
                     "networkId": "1234567a-eb1b-1fae-1d23-e1fbaef234cf"
                   }
                 }
               }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @patmmccann, thank you for your feedback last week. Would you mind having a look at this answer, please?

If I'm not wrong, it should be already covered by tests.

@patmmccann patmmccann merged commit 68f879a into prebid:master Oct 19, 2024
6 checks passed
@patmmccann patmmccann self-assigned this Oct 19, 2024
pdamoc pushed a commit to missena-corp/Prebid.js that referenced this pull request Oct 22, 2024
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.

3 participants