Skip to content

Commit bf6bab6

Browse files
New Adapter: OrangeClickMedia - Limelight Alias (#3838)
1 parent 2919de9 commit bf6bab6

File tree

7 files changed

+155
-1
lines changed

7 files changed

+155
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ adapters:
4141
streamlyn:
4242
enabled: false
4343
endpoint: http://rtba.bidsxchange.com/openrtb/{{PublisherID}}?host={{Host}}
44-
streamvision :
44+
streamvision:
4545
enabled: false
4646
endpoint: http://ads-pbs.adops.streamvisionmedia.com/openrtb/{{PublisherID}}?host={{Host}}
47+
orangeclickmedia:
48+
enabled: false
49+
endpoint: http://ads-pbs.scotty.orangeclickmedia.com/openrtb/{{PublisherID}}?host={{Host}}
4750
meta-info:
4851
maintainer-email: engineering@project-limelight.com
4952
app-media-types:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package org.prebid.server.orangeclickmedia;
2+
3+
import io.restassured.response.Response;
4+
import org.json.JSONException;
5+
import org.junit.jupiter.api.Test;
6+
import org.prebid.server.it.IntegrationTest;
7+
import org.prebid.server.model.Endpoint;
8+
9+
import java.io.IOException;
10+
11+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
12+
import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
13+
import static com.github.tomakehurst.wiremock.client.WireMock.post;
14+
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
15+
import static java.util.Collections.singletonList;
16+
17+
public class OrangeClickMediaTest extends IntegrationTest {
18+
19+
@Test
20+
public void openrtb2AuctionShouldRespondWithBidsFromTheOrangeClickMediaBidder() throws IOException, JSONException {
21+
// given
22+
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/orangeclickmedia-exchange/test.host/123456"))
23+
.withRequestBody(equalToJson(
24+
jsonFrom("openrtb2/orangeclickmedia/test-orangeclickmedia-bid-request.json")))
25+
.willReturn(aResponse().withBody(
26+
jsonFrom("openrtb2/orangeclickmedia/test-orangeclickmedia-bid-response.json"))));
27+
28+
// when
29+
final Response response = responseFor("openrtb2/orangeclickmedia/test-auction-orangeclickmedia-request.json",
30+
Endpoint.openrtb2_auction);
31+
32+
// then
33+
assertJsonEquals("openrtb2/orangeclickmedia/test-auction-orangeclickmedia-response.json", response,
34+
singletonList("orangeclickmedia"));
35+
}
36+
}
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+
"orangeclickmedia": {
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": "orangeclickmedia",
21+
"group": 0
22+
}
23+
],
24+
"cur": "USD",
25+
"ext": {
26+
"responsetimemillis": {
27+
"orangeclickmedia": "{{ orangeclickmedia.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
@@ -299,6 +299,8 @@ adapters.limelightDigital.aliases.streamlyn.enabled=true
299299
adapters.limelightDigital.aliases.streamlyn.endpoint=http://localhost:8090/streamlyn-exchange/{{Host}}/{{PublisherID}}
300300
adapters.limelightDigital.aliases.streamvision.enabled=true
301301
adapters.limelightDigital.aliases.streamvision.endpoint=http://localhost:8090/streamvision-exchange/{{Host}}/{{PublisherID}}
302+
adapters.limelightDigital.aliases.orangeclickmedia.enabled=true
303+
adapters.limelightDigital.aliases.orangeclickmedia.endpoint=http://localhost:8090/orangeclickmedia-exchange/{{Host}}/{{PublisherID}}
302304
adapters.lmkiviads.enabled=true
303305
adapters.lmkiviads.endpoint=http://localhost:8090/lm-kiviads-exchange/{{SourceId}}/{{Host}}
304306
adapters.lockerdome.enabled=true

0 commit comments

Comments
 (0)