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

Vidazoo bid adapter #1916

Merged
merged 11 commits into from
Jan 25, 2018
Merged

Vidazoo bid adapter #1916

merged 11 commits into from
Jan 25, 2018

Conversation

thewizarodofoz
Copy link
Contributor

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other

Description of change

test parameters for validating bids

{
  bidder: 'vidazoo',
    params: {
    cId: '5a1c419d95fce900044c334e',
    pId: '59ac17c192832d0011283fe3',
    bidFloor: 0.0001
  }
}

contact email of the adapter’s maintainer: devs@vidazoo.com
*official adapter submission

Other information

@matthewlane matthewlane self-requested a review December 5, 2017 17:56
@matthewlane matthewlane self-assigned this Dec 5, 2017
});

it('should take default TTL', () => {
const serverResponse = utils.cloneJson(SERVER_RESPONSE);
Copy link
Collaborator

@matthewlane matthewlane Dec 5, 2017

Choose a reason for hiding this comment

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

In #1910 utils.cloneJson was renamed to utils.deepClone, updating this line should get the test passing again

try {
return [{
requestId: bidId,
bidderCode: BIDDER_CODE,
Copy link
Collaborator

Choose a reason for hiding this comment

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

bidderCode will be set automatically by bidderFactory now, this line can be dropped

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matthewlane How will bidderFactory know our bidderCode?

Copy link
Contributor

@dbemiller dbemiller Dec 11, 2017

Choose a reason for hiding this comment

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

you call:

registerBidder({
  code: BIDDER_CODE,
  ...
})

It keeps track internally.

@thewizarodofoz
Copy link
Contributor Author

@matthewlane @dbemiller Thanks for all you help - tests are now passing. Anything else you need from me?

@matthewlane
Copy link
Collaborator

matthewlane commented Dec 19, 2017

@thewizarodofoz Changes look good. Currently getting back a 204 No Content response from this adapter's endpoint though, we check this to validate bid responses, please advise

@thewizarodofoz
Copy link
Contributor Author

@matthewlane Please use these params:

bids: [{
  bidder: 'vidazoo',
  params: {
    cId: '5a3a543645ea6b0004869360',
    pId: '59ac17c192832d0011283fe3',
    bidFloor: 0.0001
  }
}]

They will return a valid response.

@thewizarodofoz
Copy link
Contributor Author

@jaiminpanchal27 Do you need anything from us? Anything we can do to finish this up?

@mkendall07
Copy link
Member

@thewizarodofoz
Please submit a PR to the docs repo to add a file for your adapter to the bidders directory so your adapter's params will appear on the bidders page.

@thewizarodofoz
Copy link
Contributor Author

@thewizarodofoz
Copy link
Contributor Author

@mkendall07 any updates on this?

@thewizarodofoz
Copy link
Contributor Author

Hey @mkendall07, just wanted to let you know that @rmloveland commented on our docs pull request:

Hey @thewizarodofoz , we will be able to merge this once your bid adapter goes out in a Prebid.js release. This is necessary because we generate the download page on Prebid.org from the adapter docs.

So it's your move now :-)

const CURRENCY = 'USD';
const TTL_SECONDS = 60 * 5;
export const URL = '//prebid.cliipa.com';
// export const URL = '//localhost:8067';
Copy link
Member

Choose a reason for hiding this comment

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

dead code should be removed.

method: 'GET',
url: `${URL}/prebid/${cId}`,
data: {
width: size[0],
Copy link
Member

Choose a reason for hiding this comment

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

this may break for double size arrays (ie [[300,250]] ). See https://github.com/prebid/Prebid.js/blob/master/src/utils.js#L113 for help parsing. You can use this function.

}
});
});
return Object.values(syncs);
Copy link
Member

Choose a reason for hiding this comment

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

Object.values isn't supported yet. Please re-write.

@mkendall07 mkendall07 removed the request for review from jaiminpanchal27 January 17, 2018 02:56
@mkendall07
Copy link
Member

@thewizarodofoz
Left a few comments

removed dead code (debug url), handled sizes more safely, removed usage of Object.values
updates tests to fit changes in adapter
@thewizarodofoz
Copy link
Contributor Author

@mkendall07 Thanks! Waiting for your re-review.


it('should build request for each size', () => {
const requests = adapter.buildRequests([BID]);
console.log(JSON.stringify(requests));
Copy link
Collaborator

Choose a reason for hiding this comment

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

@thewizarodofoz remove console.log

@mkendall07 mkendall07 added this to the Prebid 1.3 release milestone Jan 24, 2018
@thewizarodofoz
Copy link
Contributor Author

@mkendall07 @jaiminpanchal27 good to go?

Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

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

LGTM

@mkendall07 mkendall07 merged commit 70781c9 into prebid:master Jan 25, 2018
@thewizarodofoz
Copy link
Contributor Author

Thanks for the support and coopororation everyone!

dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Adding Vidazoo bid adapter

* Adding Vidazoo bid adapter tests

* production url

* Update vidazooBidAdapter_spec.js

deepClone instead of cloneJson

* Update vidazooBidAdapter.js

* Update vidazooBidAdapter_spec.js

* Update vidazooBidAdapter.js

removed dead code (debug url), handled sizes more safely, removed usage of Object.values

* Update vidazooBidAdapter_spec.js

updates tests to fit changes in adapter

* Update vidazooBidAdapter.js

* Update vidazooBidAdapter.js

* Update vidazooBidAdapter_spec.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants