Skip to content

Commit

Permalink
2.5 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
visavi committed Oct 22, 2019
0 parents commit ac7f5e7
Show file tree
Hide file tree
Showing 115 changed files with 15,042 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
vendor
composer.lock
!.gitkeep
675 changes: 675 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# OpenRTB
iab, RTB Project, OpenRTB Specification 2.5

## Example
```
$imp = new Imp();
$imp->setId('1');
$video = new Video();
$video->setMimes(
[
'video/mp4',
'application/x-shockwave-flash',
'application/javascript',
'video/webm',
'video/mpg'
]
)
->setMinduration(1);
->setMaxduration(120);
->setProtocols([2, 3, 5, 6, 7, 8]);
->setW(576);
->setH(320);
->setLinearity(2);
->setSkip(1);
$imp->setVideo($video);
$bidRequest = new BidRequest();
$bidRequest
->setId('test-id')
->addImp($imp);
$request = json_encode($bidRequest->toArray());
```
33 changes: 33 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "visavi/openrtb",
"type": "library",
"description": "OpenRTB specification",
"keywords": ["openrtb"],
"license": "GPL-2.0",
"authors": [
{
"name": "Alexander Grigorev",
"email": "admin@visavi.net",
"homepage": "https://visavi.net"
}
],
"require": {
"ext-json": "*",
"php": ">=7.2"
},
"require-dev": {
"phpunit/phpunit": "8.3.5"
},
"autoload": {
"psr-4": {
"OpenRtb\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"OpenRtb\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
7 changes: 7 additions & 0 deletions phpunit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');

require('vendor/autoload.php');
11 changes: 11 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
colors="true"
bootstrap="phpunit.php">
<testsuites>
<testsuite name="adserver">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
Loading

0 comments on commit ac7f5e7

Please sign in to comment.