-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[criteo] accept zoneId and networkId alternate case
- Loading branch information
1 parent
8ebcacf
commit 3f68ff7
Showing
3 changed files
with
288 additions
and
29 deletions.
There are no files selected for viewing
232 changes: 232 additions & 0 deletions
232
adapters/criteo/criteotest/supplemental/multislots-alt-case.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,232 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"site": { | ||
"id": "site-id", | ||
"page": "criteo.com" | ||
}, | ||
"device": { | ||
"os": "android", | ||
"ip": "91.199.242.236", | ||
"ua": "random user agent" | ||
}, | ||
"user": { | ||
"ext": { | ||
"eids": [{ | ||
"source": "criteo.com", | ||
"uids": [{ | ||
"id": "criteo-eid" | ||
}] | ||
}] | ||
} | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id-1", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"zoneId": 123456, | ||
"networkId": 78910 | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "test-imp-id-2", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"zoneId": 7891011, | ||
"networkId": 78910 | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "test-imp-id-3", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"zoneId": 121314, | ||
"networkId": 78910 | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://bidder.criteo.com/cdb?profileId=230", | ||
"headers": { | ||
"X-Forwarded-For": [ | ||
"91.199.242.236" | ||
], | ||
"User-Agent": [ | ||
"random user agent" | ||
] | ||
}, | ||
"body": { | ||
"id": "test-request-id", | ||
"publisher": { | ||
"siteid": "site-id", | ||
"url": "criteo.com", | ||
"networkid": 78910 | ||
}, | ||
"user": { | ||
"ip": "91.199.242.236", | ||
"ua": "random user agent", | ||
"deviceos": "android", | ||
"deviceidtype": "gaid" | ||
}, | ||
"gdprconsent": {}, | ||
"slots": [ | ||
{ | ||
"slotid": "00000000-0000-0000-00000000", | ||
"impid": "test-imp-id-1", | ||
"zoneid": 123456, | ||
"networkid": 78910, | ||
"sizes": [ | ||
"300x250" | ||
] | ||
}, | ||
{ | ||
"slotid": "00000000-0000-0000-00000000", | ||
"impid": "test-imp-id-2", | ||
"zoneid": 7891011, | ||
"networkid": 78910, | ||
"sizes": [ | ||
"300x250" | ||
] | ||
}, | ||
{ | ||
"slotid": "00000000-0000-0000-00000000", | ||
"impid": "test-imp-id-3", | ||
"zoneid": 121314, | ||
"networkid": 78910, | ||
"sizes": [ | ||
"300x250" | ||
] | ||
} | ||
], | ||
"eids": [ | ||
{ | ||
"source": "criteo.com", | ||
"uids": [ | ||
{ | ||
"id": "criteo-eid" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"slots": [ | ||
{ | ||
"id": "test-slot-id-1", | ||
"impid": "test-imp-id-1", | ||
"zoneid": 123456, | ||
"networkid": 78910, | ||
"cpm": 0.1, | ||
"currency": "USD", | ||
"width": 300, | ||
"height": 250, | ||
"creativeid": "creative-123", | ||
"creative": "<iframe id='789abc' name='789abc' src='http://creative-url.criteo.com'></iframe>" | ||
}, | ||
{ | ||
"id": "test-slot-id-2", | ||
"impid": "test-imp-id-2", | ||
"zoneid": 7891011, | ||
"networkid": 78910, | ||
"cpm": 0.2, | ||
"currency": "USD", | ||
"width": 320, | ||
"height": 50, | ||
"creativeid": "creative-123", | ||
"creative": "<iframe id='789abc' name='789abc' src='http://creative-url.criteo.com'></iframe>" | ||
}, | ||
{ | ||
"id": "test-slot-id-3", | ||
"impid": "test-imp-id-3", | ||
"zoneid": 121314, | ||
"networkid": 78910, | ||
"cpm": 0.3, | ||
"currency": "USD", | ||
"width": 300, | ||
"height": 600, | ||
"creativeid": "creative-123", | ||
"creative": "<iframe id='789abc' name='789abc' src='http://creative-url.criteo.com'></iframe>" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "test-slot-id-1", | ||
"impid": "test-imp-id-1", | ||
"price": 0.1, | ||
"crid": "creative-123", | ||
"adm": "<iframe id='789abc' name='789abc' src='http://creative-url.criteo.com'></iframe>", | ||
"w": 300, | ||
"h": 250 | ||
}, | ||
"type": "banner" | ||
}, | ||
{ | ||
"bid": { | ||
"id": "test-slot-id-2", | ||
"impid": "test-imp-id-2", | ||
"price": 0.2, | ||
"crid": "creative-123", | ||
"adm": "<iframe id='789abc' name='789abc' src='http://creative-url.criteo.com'></iframe>", | ||
"w": 320, | ||
"h": 50 | ||
}, | ||
"type": "banner" | ||
}, | ||
{ | ||
"bid": { | ||
"id": "test-slot-id-3", | ||
"impid": "test-imp-id-3", | ||
"price": 0.3, | ||
"crid": "creative-123", | ||
"adm": "<iframe id='789abc' name='789abc' src='http://creative-url.criteo.com'></iframe>", | ||
"w": 300, | ||
"h": 600 | ||
}, | ||
"type": "banner" | ||
} | ||
] | ||
} | ||
] | ||
} |
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,30 +1,50 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Criteo adapter params", | ||
"description": "The schema to validate Criteo specific params accepted by Criteo adapter", | ||
"type": "object", | ||
"properties": { | ||
"zoneid": { | ||
"type": "number", | ||
"description": "Impression's zone ID.", | ||
"minimum": 0 | ||
}, | ||
"networkid": { | ||
"type": "number", | ||
"description": "Impression's network ID.", | ||
"minimum": 0 | ||
} | ||
}, | ||
"anyOf": [ | ||
{ | ||
"required": [ | ||
"zoneid" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"networkid" | ||
] | ||
} | ||
] | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Criteo adapter params", | ||
"description": "The schema to validate Criteo specific params accepted by Criteo adapter", | ||
"type": "object", | ||
"properties": { | ||
"zoneid": { | ||
"type": "integer", | ||
"description": "Impression's zone ID.", | ||
"minimum": 0 | ||
}, | ||
"zoneId": { | ||
"type": "integer", | ||
"description": "Impression's zone ID, preferred.", | ||
"minimum": 0 | ||
}, | ||
"networkid": { | ||
"type": "integer", | ||
"description": "Impression's network ID.", | ||
"minimum": 0 | ||
}, | ||
"networkId": { | ||
"type": "integer", | ||
"description": "Impression's network ID, preferred.", | ||
"minimum": 0 | ||
} | ||
}, | ||
"anyOf": [ | ||
{ | ||
"required": [ | ||
"zoneid" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"zoneId" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"networkid" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"networkId" | ||
] | ||
} | ||
] | ||
} |