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

vi bid adapter #2020

Merged
merged 12 commits into from
Jan 22, 2018
Merged

vi bid adapter #2020

merged 12 commits into from
Jan 22, 2018

Conversation

SnoopInf
Copy link
Contributor

@SnoopInf SnoopInf commented Jan 9, 2018

Type of change

  • [ X ] New bidder adapter

Description of change

vi bid adapter

  • test parameters for validating bids
{
   bidder: 'vi',
   params: {
            pubId: 'sb_test',
            lang: 'en-US',
            cat: 'IAB1',
	        bidFloor: 0.05 //optional
  }
}
  • contact email of the adapter’s maintainer
    [email protected]

  • [ X ] official adapter submission

Other information

prebid/prebid.github.io#537

Copy link
Collaborator

@matthewlane matthewlane left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, a few changes requested below

import { expect } from 'chai';
import { spec } from 'modules/viBidAdapter';
import { newBidder } from 'src/adapters/bidderFactory';
import { REPO_AND_VERSION } from 'src/constants';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This import isn't used in the test, line can be dropped

requestId: bid.id,
cpm: parseFloat(bid.price),
width: parseInt(bid.width),
height: parseInt(bid.height),
Copy link
Collaborator

Choose a reason for hiding this comment

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

A radix (likely, 10) should be specified as the second argument to the above two parseInts to guarantee predictable behavior

@matthewlane
Copy link
Collaborator

Docs PR for this adapter at prebid/prebid.github.io#537

@SnoopInf
Copy link
Contributor Author

Removed import and added radix

Copy link
Collaborator

@matthewlane matthewlane left a comment

Choose a reason for hiding this comment

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

Updates look good, missed one thing in my initial review, noted below

utils._each(bidReqs, function (bid) {
imps.push({
id: bid.bidId,
sizes: bid.sizes,
Copy link
Collaborator

Choose a reason for hiding this comment

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

ad unit sizes may be defined as a double array ([[320, 480]]) or single array ([320, 480]). In the case of single sizes, your endpoint is erroring out with 400 (Invalid JSON: Cannot deserialize instance of int[] out of VALUE_NUMBER_INT, but utils.parseSizesInput can help. Something like

utils.parseSizesInput(bid.sizes).map(size => size.split('x'))

though feel free handle it however you'd like

@matthewlane matthewlane removed their assignment Jan 19, 2018
@ndhimehta
Copy link

Assigning to @snapwich for a second round of review.

Copy link
Collaborator

@snapwich snapwich left a comment

Choose a reason for hiding this comment

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

I dunno, I'm more of a emacsBidAdapter kind of guy. Just kidding, LGTM!

@matthewlane matthewlane merged commit 6456959 into prebid:master Jan 22, 2018
@SnoopInf SnoopInf deleted the dev branch January 23, 2018 08:31
@SnoopInf
Copy link
Contributor Author

Thank you guys!
What's our next action? how to make plugin listed on Prebid.js web site?

Millerrok pushed a commit to Vertamedia/Prebid.js that referenced this pull request Jan 23, 2018
* 'master' of https://github.com/prebid/Prebid.js: (23 commits)
  Update Atomx adapter for Prebid v1.0 (prebid#2026)
  Add vi bid adapter (prebid#2020)
  Add eplanningBidAdapter (prebid#2003)
  OpenX Adapter: Update to support mediaTypes field, instead of the deprecated mediaType field (prebid#1974)
  Separate bids & won calls (prebid#2015)
  1.0 adapter support for mantis (prebid#1840)
  Media.net adapter added (prebid#2038)
  GumGum Adapter for Prebid.js 1.0 (prebid#1966)
  Serverbid Bid Adapter: updated docs and ad sizes (prebid#2023)
  Adding districtm as an alias (prebid#2018)
  Use sudo to workaround Travis regression (prebid#2041)
  Fix uncached video bids triggering callback early (prebid#2017)
  Re-implemented RhythmOne audit beacon in prebid 1.0 interface (prebid#1953)
  Add NasmediaAdmixer adapter for Perbid.js 1.0 (prebid#1937)
  Update Adform adapter to Prebid v1.0 (prebid#1947)
  Upgrade Admixer adapter for Prebid 1.0 (prebid#1755)
  multiformat size validation checks (prebid#1964)
  Gjirafa Bidder Adapter (prebid#1944)
  pin gulp-connect at non-broken version (prebid#2008)
  Added dynamic ttl property for One Display and One Mobile. (prebid#2004)
  ...
@matthewlane
Copy link
Collaborator

@SnoopInf This adapter will be in the next Prebid release, which should be happening this week. When that happens we'll merge the docs PR and vi will be listed on the site. Thanks for contributing to the project 👍

dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* VI prebid.js adapter (points dev platform)

* fix typo

* Changed maintainer email

* Added test parameters

* Changed bidder hostname to pb.vi-serve.com

* updated doc

* Update viBidAdapter.md

* VI bid adapter - tests

* Removed unused import from spec, specified radix in parseInt

* handling of various sizes formats
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