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

Adtelligent bid adapter updated to v3.0 #4703

Merged
merged 10 commits into from
Jan 23, 2020

Conversation

GeneGenie
Copy link
Contributor

Type of change

  • AdtelligentBidAdapter support for 3.0

Description of change

Remove deprecated code
Tests updated
Do not trigger same usersyncs across all auctions

Copy link
Collaborator

@jaiminpanchal27 jaiminpanchal27 left a comment

Choose a reason for hiding this comment

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

Overall looks good. Some minor changes requested. Thanks

import {Renderer} from '../src/Renderer';
import findIndex from 'core-js/library/fn/array/find-index';

const URL = '//hb.adtelligent.com/auction/';
Copy link
Collaborator

Choose a reason for hiding this comment

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

All endpoints has to be secure in 3.0. Please add https

import {Renderer} from '../src/Renderer';
import findIndex from 'core-js/library/fn/array/find-index';

const URL = '//hb.adtelligent.com/auction/';
Copy link
Collaborator

Choose a reason for hiding this comment

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

All endpoints are required to be secure in Prebid 3.0. Please update your endpoints

}

serverResponse.bids.forEach(serverBid => {
const requestId = findIndex(bidderRequest.bids, (bidRequest) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any strong reason to use find-index from core-js. We have a white list of core-js modules here https://github.com/prebid/Prebid.js/blob/master/allowedModules.js#L2
Can you update the logic ?
Also, we have a custom eslint rule but not sure why it did not catch this import. I will look into this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, just left from previous dev =)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, can i use Array.prototype.findIndex ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@GeneGenie Array.prototype.findIndex does not support Internet explorer and hence the previous dev used core-js to support IE. I would suggest to use find from core-js

Here is the updated code which worked fine on my test page. Do test in on your end as well.

const request = find(bidderRequest.bids, (bidRequest) => {
      return bidRequest.bidId === serverBid.requestId;
    });

    if (serverBid.cpm !== 0 && request !== undefined) {
      const bid = createBid(serverBid, getMediaType(request));

      bids.push(bid);
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@jaiminpanchal27 jaiminpanchal27 merged commit 5a1863e into prebid:master Jan 23, 2020
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.

3 participants