Skip to content

Companionads don't work #2

@simoheinonen

Description

@simoheinonen
<?php

require_once 'vendor/autoload.php';

use PowerLinks\OpenRtb\BidRequest\BidRequest;
use PowerLinks\OpenRtb\Hydrator;

$json = <<< JSON
{
  "id": "foo",
  "imp": [
    {
      "id": "1",
      "video": {
        "companionad": [
          {
            "w": 0,
            "h": 0,
            "mimes": [
              "image/gif",
              "image/jpeg",
              "image/png",
              "video/x-flv"
            ]
          }
        ]
      }
    }
  ]
}
JSON;

/** @var BidRequest $bidRequest */
$bidRequest = Hydrator::hydrate(json_decode($json, true), new BidRequest());

// Throws "Exception: Class PowerLinks\OpenRtb\BidRequest\Companionad does not exist"

From https://www.iab.com/wp-content/uploads/2015/06/OpenRTB-API-Specification-Version-2-3.pdf

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions