modules/brainyBidAdapter.js
function (brainyResponseObj, request) {
    var bidResponses = [];
    var bidRequest = request.bidRequest;
    var responseBody = brainyResponseObj ? brainyResponseObj.body : {};

    bidResponses.push({
      requestId: bidRequest.bidId,
      cpm: responseBody.cpm || 0,
      width: responseBody.width,
      height: responseBody.height,
      creativeId: responseBody.adID,
      currency: 'USD',
      netRevenue: true,
      ttl: 1000,
      mediaType: BANNER,
      ad: responseBody.src
    });

    return bidResponses;
  }
function (brainyResponseObj, request) {
    var bidResponses = [];
    var bidRequest = request.bidRequest;
    var responseBody = brainyResponseObj ? brainyResponseObj.body : {};

    bidResponses.push({
      requestId: bidRequest.bidId,
      cpm: responseBody.cpm || 0,
      width: responseBody.width,
      height: responseBody.height,
      creativeId: responseBody.adID,
      currency: 'USD',
      netRevenue: true,
      ttl: 1000,
      mediaType: BANNER,
      ad: responseBody.src
    });

    return bidResponses;
  }
function ( brainyResponseObj , request ) { var bidResponses = [ ] ; var bidRequest = request . bidRequest ; var responseBody = brainyResponseObj ? brainyResponseObj . body : { } ; bidResponses . push ( { requestId : bidRequest . bidId , cpm : responseBody . cpm || 0 , width : responseBody . width , height : responseBody . height , creativeId : responseBody . adID , currency : 'USD' , netRevenue : true , ttl : 1000 , mediaType : BANNER , ad : responseBody . src } ) ; return bidResponses ; }
Format brainy responses as Prebid bid responses
@param  {String} brainyResponseObj A successful response from brainy.
@param  {object} request           Object received from web page
@return {object}                   An array of formatted bids.
 
brainySSPからのレスポンスを解釈するメソッド
@param  {String} brainyResponseObj SSPから受け取った文字列
@param  {object} request           メディアから受け取ったオブジェクト
@return {object}                   分解、再格納したbidResponses
Format brainy responses as Prebid bid responses