Skip to content

Commit 0fe0e27

Browse files
Vidazoo Adapter: New Omnidex and Tagoras Aliases (#4128)
1 parent c0769e1 commit 0fe0e27

12 files changed

+368
-0
lines changed

src/main/resources/bidder-config/vidazoo.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ adapters:
1515
url: https://sync.programmaticx.ai/api/user/html/685297194d85991a5e6e36dd?pbs=true&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}
1616
support-cors: false
1717
uid-macro: '${userId}'
18+
omnidex:
19+
endpoint: https://exchange.omni-dex.io/openrtb/
20+
usersync:
21+
enabled: true
22+
cookie-family-name: omnidex
23+
iframe:
24+
url: https://sync.omni-dex.io/api/user/html/6810d0c7f163277130f3d7a9?pbs=true&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}
25+
support-cors: false
26+
uid-macro: '${userId}'
27+
tagoras:
28+
endpoint: https://exchange.tagoras.io/openrtb/
29+
meta-info:
30+
maintainer-email: prebid@tagoras.io
31+
usersync:
32+
enabled: true
33+
cookie-family-name: tagoras
34+
iframe:
35+
url: https://sync.tagoras.io/api/user/html/6819bdc3e6bb44545c55f843?pbs=true&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&redirect={{redirect_url}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}
36+
support-cors: false
37+
uid-macro: '${userId}'
1838
endpoint-compression: gzip
1939
ortb-version: "2.6"
2040
meta-info:
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package org.prebid.server.it;
2+
3+
import io.restassured.response.Response;
4+
import org.json.JSONException;
5+
import org.junit.jupiter.api.Test;
6+
import org.prebid.server.model.Endpoint;
7+
8+
import java.io.IOException;
9+
import java.util.List;
10+
11+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
12+
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
13+
import static com.github.tomakehurst.wiremock.client.WireMock.post;
14+
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
15+
16+
public class OmnidexTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromOmnidex() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/omnidex-exchange/connectionId"))
22+
.withRequestBody(equalToJson(jsonFrom("openrtb2/omnidex/test-omnidex-bid-request.json")))
23+
.willReturn(aResponse().withBody(jsonFrom("openrtb2/omnidex/test-omnidex-bid-response.json"))));
24+
25+
// when
26+
final Response response = responseFor(
27+
"openrtb2/omnidex/test-auction-omnidex-request.json",
28+
Endpoint.openrtb2_auction
29+
);
30+
31+
// then
32+
assertJsonEquals("openrtb2/omnidex/test-auction-omnidex-response.json", response, List.of("omnidex"));
33+
}
34+
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package org.prebid.server.it;
2+
3+
import io.restassured.response.Response;
4+
import org.json.JSONException;
5+
import org.junit.jupiter.api.Test;
6+
import org.prebid.server.model.Endpoint;
7+
8+
import java.io.IOException;
9+
import java.util.List;
10+
11+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
12+
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
13+
import static com.github.tomakehurst.wiremock.client.WireMock.post;
14+
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
15+
16+
public class TagorasTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromTagoras() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/tagoras-exchange/connectionId"))
22+
.withRequestBody(equalToJson(jsonFrom("openrtb2/tagoras/test-tagoras-bid-request.json")))
23+
.willReturn(aResponse().withBody(jsonFrom("openrtb2/tagoras/test-tagoras-bid-response.json"))));
24+
25+
// when
26+
final Response response = responseFor(
27+
"openrtb2/tagoras/test-auction-tagoras-request.json",
28+
Endpoint.openrtb2_auction
29+
);
30+
31+
// then
32+
assertJsonEquals("openrtb2/tagoras/test-auction-tagoras-response.json", response, List.of("tagoras"));
33+
}
34+
35+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"secure": 1,
7+
"banner": {
8+
"w": 320,
9+
"h": 250
10+
},
11+
"ext": {
12+
"omnidex": {
13+
"cId": "connectionId"
14+
}
15+
}
16+
}
17+
],
18+
"tmax": 5000,
19+
"regs": {
20+
"ext": {
21+
"gdpr": 0
22+
}
23+
}
24+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"exp": 300,
10+
"price": 0.01,
11+
"adid": "2068416",
12+
"cid": "8048",
13+
"crid": "24080",
14+
"mtype": 1,
15+
"ext": {
16+
"prebid": {
17+
"type": "banner",
18+
"meta": {
19+
"adaptercode": "omnidex"
20+
}
21+
},
22+
"origbidcpm": 0.01
23+
}
24+
}
25+
],
26+
"seat": "omnidex",
27+
"group": 0
28+
}
29+
],
30+
"cur": "USD",
31+
"ext": {
32+
"responsetimemillis": {
33+
"omnidex": "{{ omnidex.response_time_ms }}"
34+
},
35+
"prebid": {
36+
"auctiontimestamp": 0
37+
},
38+
"tmaxrequest": 5000
39+
}
40+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"secure": 1,
7+
"banner": {
8+
"w": 320,
9+
"h": 250
10+
},
11+
"ext": {
12+
"tid": "${json-unit.any-string}",
13+
"bidder": {
14+
"cId": "connectionId"
15+
}
16+
}
17+
}
18+
],
19+
"source": {
20+
"tid": "${json-unit.any-string}"
21+
},
22+
"site": {
23+
"domain": "www.example.com",
24+
"page": "http://www.example.com",
25+
"publisher": {
26+
"domain": "example.com"
27+
},
28+
"ext": {
29+
"amp": 0
30+
}
31+
},
32+
"device": {
33+
"ua": "userAgent",
34+
"ip": "193.168.244.1"
35+
},
36+
"at": 1,
37+
"tmax": "${json-unit.any-number}",
38+
"cur": [
39+
"USD"
40+
],
41+
"regs": {
42+
"gdpr": 0
43+
},
44+
"ext": {
45+
"prebid": {
46+
"server": {
47+
"externalurl": "http://localhost:8080",
48+
"gvlid": 1,
49+
"datacenter": "local",
50+
"endpoint": "/openrtb2/auction"
51+
}
52+
}
53+
}
54+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"id": "tid",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"crid": "24080",
8+
"adid": "2068416",
9+
"price": 0.01,
10+
"id": "bid_id",
11+
"impid": "imp_id",
12+
"cid": "8048",
13+
"mtype": 1
14+
}
15+
],
16+
"type": "banner"
17+
}
18+
]
19+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"secure": 1,
7+
"banner": {
8+
"w": 320,
9+
"h": 250
10+
},
11+
"ext": {
12+
"tagoras": {
13+
"cId": "connectionId"
14+
}
15+
}
16+
}
17+
],
18+
"tmax": 5000,
19+
"regs": {
20+
"ext": {
21+
"gdpr": 0
22+
}
23+
}
24+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"exp": 300,
10+
"price": 0.01,
11+
"adid": "2068416",
12+
"cid": "8048",
13+
"crid": "24080",
14+
"mtype": 1,
15+
"ext": {
16+
"prebid": {
17+
"type": "banner",
18+
"meta": {
19+
"adaptercode": "tagoras"
20+
}
21+
},
22+
"origbidcpm": 0.01
23+
}
24+
}
25+
],
26+
"seat": "tagoras",
27+
"group": 0
28+
}
29+
],
30+
"cur": "USD",
31+
"ext": {
32+
"responsetimemillis": {
33+
"tagoras": "{{ tagoras.response_time_ms }}"
34+
},
35+
"prebid": {
36+
"auctiontimestamp": 0
37+
},
38+
"tmaxrequest": 5000
39+
}
40+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"id": "request_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"secure": 1,
7+
"banner": {
8+
"w": 320,
9+
"h": 250
10+
},
11+
"ext": {
12+
"tid": "${json-unit.any-string}",
13+
"bidder": {
14+
"cId": "connectionId"
15+
}
16+
}
17+
}
18+
],
19+
"source": {
20+
"tid": "${json-unit.any-string}"
21+
},
22+
"site": {
23+
"domain": "www.example.com",
24+
"page": "http://www.example.com",
25+
"publisher": {
26+
"domain": "example.com"
27+
},
28+
"ext": {
29+
"amp": 0
30+
}
31+
},
32+
"device": {
33+
"ua": "userAgent",
34+
"ip": "193.168.244.1"
35+
},
36+
"at": 1,
37+
"tmax": "${json-unit.any-number}",
38+
"cur": [
39+
"USD"
40+
],
41+
"regs": {
42+
"gdpr": 0
43+
},
44+
"ext": {
45+
"prebid": {
46+
"server": {
47+
"externalurl": "http://localhost:8080",
48+
"gvlid": 1,
49+
"datacenter": "local",
50+
"endpoint": "/openrtb2/auction"
51+
}
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)