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
16 changes: 16 additions & 0 deletions src/main/resources/bidder-config/teqblaze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ adapters:
url: https://sync.progrtb.com/pbserver?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&redir={{redirect_url}}
support-cors: false
uid-macro: '[UID]'
mycodemedia:
enabled: false
endpoint: https://east-backend.mycodemedia.com/pserver
meta-info:
maintainer-email: support-platform@mycodemedia.com
usersync:
enabled: true
cookie-family-name: mycodemedia
iframe:
url: https://usersync.mycodemedia.com/pbserverIframe?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&pbserverUrl={{redirect_url}}
support-cors: false
uid-macro: '[UID]'
redirect:
url: https://usersync.mycodemedia.com/pbserver?gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}}&ccpa={{us_privacy}}&gpp={{gpp}}&gpp_sid={{gpp_sid}}&redir={{redirect_url}}
Comment on lines +120 to +124
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ccpa= -> us_privacy=

support-cors: false
uid-macro: '[UID]'
meta-info:
maintainer-email: github@teqblaze.com
app-media-types:
Expand Down
36 changes: 36 additions & 0 deletions src/test/java/org/prebid/server/it/MycodemediaTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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 java.util.List;

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;

public class MycodemediaTest extends IntegrationTest {

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

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

// then
assertJsonEquals("openrtb2/mycodemedia/test-auction-mycodemedia-response.json",
response, List.of("mycodemedia"));
}

}
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": {
"mycodemedia": {
"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": "mycodemedia"
}
}
}
}
],
"seat": "mycodemedia",
"group": 0
}
],
"cur": "USD",
"ext": {
"responsetimemillis": {
"mycodemedia": "{{ mycodemedia.response_time_ms }}"
},
"prebid": {
"auctiontimestamp": 0
},
"tmaxrequest": 5000
}
}
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
Expand Up @@ -593,6 +593,8 @@ adapters.teqblaze.aliases.adsinteractive.enabled=true
adapters.teqblaze.aliases.adsinteractive.endpoint=http://localhost:8090/adsinteractive-exchange
adapters.teqblaze.aliases.progx.enabled=true
adapters.teqblaze.aliases.progx.endpoint=http://localhost:8090/progx-exchange/
adapters.teqblaze.aliases.mycodemedia.enabled=true
adapters.teqblaze.aliases.mycodemedia.endpoint=http://localhost:8090/mycodemedia-exchange/
adapters.theadx.enabled=true
adapters.theadx.endpoint=http://localhost:8090/theadx-exchange
adapters.tradplus.enabled=true
Expand Down
Loading