forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prebid#4 Add ExtImpConsumable contract class
- Loading branch information
Showing
3 changed files
with
40 additions
and
8 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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
package openrtb_ext | ||
|
||
// ExtImpConsumable defines the contract for bidrequest.imp[i].ext.consumable | ||
type ExtImpConsumable struct{} | ||
type ExtImpConsumable struct { | ||
NetworkId int `json:"networkId,omitempty"` | ||
SiteId int `json:"siteId,omitempty"` | ||
UnitId int `json:"unitId,omitempty"` | ||
/* UnitName gets used as a classname and in the URL when building the ad markup */ | ||
UnitName string `json:"unitName"` | ||
} |
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,5 +1,30 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Consumable Adapter Params", | ||
"description": "A schema which validates params accepted by the Consumable adapter" | ||
} | ||
"description": "A schema which validates params accepted by the Consumable adapter", | ||
|
||
"type": "object", | ||
"properties": { | ||
"siteId": { | ||
"type": "number", | ||
"description": "An ID which identifies the site selling the impression", | ||
"pattern": "^[0-9]+$" | ||
}, | ||
"networkId": { | ||
"type": "number", | ||
"description": "The network id", | ||
"pattern": "^[0-9]+$" | ||
}, | ||
"unitId": { | ||
"type": "number", | ||
"description": "The unit id", | ||
"pattern": "^[0-9]+$" | ||
}, | ||
"unitName": { | ||
"type": "string", | ||
"description": "The unit name (expected to be a valid CSS class name)", | ||
"pattern": "^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$" | ||
} | ||
}, | ||
"required": ["siteId", "unitId", "unitName"] | ||
} |