modules/lifestreetBidAdapter.js
function formatBidRequest(bid, bidderRequest) {
  let url = urlTemplate({
    adapter: 'prebid',
    slot: bid.params.slot,
    adkey: bid.params.adkey,
    ad_size: bid.params.ad_size,
    location: encodeURIComponent(utils.getTopWindowLocation()),
    referrer: encodeURIComponent(utils.getTopWindowReferrer()),
    wn: boolToString(/fb_http/i.test(window.name)),
    sf: boolToString(window['sfAPI'] || window['$sf']),
    fif: boolToString(window['inDapIF'] === true),
    if: boolToString(window !== window.top),
    stamp: new Date().getTime(),
    hbver: ADAPTER_VERSION
  });

  if (bidderRequest && bidderRequest.gdprConsent) {
    if (bidderRequest.gdprConsent.gdprApplies !== undefined) {
      const gdpr = '&__gdpr=' + (bidderRequest.gdprConsent.gdprApplies ? '1' : '0');
      url += gdpr;
    }
    if (bidderRequest.gdprConsent.consentString !== undefined) {
      url += '&__consent=' + bidderRequest.gdprConsent.consentString;
    }
  }

  return {
    method: 'GET',
    url: url,
    bidId: bid.bidId
  };
}
function formatBidRequest(bid, bidderRequest) {
  let url = urlTemplate({
    adapter: 'prebid',
    slot: bid.params.slot,
    adkey: bid.params.adkey,
    ad_size: bid.params.ad_size,
    location: encodeURIComponent(utils.getTopWindowLocation()),
    referrer: encodeURIComponent(utils.getTopWindowReferrer()),
    wn: boolToString(/fb_http/i.test(window.name)),
    sf: boolToString(window['sfAPI'] || window['$sf']),
    fif: boolToString(window['inDapIF'] === true),
    if: boolToString(window !== window.top),
    stamp: new Date().getTime(),
    hbver: ADAPTER_VERSION
  });

  if (bidderRequest && bidderRequest.gdprConsent) {
    if (bidderRequest.gdprConsent.gdprApplies !== undefined) {
      const gdpr = '&__gdpr=' + (bidderRequest.gdprConsent.gdprApplies ? '1' : '0');
      url += gdpr;
    }
    if (bidderRequest.gdprConsent.consentString !== undefined) {
      url += '&__consent=' + bidderRequest.gdprConsent.consentString;
    }
  }

  return {
    method: 'GET',
    url: url,
    bidId: bid.bidId
  };
}
function formatBidRequest ( bid , bidderRequest ) { let url = urlTemplate ( { adapter : 'prebid' , slot : bid . params . slot , adkey : bid . params . adkey , ad_size : bid . params . ad_size , location : encodeURIComponent ( utils . getTopWindowLocation ( ) ) , referrer : encodeURIComponent ( utils . getTopWindowReferrer ( ) ) , wn : boolToString ( / fb_http / i . test ( window . name ) ) , sf : boolToString ( window [ 'sfAPI' ] || window [ '$sf' ] ) , fif : boolToString ( window [ 'inDapIF' ] === true ) , if : boolToString ( window !== window . top ) , stamp : new Date ( ) . getTime ( ) , hbver : ADAPTER_VERSION } ) ; if ( bidderRequest && bidderRequest . gdprConsent ) { if ( bidderRequest . gdprConsent . gdprApplies !== undefined ) { const gdpr = '&__gdpr=' + ( bidderRequest . gdprConsent . gdprApplies ? '1' : '0' ) ; url += gdpr ; } if ( bidderRequest . gdprConsent . consentString !== undefined ) { url += '&__consent=' + bidderRequest . gdprConsent . consentString ; } } return { method : 'GET' , url : url , bidId : bid . bidId } ; }
Creates a bid requests for a given bid.

@param {BidRequest} bid The bid params to use for formatting a request
Creates a bid requests for a given bid .