Skip to content

Commit f4826ac

Browse files
New Adapter: Velonium - Limelight Alias (#3840)
1 parent c191cd5 commit f4826ac

7 files changed

Lines changed: 156 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ adapters:
4949
orangeclickmedia:
5050
enabled: false
5151
endpoint: http://ads-pbs.scotty.orangeclickmedia.com/openrtb/{{PublisherID}}?host={{Host}}
52+
velonium:
53+
enabled: false
54+
endpoint: http://ads-pbs.adxvel.com/openrtb/{{PublisherID}}?host={{Host}}
5255
adtg_org:
5356
enabled: false
5457
endpoint: http://ads-pbs.rtb.adtarget.org/openrtb/{{PublisherID}}?host={{Host}}
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 VeloniumTest extends IntegrationTest {
17+
18+
@Test
19+
public void openrtb2AuctionShouldRespondWithBidsFromTheVeloniumBidder() throws IOException, JSONException {
20+
// given
21+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/velonium-exchange/"))
22+
.withRequestBody(equalToJson(
23+
jsonFrom("openrtb2/velonium/test-velonium-bid-request.json")))
24+
.willReturn(aResponse().withBody(
25+
jsonFrom("openrtb2/velonium/test-velonium-bid-response.json"))));
26+
27+
// when
28+
final Response response = responseFor("openrtb2/velonium/test-auction-velonium-request.json",
29+
Endpoint.openrtb2_auction);
30+
31+
// then
32+
assertJsonEquals("openrtb2/velonium/test-auction-velonium-response.json", response,
33+
singletonList("velonium"));
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+
"velonium": {
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: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
"meta": {
17+
"adaptercode": "velonium"
18+
}
19+
}
20+
}
21+
}
22+
],
23+
"seat": "velonium",
24+
"group": 0
25+
}
26+
],
27+
"cur": "USD",
28+
"ext": {
29+
"responsetimemillis": {
30+
"velonium": "{{ velonium.response_time_ms }}"
31+
},
32+
"prebid": {
33+
"auctiontimestamp": 0
34+
},
35+
"tmaxrequest": 5000
36+
}
37+
}
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
@@ -313,6 +313,8 @@ adapters.limelightDigital.aliases.streamvision.enabled=true
313313
adapters.limelightDigital.aliases.streamvision.endpoint=http://localhost:8090/streamvision-exchange/{{Host}}/{{PublisherID}}
314314
adapters.limelightDigital.aliases.orangeclickmedia.enabled=true
315315
adapters.limelightDigital.aliases.orangeclickmedia.endpoint=http://localhost:8090/orangeclickmedia-exchange/{{Host}}/{{PublisherID}}
316+
adapters.limelightDigital.aliases.velonium.enabled=true
317+
adapters.limelightDigital.aliases.velonium.endpoint=http://localhost:8090/velonium-exchange/
316318
adapters.limelightDigital.aliases.adtg_org.enabled=true
317319
adapters.limelightDigital.aliases.adtg_org.endpoint=http://localhost:8090/adtg_org-exchange/
318320
adapters.lmkiviads.enabled=true

0 commit comments

Comments
 (0)