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

Unruly Bid Adapter: consolidated adapter with RhythmOne #7073

Merged
merged 11 commits into from
Jul 1, 2021

Conversation

opeledtremor
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

This is a consolidated adapter between the Unruly adapter and the RhythmOne Adapter.
now the unruly adapter support instream, outstream and banner.
list of changes:

  • change to request format to support the new endpoint + support multiple requests.
  • added support to handle banner/instream/outstream bid response.
  • updated the bid validations.
  • removed the user syncing from client since now it is handled on the backend side.
  • added support for the bidFloor module.
  • added relevant unit tests.
  • test parameters for validating bids:
[
          {
            "code": "video2",
            "mediaTypes": {
              "video": {
                "context": "outstream",
                "mimes": [
                "video/mp4"
                 ],
                "playerSize": [
                  [
                    640,
                    480
                  ]
                ]
              }
            },
            "bids": [
              {
                "bidder": "unruly",
                "params": {
                  "siteId": 212337,
                  "featureOverrides": {
                        "canRunUnmissable": true
                    }
                }
              }
            ]
          },
          {
            "code": "banner1",
            "mediaTypes": {
              "banner": {
                "sizes": [
                  [300, 250]
                ]
              }
            },
            "bids": [
              {
                "bidder": "unruly",
                "params": {
                  "siteId": 233261
                }
              }
            ]
          },
          {
            "code": "video1",
            "mediaTypes": {
              "video": {
                "context": "instream",
                "mimes": [
                  "video/mp4"
                ],
                "playerSize": [
                  [
                    640,
                    480
                  ]
                ]
              }
            },
            "bids": [
              {
                "bidder": "unruly",
                "params": {
                  "siteId": 233261
                }
              }
            ]
          }
        ]

opeledtremor and others added 10 commits June 3, 2021 12:00
* Finished the request and bid validation side

* removed the user sync since now the backend is responsible for that.
* Finished handling the response now the adapter supports banner/instream/outstream
* fixed the unit tests for the outstream response part (still missing new unit tests for instream and banner)
* added new unit tests for instream and banner
* changed the endpoint to the new endpoint

* unitTests indentations
* Added missing semicolons
* added the ability to overwrite the end point for testing reasons.
* removed the floorInfo object and changed it to floor
* added more unit tests
* added unmissable configuration to md file
* added check in instream if the response has vastUrl or vastXml + unit test
* Updated the md file to product request
@ChrisHuie ChrisHuie changed the title Unruly r1 consolidated adapter Unruly Bid Adapter: consolidated adapter with RhythmOne Jun 22, 2021
@jsnellbaker jsnellbaker requested a review from Fawke June 22, 2021 13:56
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 @opeledtremor, looks good overall, just a couple things you can take a look at.

},

buildRequests: function (validBidRequests, bidderRequest) {
let endPoint = '//targeting.unrulymedia.com/unruly_prebid';
Copy link
Contributor

Choose a reason for hiding this comment

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

Please hardcode to https://

Copy link
Contributor

Choose a reason for hiding this comment

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

Pushed the requested change (adding https to the endpoint).

options
Object.keys(requestBySiteId).forEach((key) => {
let data = {
bidderRequest: Object.assign({}, {bids: requestBySiteId[key], invalidBidsCount, ...bidderRequestData})
Copy link
Contributor

Choose a reason for hiding this comment

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

I am all for using the object spread syntax but just letting you know it won't work in IE11.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it does get transpiled to es5, so I guess, it's fine.

* added https for the endpoint as requested from prebid reviewer.
@Fawke Fawke added LGTM and removed needs review labels Jul 1, 2021
@Fawke Fawke merged commit 92be579 into prebid:master Jul 1, 2021
prebidtappx pushed a commit to prebidtappx/Prebid.js that referenced this pull request Nov 15, 2021
* Unruly and RhythmOne consolidated adapter - first commit
* Finished the request and bid validation side

* removed the user sync since now the backend is responsible for that.

* Unruly and RhythmOne consolidated adapter - second commit
* Finished handling the response now the adapter supports banner/instream/outstream

* Unruly and RhythmOne consolidated adapter - third commit
* fixed the unit tests for the outstream response part (still missing new unit tests for instream and banner)

* Unruly and RhythmOne consolidated adapter -
* added new unit tests for instream and banner

* Unruly and RhythmOne consolidated adapter
* changed the endpoint to the new endpoint

* unitTests indentations

* Unruly and RhythmOne consolidated adapter
* Added missing semicolons

* Unruly and RhythmOne consolidated adapter
* fixes after code review

* Unruly and RhythmOne consolidated adapter
* added the ability to overwrite the end point for testing reasons.
* removed the floorInfo object and changed it to floor
* added more unit tests
* added unmissable configuration to md file

* Unruly and RhythmOne consolidated adapter
* added check in instream if the response has vastUrl or vastXml + unit test

* Unruly and RhythmOne consolidated adapter
* Updated the md file to product request

* Unruly and RhythmOne consolidated adapter -
* added https for the endpoint as requested from prebid reviewer.

Co-authored-by: Tal Lavon <tlavon@tremorvideo.com>
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.

None yet

5 participants