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

Dianomi Bid adapter: add new bid adapter #8519

Merged
merged 44 commits into from
Jun 23, 2022
Merged

Conversation

DianomiJH
Copy link
Contributor

@DianomiJH DianomiJH commented Jun 6, 2022

Type of change

  • New bidder adapter

Description of change

New bid adapter for Dianomi plc.

  • test parameters for validating bids

Native example

var adUnits = [
    code: 'your-native-container-id',
    mediaTypes: {
        native: {
            image: {
                required: false,
                sizes: [100, 50]
            },
            title: {
                required: false,
                len: 140
            },
            sponsoredBy: {
                required: false
            },
            clickUrl: {
                required: false
            },
            body: {
                required: false
            },
            icon: {
                required: false,
                sizes: [50, 50]
            }
        }
    },
    bids: [{
        bidder: 'dianomi',
        params: {
            smartadId: 9607
        }
    }]
];

Banner example

var adUnits = [
    code: 'your-banner-container-id',
    mediaTypes: {
      banner: {
        sizes: [[300, 250]]
      } 
    },
    bids: [{
        bidder: 'dianomi',
        params: {
            smartadId: 9607
        }
    }]
];

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

  • contact email of the adapter’s maintainer
    [email protected]
  • official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

michael-stevens and others added 30 commits December 10, 2021 14:49
removed nested request in buildRequests/native object to align better with ortb native 1.2
@mhc-gh
Copy link
Contributor

mhc-gh commented Jun 13, 2022

Is there any update here? Can someone review please.

Copy link
Contributor

@Fawke Fawke left a comment

Choose a reason for hiding this comment

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

Hi @DianomiJH,

While running the unit tests locally, I see quite a few tests are failing. Can you run this command, gulp test locally and check if all tests pass?

I see the following messages when I run the tests.

LOG: '[Failure f2b4b2dac1-21] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids price floors should add correct floor values'): 0 requests'
LOG: '[Failure f2b4b2dac1-22] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids multiple media types should use all configured media types for bidding'): 0 requests'
LOG: '[Failure f2b4b2dac1-23] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids banner should convert sizes to openrtb format'): 0 requests'
LOG: '[Failure f2b4b2dac1-24] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids video should pass video mediatype config'): 0 requests'
LOG: '[Failure f2b4b2dac1-25] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids native assets should set correct asset id'): 0 requests'
LOG: '[Failure f2b4b2dac1-26] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids native assets should add required key if it is necessary'): 0 requests'
LOG: '[Failure f2b4b2dac1-27] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids native assets should map img and data assets'): 0 requests'
LOG: '[Failure f2b4b2dac1-28] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids native assets should utilise aspect_ratios'): 0 requests'
LOG: '[Failure f2b4b2dac1-29] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids native assets should not throw error if aspect_ratios config is not defined'): 0 requests'
LOG: '[Failure f2b4b2dac1-30] XHR mock state after failure (for test 'Dianomi adapter buildRequests bids native assets icon/image sizing should flatten sizes and utilise first pair'): 0 requests'

@DianomiJH
Copy link
Contributor Author

Hi @Fawke , that's odd, i feel like they were working when i ran them before, I'll look into it and get that fixed for you :)

@DianomiJH
Copy link
Contributor Author

DianomiJH commented Jun 20, 2022

Hi @Fawke , running the tests locally and they are all passing:
image
(running gulp test-only --file=test/spec/modules/dianomiBidAdapter_spec.js shows those skipped tests aren't ours)
i have made a very small change to a couple of the tests, but nothing that should have changed the results here. Can you please advise?

@Fawke
Copy link
Contributor

Fawke commented Jun 21, 2022

Hi @DianomiJH,

I think in Prebid v7, we can't get reference to the ortb2 object from getConfig. It's now part of the bidrequest object. Know more here

I think the test are passing for you locally because you haven't pulled in the latest changes from master after Prebid v7 release. Please pull in the master branch and then run the test, you'd see them fail. To fix them, pull the ortb2 info from bidrequest object.

@DianomiJH
Copy link
Contributor Author

Hi @Fawke , Thanks for the info, i totally missed the v7 release :) i've updated the code and tests to work with the new version. Let me know if you need anything else

@Fawke Fawke added the LGTM label Jun 23, 2022
@Fawke Fawke merged commit 033a301 into prebid:master Jun 23, 2022
renebaudisch pushed a commit to renebaudisch/Prebid.js that referenced this pull request Jun 28, 2022
* start of dianomi adapter

* improving adapter

* Rename and add the missing "i"

* our bidder supports native (or it will)

* Updated dianomiAdapter

* dianomi adapter update endpoint and smartadId paramter

* removed nested request in buildRequests/native object to align better with ortb native 1.2

* dianomi adapter upddate, remove native {request} nesting

* update md, tried to make it similar to adform's

* updated urls to live endpoints

* a couple little tweaks to md

* added userSync and allow changing of endpoint

* updated Maintainer email

* added tests, need to look at coppa tests still as not sure if we should be testing that

* couple of test changes

* small change to tests

* switched to v7

Co-authored-by: Michael Stevens <[email protected]>
Co-authored-by: Chris Almeida-Symons <[email protected]>
Co-authored-by: Martin Hill <[email protected]>
jlaso pushed a commit to AuDigent/Prebid.js that referenced this pull request Jul 1, 2022
* start of dianomi adapter

* improving adapter

* Rename and add the missing "i"

* our bidder supports native (or it will)

* Updated dianomiAdapter

* dianomi adapter update endpoint and smartadId paramter

* removed nested request in buildRequests/native object to align better with ortb native 1.2

* dianomi adapter upddate, remove native {request} nesting

* update md, tried to make it similar to adform's

* updated urls to live endpoints

* a couple little tweaks to md

* added userSync and allow changing of endpoint

* updated Maintainer email

* added tests, need to look at coppa tests still as not sure if we should be testing that

* couple of test changes

* small change to tests

* switched to v7

Co-authored-by: Michael Stevens <[email protected]>
Co-authored-by: Chris Almeida-Symons <[email protected]>
Co-authored-by: Martin Hill <[email protected]>
bwhisp pushed a commit to bwhisp/Prebid.js that referenced this pull request Jul 13, 2022
* start of dianomi adapter

* improving adapter

* Rename and add the missing "i"

* our bidder supports native (or it will)

* Updated dianomiAdapter

* dianomi adapter update endpoint and smartadId paramter

* removed nested request in buildRequests/native object to align better with ortb native 1.2

* dianomi adapter upddate, remove native {request} nesting

* update md, tried to make it similar to adform's

* updated urls to live endpoints

* a couple little tweaks to md

* added userSync and allow changing of endpoint

* updated Maintainer email

* added tests, need to look at coppa tests still as not sure if we should be testing that

* couple of test changes

* small change to tests

* switched to v7

Co-authored-by: Michael Stevens <[email protected]>
Co-authored-by: Chris Almeida-Symons <[email protected]>
Co-authored-by: Martin Hill <[email protected]>
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.

5 participants