Skip to content
Open
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
15 changes: 15 additions & 0 deletions src/main/resources/bidder-config/teqblaze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ adapters:
teqblaze:
endpoint: http://
aliases:
360playvid:
enabled: false
endpoint: https://ssp.360playvid.com/pserver
meta-info:
maintainer-email: prebid@360playvid.com
usersync:
enabled: true
redirect:
url: https://cookie.360playvid.com/pbserver?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&coppa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&redir={{redirect_url}}
support-cors: false
uid-macro: '[UID]'
iframe:
url: https://cookie.360playvid.com/pbserverIframe?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&pbserverUrl={{redirect_url}}
uid-macro: '[UID]'
support-cors: false
pinkLion:
enabled: false
endpoint: https://us-east-ep.pinklion.io/pserver
Expand Down
37 changes: 37 additions & 0 deletions src/test/java/org/prebid/server/it/ThreeSixtyPlayVidTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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 ThreeSixtyPlayVidTest extends IntegrationTest {

private static final String BID_REQUEST_JSON = "openrtb2/360playvid/test-360playvid-bid-request.json";
private static final String BID_RESPONSE_JSON = "openrtb2/360playvid/test-360playvid-bid-response.json";
private static final String AUCTION_REQUEST_JSON = "openrtb2/360playvid/test-auction-360playvid-request.json";
private static final String AUCTION_RESPONSE_JSON = "openrtb2/360playvid/test-auction-360playvid-response.json";

@Test
public void openrtb2AuctionShouldRespondWithBidsFromThreeSixtyPlayVid() throws IOException, JSONException {
// given
WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/360playvid-exchange"))
.withRequestBody(equalToJson(jsonFrom(BID_REQUEST_JSON)))
.willReturn(aResponse().withBody(jsonFrom(BID_RESPONSE_JSON))));

// when
final Response response = responseFor(AUCTION_REQUEST_JSON,
Endpoint.openrtb2_auction);

// then
assertJsonEquals(AUCTION_RESPONSE_JSON, response, singletonList("360playvid"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"secure": 1,
"ext": {
"bidder": {
"type": "publisher",
"placementId": "testPlacementId"
}
}
}
],
"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"
],
"source": {
"tid": "${json-unit.any-string}"
},
"regs": {
"ext": {
"gdpr": 0
}
},
"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,21 @@
{
"id": "request_id",
"seatbid": [
{
"bid": [
{
"id": "bid_id",
"impid": "imp_id",
"price": 3.33,
"crid": "creativeId",
"mtype": 1,
"ext": {
"prebid": {
"type": "banner"
}
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "request_id",
"imp": [
{
"id": "imp_id",
"banner": {
"w": 300,
"h": 250
},
"ext": {
"360playvid": {
"placementId": "testPlacementId"
}
}
}
],
"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": 3.33,
"crid": "creativeId",
"mtype": 1,
"ext": {
"origbidcpm": 3.33,
"prebid": {
"type": "banner",
"meta": {
"adaptercode": "360playvid"
}
}
}
}
],
"seat": "360playvid",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"360playvid": "{{ 360playvid.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
Loading