forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pangle: add appid & placementid to bidder param (prebid#1842)
Co-authored-by: hcai <[email protected]>
- Loading branch information
1 parent
b4616ee
commit b14dec2
Showing
19 changed files
with
282 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"token": "123" | ||
"token": "123", | ||
"appid": "123", | ||
"placementid": "123" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"token": "123" | ||
"token": "123", | ||
"appid": "123", | ||
"placementid": "123" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"token": "123" | ||
"token": "123", | ||
"appid": "123", | ||
"placementid": "123" | ||
} |
155 changes: 155 additions & 0 deletions
155
adapters/pangle/pangletest/supplemental/appid_placementid_check.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"app": { | ||
"bundle": "com.prebid" | ||
}, | ||
"device": { | ||
"ifa": "87857b31-8942-4646-ae80-ab9c95bf3fab" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
], | ||
"protocols": [ | ||
2, | ||
5 | ||
], | ||
"w": 1024, | ||
"h": 576, | ||
"ext": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"ext": { | ||
"prebid": { | ||
"is_rewarded_inventory": 1 | ||
}, | ||
"bidder": { | ||
"token": "123", | ||
"appid": "123456", | ||
"placementid": "78910" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://pangle.io/api/get_ads", | ||
"headers": { | ||
"Content-Type": [ | ||
"application/json" | ||
], | ||
"TOKEN": [ | ||
"123" | ||
] | ||
}, | ||
"body": { | ||
"id": "test-request-id", | ||
"app": { | ||
"bundle": "com.prebid" | ||
}, | ||
"device": { | ||
"ifa": "87857b31-8942-4646-ae80-ab9c95bf3fab" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
], | ||
"protocols": [ | ||
2, | ||
5 | ||
], | ||
"w": 1024, | ||
"h": 576, | ||
"ext": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"ext": { | ||
"adtype": 7, | ||
"prebid": { | ||
"bidder": null, | ||
"is_rewarded_inventory": 1, | ||
"storedrequest": null | ||
}, | ||
"is_prebid": true, | ||
"networkids": { | ||
"appid": "123456", | ||
"placementid": "78910" | ||
}, | ||
"bidder": { | ||
"token": "123", | ||
"appid": "123456", | ||
"placementid": "78910" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "seat-id", | ||
"bid": [ | ||
{ | ||
"id": "1", | ||
"impid": "test-imp-id", | ||
"adid": "11110126", | ||
"price": 0.500000, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid", | ||
"h": 250, | ||
"w": 300, | ||
"ext": { | ||
"pangle": { | ||
"adtype": 7 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "1", | ||
"impid": "test-imp-id", | ||
"adid": "11110126", | ||
"price": 0.5, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid", | ||
"w": 300, | ||
"h": 250, | ||
"ext": { | ||
"pangle": { | ||
"adtype": 7 | ||
} | ||
} | ||
}, | ||
"type": "video" | ||
} | ||
] | ||
} | ||
] | ||
} |
47 changes: 47 additions & 0 deletions
47
adapters/pangle/pangletest/supplemental/missing_appid_or_placementid.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"app": { | ||
"bundle": "com.prebid" | ||
}, | ||
"device": { | ||
"ifa": "87857b31-8942-4646-ae80-ab9c95bf3fab" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
], | ||
"protocols": [ | ||
2, | ||
5 | ||
], | ||
"w": 1024, | ||
"h": 576, | ||
"ext": { | ||
"foo": "bar" | ||
} | ||
}, | ||
"ext": { | ||
"prebid": { | ||
"is_rewarded_inventory": 1 | ||
}, | ||
"bidder": { | ||
"token": "123", | ||
"placementid": "78910" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [], | ||
"expectedBidResponses": [], | ||
"expectedMakeRequestsErrors": [ | ||
{ | ||
"value": "only one of appid or placementid is provided", | ||
"comparison": "literal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ | |
"bidder": { | ||
"token": "123" | ||
}, | ||
"is_prebid": true, | ||
"prebid": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.