Skip to content

Commit 4849c10

Browse files
Vidazoo Adapter: New Progx Alias (prebid#4098)
1 parent 25558ab commit 4849c10

7 files changed

Lines changed: 188 additions & 0 deletions

File tree

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
adapters:
22
vidazoo:
33
endpoint: https://prebidsrvr.cootlogix.com/openrtb/
4+
aliases:
5+
progx:
6+
enabled: false
7+
endpoint: https://exchange.programmaticx.ai/openrtb/
8+
meta-info:
9+
maintainer-email: pxteam@programmaticx.ai
10+
vendor-id: 1344
11+
usersync:
12+
enabled: true
13+
cookie-family-name: progx
14+
iframe:
15+
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}}
16+
support-cors: false
17+
uid-macro: '${userId}'
418
endpoint-compression: gzip
519
ortb-version: "2.6"
620
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 ProgxTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromProgx() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/progx-exchange/connectionId"))
22+
.withRequestBody(equalToJson(jsonFrom("openrtb2/progx/test-progx-bid-request.json")))
23+
.willReturn(aResponse().withBody(jsonFrom("openrtb2/progx/test-progx-bid-response.json"))));
24+
25+
// when
26+
final Response response = responseFor(
27+
"openrtb2/progx/test-auction-progx-request.json",
28+
Endpoint.openrtb2_auction
29+
);
30+
31+
// then
32+
assertJsonEquals("openrtb2/progx/test-auction-progx-response.json", response, List.of("progx"));
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+
"progx": {
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": "progx"
20+
}
21+
},
22+
"origbidcpm": 0.01
23+
}
24+
}
25+
],
26+
"seat": "progx",
27+
"group": 0
28+
}
29+
],
30+
"cur": "USD",
31+
"ext": {
32+
"responsetimemillis": {
33+
"progx": "{{ progx.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+
}

src/test/resources/org/prebid/server/it/test-application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,8 @@ adapters.xeworks.aliases.connektai.enabled=true
598598
adapters.xeworks.aliases.connektai.endpoint=http://localhost:8090/connektai-exchange
599599
adapters.vidazoo.enabled=true
600600
adapters.vidazoo.endpoint=http://localhost:8090/vidazoo-exchange/
601+
adapters.vidazoo.aliases.progx.enabled=true
602+
adapters.vidazoo.aliases.progx.endpoint=http://localhost:8090/progx-exchange/
601603
adapters.videobyte.enabled=true
602604
adapters.videobyte.endpoint=http://localhost:8090/videobyte-exchange
603605
adapters.videoheroes.enabled=true

0 commit comments

Comments
 (0)