Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/main/resources/bidder-config/xeworks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ adapters:
endpoint: http://rtb.connektai.live/?pid={{SourceId}}&host={{Host}}&s=pbs
meta-info:
maintainer-email: adops@connekt.ai
adipolo:
enabled: false
endpoint: http://rtb.adipolo.live?pid={{SourceId}}&host={{Host}}&pbs=1
meta-info:
maintainer-email: smart@adipolo.com
usersync:
enabled: true
cookie-family-name: adipolo
redirect:
url: https://sync.adipolo.live/psync?t=s&e=0&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&cb={{redirect_url}}
support-cors: false
uid-macro: '$UID'
iframe:
url: https://sync.adipolo.live/static/adisync.html?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&cb={{redirect_url}}
support-cors: false
uid-macro: '$UID'
meta-info:
maintainer-email: team@xe.works
app-media-types:
Expand Down
35 changes: 35 additions & 0 deletions src/test/java/org/prebid/server/it/AdipoloTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.prebid.server.it;

import io.restassured.response.Response;
import org.json.JSONException;
import org.junit.jupiter.api.Test;
import org.prebid.server.model.Endpoint;

import java.io.IOException;

import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static java.util.Collections.singletonList;

public class AdipoloTest extends IntegrationTest {

@Test
public void openrtb2AuctionShouldRespondWithBidsFromAdipolo() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/adipolo-exchange"))
.withRequestBody(equalToJson(
jsonFrom("openrtb2/adipolo/test-adipolo-bid-request.json")))
.willReturn(aResponse().withBody(
jsonFrom("openrtb2/adipolo/test-adipolo-bid-response.json"))));

// when
final Response response = responseFor("openrtb2/adipolo/test-auction-adipolo-request.json",
Endpoint.openrtb2_auction);

// then
assertJsonEquals("openrtb2/adipolo/test-auction-adipolo-response.json", response,
singletonList("adipolo"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"secure": 1,
"banner": {
"w": 300,
"h": 250
},
"ext": {
"tid": "${json-unit.any-string}",
"bidder": {
"env": "envValue",
"pid": "pidValue"
}
}
}
],
"source": {
"tid": "${json-unit.any-string}"
},
"site": {
"domain": "www.example.com",
"page": "http://www.example.com",
"publisher": {
"domain": "example.com"
},
"ext": {
"amp": 0
}
},
"device": {
"ua": "userAgent",
"ip": "193.168.244.1"
},
"at": 1,
"tmax": "${json-unit.any-number}",
"regs": {
"ext": {
"gdpr": 0
}
},
"cur": [
"USD"
],
"ext": {
"prebid": {
"server": {
"externalurl": "http://localhost:8080",
"gvlid": 1,
"datacenter": "local",
"endpoint": "/openrtb2/auction"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"adm": "some adm value",
"price": 10,
"adomain": [],
"crid": "test-creative-id-1",
"ext": {
"prebid": {
"type": "banner"
}
}
}
]
}
],
"cur": "EUR"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"ext": {
"adipolo": {
"env": "envValue",
"pid": "pidValue"
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"exp": 300,
"price": 11.393,
"adm": "some adm value",
"adomain": [
],
"crid": "test-creative-id-1",
"ext": {
"prebid": {
"type": "banner",
"meta": {
"adaptercode": "adipolo"
}
},
"origbidcpm": 10,
"origbidcur": "EUR"
}
}
],
"seat": "adipolo",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"adipolo": "{{ adipolo.response_time_ms }}"
},
"tmaxrequest": 5000,
"prebid": {
"auctiontimestamp": 0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,8 @@ adapters.xeworks.enabled=true
adapters.xeworks.endpoint=http://localhost:8090/xeworks-exchange
adapters.xeworks.aliases.connektai.enabled=true
adapters.xeworks.aliases.connektai.endpoint=http://localhost:8090/connektai-exchange
adapters.xeworks.aliases.adipolo.enabled=true
adapters.xeworks.aliases.adipolo.endpoint=http://localhost:8090/adipolo-exchange
adapters.vidazoo.enabled=true
adapters.vidazoo.endpoint=http://localhost:8090/vidazoo-exchange/
adapters.vidazoo.aliases.progx.enabled=true
Expand Down
Loading