Skip to content

Commit aa63a1a

Browse files
New Adapter: Streamvision - LimelightDigital Alias (#3805)
1 parent 3ca85b9 commit aa63a1a

File tree

7 files changed

+153
-0
lines changed

7 files changed

+153
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ adapters:
4141
streamlyn:
4242
enabled: false
4343
endpoint: http://rtba.bidsxchange.com/openrtb/{{PublisherID}}?host={{Host}}
44+
streamvision :
45+
enabled: false
46+
endpoint: http://ads-pbs.adops.streamvisionmedia.com/openrtb/{{PublisherID}}?host={{Host}}
4447
meta-info:
4548
maintainer-email: engineering@project-limelight.com
4649
app-media-types:
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+
10+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
11+
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
12+
import static com.github.tomakehurst.wiremock.client.WireMock.post;
13+
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
14+
import static java.util.Collections.singletonList;
15+
16+
public class StreamvisionTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromTheStreamvisionBidder() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/streamvision-exchange/test.host/123456"))
22+
.withRequestBody(equalToJson(
23+
jsonFrom("openrtb2/streamvision/test-streamvision-bid-request.json")))
24+
.willReturn(aResponse().withBody(
25+
jsonFrom("openrtb2/streamvision/test-streamvision-bid-response.json"))));
26+
27+
// when
28+
final Response response = responseFor("openrtb2/streamvision/test-auction-streamvision-request.json",
29+
Endpoint.openrtb2_auction);
30+
31+
// then
32+
assertJsonEquals("openrtb2/streamvision/test-auction-streamvision-response.json", response,
33+
singletonList("streamvision"));
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+
"banner": {
7+
"w": 300,
8+
"h": 250
9+
},
10+
"ext": {
11+
"streamvision": {
12+
"host": "test.host",
13+
"publisherId": "123456"
14+
}
15+
}
16+
}
17+
],
18+
"tmax": 5000,
19+
"regs": {
20+
"ext": {
21+
"gdpr": 0
22+
}
23+
}
24+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"exp": 300,
10+
"price": 3.33,
11+
"crid": "creativeId",
12+
"ext": {
13+
"origbidcpm": 3.33,
14+
"prebid": {
15+
"type": "banner"
16+
}
17+
}
18+
}
19+
],
20+
"seat": "streamvision",
21+
"group": 0
22+
}
23+
],
24+
"cur": "USD",
25+
"ext": {
26+
"responsetimemillis": {
27+
"streamvision": "{{ streamvision.response_time_ms }}"
28+
},
29+
"prebid": {
30+
"auctiontimestamp": 0
31+
},
32+
"tmaxrequest": 5000
33+
}
34+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"id": "request_id-imp_id",
3+
"imp": [
4+
{
5+
"id": "imp_id",
6+
"secure": 1,
7+
"banner": {
8+
"w": 300,
9+
"h": 250
10+
}
11+
}
12+
],
13+
"source": {
14+
"tid": "${json-unit.any-string}"
15+
},
16+
"site": {
17+
"domain": "www.example.com",
18+
"page": "http://www.example.com",
19+
"publisher": {
20+
"domain": "example.com"
21+
},
22+
"ext": {
23+
"amp": 0
24+
}
25+
},
26+
"device": {
27+
"ua": "userAgent",
28+
"ip": "193.168.244.1"
29+
},
30+
"at": 1,
31+
"tmax": "${json-unit.any-number}",
32+
"cur": [
33+
"USD"
34+
],
35+
"regs": {
36+
"ext": {
37+
"gdpr": 0
38+
}
39+
}
40+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "request_id",
3+
"seatbid": [
4+
{
5+
"bid": [
6+
{
7+
"id": "bid_id",
8+
"impid": "imp_id",
9+
"price": 3.33,
10+
"crid": "creativeId"
11+
}
12+
]
13+
}
14+
]
15+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ adapters.limelightDigital.aliases.tgm.enabled=true
287287
adapters.limelightDigital.aliases.tgm.endpoint=http://localhost:8090/tgm-exchange/{{Host}}/{{PublisherID}}
288288
adapters.limelightDigital.aliases.streamlyn.enabled=true
289289
adapters.limelightDigital.aliases.streamlyn.endpoint=http://localhost:8090/streamlyn-exchange/{{Host}}/{{PublisherID}}
290+
adapters.limelightDigital.aliases.streamvision.enabled=true
291+
adapters.limelightDigital.aliases.streamvision.endpoint=http://localhost:8090/streamvision-exchange/{{Host}}/{{PublisherID}}
290292
adapters.lmkiviads.enabled=true
291293
adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange/{{SourceId}}/{{Host}}
292294
adapters.lockerdome.enabled=true

0 commit comments

Comments
 (0)