Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New adapter: Connektai - Xeworks alias #3730 #3738

Merged
merged 5 commits into from
Feb 20, 2025
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
6 changes: 6 additions & 0 deletions src/main/resources/bidder-config/xeworks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
adapters:
xeworks:
endpoint: http://prebid-srv.xe.works/?pid={{SourceId}}&host={{Host}}
aliases:
connektai:
enabled: false
endpoint: http://rtb.connektai.live/?pid={{SourceId}}&host={{Host}}&s=pbs
meta-info:
maintainer-email: adops@connekt.ai
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/ConnektaiTest.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 ConnektaiTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/connektai/test-auction-connektai-response.json", response,
singletonList("connektai"));
}
}
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": {
"connektai": {
"env": "envValue",
"pid": "pidValue"
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"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"
},
"origbidcpm": 10,
"origbidcur": "EUR"
}
}
],
"seat": "connektai",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"connektai": "{{ connektai.response_time_ms }}"
},
"tmaxrequest": 5000,
"prebid": {
"auctiontimestamp": 0
}
}
}
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
Expand Up @@ -500,6 +500,8 @@ adapters.vrtcal.enabled=true
adapters.vrtcal.endpoint=http://localhost:8090/vrtcal-exchange
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.vidazoo.enabled=true
adapters.vidazoo.endpoint=http://localhost:8090/vidazoo-exchange/
adapters.videobyte.enabled=true
Expand Down
Loading