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

Update Cox Bid Adapter For 1.0+ #2446

Merged
merged 4 commits into from
May 23, 2018
Merged

Conversation

reynold-cox
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

Updating the Cox bid adapter to be 1.0+ compliant.

  • test parameters for validating bids
{
  bidder: 'cox',
  params: {
    size: '300x250',
    id: 2000005991707,
    siteId: 2000100948180
  }
}

@bretg
Copy link
Collaborator

bretg commented Apr 26, 2018

Please submit a PR to update https://github.com/prebid/prebid.github.io/blob/master/dev-docs/bidders/cox.md to add prebid_1_0_supported : true into the header section.

@mike-chowla
Copy link
Contributor

I'm trying to figure out if the state variables in helper object are functioning as global variables. I think they are. If the bidder gets instantiated twice, it looks to me that both instances of the bidder are going to refer to the same helper object.

Is that what is going to happen or am I getting this wrong?

@mike-chowla
Copy link
Contributor

@reynold-cox if you could answer my questions bout helper object variables, that would get this moving along

@reynold-cox
Copy link
Contributor Author

reynold-cox commented Apr 30, 2018 via email

@mike-chowla
Copy link
Contributor

@reynold-cox to pass state between buildRequests & interpretResponse you can additional fields to return object from buildRequests as that object will get passed back to interpretResponse

@mike-chowla
Copy link
Contributor

Your server is sending back two Access-Control-Allow-Origin headers which is causing Chrome to reject the response

screen shot 2018-04-30 at 4 04 23 pm

screen shot 2018-04-30 at 4 05 07 pm

@mike-chowla
Copy link
Contributor

I'm also seeing an error from getUserSyncs()

screen shot 2018-04-30 at 4 14 59 pm

screen shot 2018-04-30 at 4 15 12 pm

Copy link
Contributor

@mike-chowla mike-chowla left a comment

Choose a reason for hiding this comment

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

3 things to fix:

(1) Global variables in helper object
(2) Access-Control-Allow-Origin error
(3) getUserSyncs() error on body parameter

};

// State variables
let env = '';
Copy link
Contributor

Choose a reason for hiding this comment

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

These variables are acting as global variables.

Bidder Requirements:
Support multiple instances: All adapters must support the creation of multiple concurrent instances. This means, for example, that adapters cannot rely on mutable global variables.

@reynold-cox
Copy link
Contributor Author

reynold-cox commented Apr 30, 2018 via email

@stale
Copy link

stale bot commented May 15, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 15, 2018
@bretg bretg removed the needs docs label May 18, 2018
@stale stale bot removed the stale label May 18, 2018
@reynold-cox
Copy link
Contributor Author

Sorry about the delay. Thanks.

@mike-chowla mike-chowla merged commit 2a6e5f4 into prebid:master May 23, 2018
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Bid adapter for 1.0+

* Tests for cox bid adapter

* Corrected how state is handled

* Added test for multiple bids
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
* Bid adapter for 1.0+

* Tests for cox bid adapter

* Corrected how state is handled

* Added test for multiple bids
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.

3 participants