Skip to content

Commit

Permalink
Streamlyn: New Adapter (prebid#3473)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic authored and sergseven committed Dec 23, 2024
1 parent b9ef357 commit 83cef10
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/resources/bidder-config/limelightDigital.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ adapters:
endpoint: http://ads-pbs.bidder-embi.media/openrtb/{{PublisherID}}?host={{Host}}
tgm:
enabled: false
streamlyn:
enabled: false
endpoint: http://rtba.bidsxchange.com/openrtb/{{PublisherID}}?host={{Host}}
meta-info:
maintainer-email: engineering@project-limelight.com
app-media-types:
Expand Down
35 changes: 35 additions & 0 deletions src/test/java/org/prebid/server/it/StreamlynTest.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 StreamlynTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/streamlyn/test-auction-streamlyn-response.json", response,
singletonList("streamlyn"));
}
}
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": {
"streamlyn": {
"host": "test.host",
"publisherId": "123456"
}
}
}
],
"tmax": 5000,
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 3.33,
"crid": "creativeId",
"ext": {
"origbidcpm": 3.33,
"prebid": {
"type": "banner"
}
}
}
],
"seat": "streamlyn",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"streamlyn": "{{ streamlyn.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "request_id-imp_id",
"imp": [
{
"id": "imp_id",
"secure": 1,
"banner": {
"w": 300,
"h": 250
}
}
],
"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}",
"cur": [
"USD"
],
"regs": {
"ext": {
"gdpr": 0
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 3.33,
"crid": "creativeId"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ adapters.limelightDigital.aliases.filmzie.enabled=true
adapters.limelightDigital.aliases.filmzie.endpoint=http://localhost:8090/filmzie-exchange/{{Host}}/{{PublisherID}}
adapters.limelightDigital.aliases.tgm.enabled=true
adapters.limelightDigital.aliases.tgm.endpoint=http://localhost:8090/tgm-exchange/{{Host}}/{{PublisherID}}
adapters.limelightDigital.aliases.streamlyn.enabled=true
adapters.limelightDigital.aliases.streamlyn.endpoint=http://localhost:8090/streamlyn-exchange/{{Host}}/{{PublisherID}}
adapters.lmkiviads.enabled=true
adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange/{{SourceId}}/{{Host}}
adapters.lockerdome.enabled=true
Expand Down

0 comments on commit 83cef10

Please sign in to comment.