Skip to content

Commit

Permalink
Update SmartHub adapter and add Markapp alias
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartHubSolutions committed Apr 17, 2024
1 parent cb3fd3c commit 080a39e
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 13 deletions.
2 changes: 1 addition & 1 deletion adapters/smarthub/smarthub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func TestJsonSamples(t *testing.T) {
bidder, buildErr := Builder(openrtb_ext.BidderSmartHub, config.Adapter{
Endpoint: "http://{{.Host}}-prebid.smart-hub.io/?seat={{.AccountID}}&token={{.SourceId}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})
Endpoint: "http://prebid.smart-hub.io/pbserver?partnerName={{.Host}}&seat={{.AccountID}}&token={{.SourceId}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"})

assert.NoError(t, buildErr)
adapterstest.RunJSONBidderTest(t, "smarthubtest", bidder)
Expand Down
93 changes: 93 additions & 0 deletions adapters/smarthub/smarthubtest/exemplary/audio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"mockBidRequest": {
"id": "body-id-1",
"imp": [
{
"id": "id0",
"audio": {
"mimes": ["audio/mp4"]
},
"ext": {
"bidder": {
"partnerName": "partnertest",
"seat": "9Q20EdGxzgWdfPYShScl",
"token": "zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer"
}
}
}
]
},
"httpCalls": [
{
"expectedRequest": {
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "body-id-1",
"imp": [
{
"id": "id0",
"audio": {
"mimes": ["audio/mp4"]
},
"ext": {
"bidder": {
"partnerName": "partnertest",
"seat": "9Q20EdGxzgWdfPYShScl",
"token": "zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer"
}
}
}
]
}
},
"mockResponse": {
"status": 200,
"body": {
"id": "body-id-1",
"seatbid": [
{
"seat": "test-seat",
"bid": [
{
"id": "5dce6055-a93c-1fd0-8c29-14afc3e510fd",
"impid": "id0",
"price": 0.1,
"nurl": "test-win",
"adm": "test-audio",
"adid": "92-289",
"adomain": ["advertiserdomain.com"],
"crid": "289",
"ext": {
"mediaType": "audio"
}
}
]
}
]
}
}
}
],
"expectedBidResponses": [
{
"bids": [
{
"bid": {
"id": "5dce6055-a93c-1fd0-8c29-14afc3e510fd",
"impid": "id0",
"price": 0.1,
"nurl": "test-win",
"adm": "test-audio",
"adid": "92-289",
"adomain": ["advertiserdomain.com"],
"crid": "289",
"ext": {
"mediaType": "audio"
}
},
"type": "audio"
}
]
}
]
}
2 changes: 1 addition & 1 deletion adapters/smarthub/smarthubtest/exemplary/banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
2 changes: 1 addition & 1 deletion adapters/smarthub/smarthubtest/exemplary/native.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
2 changes: 1 addition & 1 deletion adapters/smarthub/smarthubtest/exemplary/video.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "http://partnertest-prebid.smart-hub.io/?seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"uri": "http://prebid.smart-hub.io/pbserver?partnerName=partnertest&seat=9Q20EdGxzgWdfPYShScl&token=zpl5iB5Ugpe9ofVTzi44WzfjZZYq1yer",
"body": {
"id": "id",
"imp": [
Expand Down
2 changes: 2 additions & 0 deletions static/bidder-info/markapp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
endpoint: "http://markapp-prebid.smart-hub.io/pbserver/?seat={{.AccountID}}&token={{.SourceId}}"
aliasOf: "smarthub"
4 changes: 3 additions & 1 deletion static/bidder-info/smarthub.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
endpoint: "http://{{.Host}}-prebid.smart-hub.io/?seat={{.AccountID}}&token={{.SourceId}}"
endpoint: "http://prebid.smart-hub.io/pbserver?partnerName={{.Host}}&seat={{.AccountID}}&token={{.SourceId}}"
maintainer:
email: "[email protected]"
capabilities:
app:
mediaTypes:
- banner
- video
- audio
- native
site:
mediaTypes:
- banner
- video
- audio
- native
userSync:
# smarthub supports user syncing, but requires configuration by the host. contact this
Expand Down

0 comments on commit 080a39e

Please sign in to comment.