-
Notifications
You must be signed in to change notification settings - Fork 250
New adapter: Microsoft #4310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
New adapter: Microsoft #4310
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9e78c2c
Add msft bidder
Lightwood13 0f1e635
Fix comments
Lightwood13 6356dc5
Merge branch 'master' into add-msft-bidder
Lightwood13 3874fa9
Fixed comments
Lightwood13 6790f0c
Fixed style
Lightwood13 0a7eb3d
Merge branch 'master' into add-msft-bidder
Lightwood13 e5fbb6d
Fixed tests
Lightwood13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
395 changes: 395 additions & 0 deletions
395
src/main/java/org/prebid/server/bidder/msft/MsftBidder.java
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/main/java/org/prebid/server/bidder/msft/proto/ExtRequestMsft.java
This file contains hidden or 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,17 @@ | ||
| package org.prebid.server.bidder.msft.proto; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Value; | ||
|
|
||
| @Value | ||
| @Builder(toBuilder = true) | ||
| public class ExtRequestMsft { | ||
|
|
||
| Boolean includeBrandCategory; | ||
|
|
||
| Boolean brandCategoryUniqueness; | ||
|
|
||
| Integer isAmp; | ||
|
|
||
| Integer hbSource; | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/main/java/org/prebid/server/bidder/msft/proto/MsftBidExt.java
This file contains hidden or 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,19 @@ | ||
| package org.prebid.server.bidder.msft.proto; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Value; | ||
|
|
||
| @Value | ||
| @Builder | ||
| public class MsftBidExt { | ||
|
|
||
| int bidAdType; | ||
|
|
||
| Integer brandId; | ||
|
|
||
| Integer brandCategoryId; | ||
|
|
||
| MsftBidExtCreative creativeInfo; | ||
|
|
||
| int dealPriority; | ||
| } |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/prebid/server/bidder/msft/proto/MsftBidExtCreative.java
This file contains hidden or 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,9 @@ | ||
| package org.prebid.server.bidder.msft.proto; | ||
|
|
||
| import lombok.Value; | ||
|
|
||
| @Value(staticConstructor = "of") | ||
| public class MsftBidExtCreative { | ||
|
|
||
| MsftBidExtVideo video; | ||
| } |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/prebid/server/bidder/msft/proto/MsftBidExtVideo.java
This file contains hidden or 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,9 @@ | ||
| package org.prebid.server.bidder.msft.proto; | ||
|
|
||
| import lombok.Value; | ||
|
|
||
| @Value(staticConstructor = "of") | ||
| public class MsftBidExtVideo { | ||
|
|
||
| Integer duration; | ||
| } |
25 changes: 25 additions & 0 deletions
25
src/main/java/org/prebid/server/bidder/msft/proto/MsftExtImpOutgoing.java
This file contains hidden or 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,25 @@ | ||
| package org.prebid.server.bidder.msft.proto; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Value; | ||
|
|
||
| @Value | ||
| @Builder | ||
| public class MsftExtImpOutgoing { | ||
|
|
||
| Integer placementId; | ||
|
|
||
| Boolean allowSmallerSizes; | ||
|
|
||
| Boolean usePmtRule; | ||
|
|
||
| String keywords; | ||
|
|
||
| String trafficSourceCode; | ||
|
|
||
| String pubClick; | ||
|
|
||
| String extInvCode; | ||
|
|
||
| String extImpId; | ||
| } |
33 changes: 33 additions & 0 deletions
33
src/main/java/org/prebid/server/proto/openrtb/ext/request/msft/ExtImpMsft.java
This file contains hidden or 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,33 @@ | ||
| package org.prebid.server.proto.openrtb.ext.request.msft; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Value; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| @Value | ||
| @Builder | ||
| public class ExtImpMsft { | ||
|
|
||
| Integer placementId; | ||
|
|
||
| Integer member; | ||
|
|
||
| String invCode; | ||
|
|
||
| Boolean allowSmallerSizes; | ||
|
|
||
| Boolean usePmtRule; | ||
|
|
||
| String keywords; | ||
|
|
||
| String trafficSourceCode; | ||
|
|
||
| String pubclick; | ||
|
|
||
| String extInvCode; | ||
|
|
||
| String extImpId; | ||
|
|
||
| List<Integer> bannerFrameworks; | ||
| } |
61 changes: 61 additions & 0 deletions
61
src/main/java/org/prebid/server/spring/config/bidder/MsftConfiguration.java
This file contains hidden or 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,61 @@ | ||
| package org.prebid.server.spring.config.bidder; | ||
|
|
||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.NoArgsConstructor; | ||
| import org.prebid.server.bidder.BidderDeps; | ||
| import org.prebid.server.bidder.msft.MsftBidder; | ||
| import org.prebid.server.json.JacksonMapper; | ||
| import org.prebid.server.spring.config.bidder.model.BidderConfigurationProperties; | ||
| import org.prebid.server.spring.config.bidder.util.BidderDepsAssembler; | ||
| import org.prebid.server.spring.env.YamlPropertySourceFactory; | ||
| import org.springframework.boot.context.properties.ConfigurationProperties; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.context.annotation.PropertySource; | ||
| import org.springframework.validation.annotation.Validated; | ||
|
|
||
| import jakarta.validation.constraints.NotNull; | ||
| import java.util.Map; | ||
|
|
||
| @Configuration | ||
| @PropertySource(value = "classpath:/bidder-config/msft.yaml", factory = YamlPropertySourceFactory.class) | ||
| public class MsftConfiguration { | ||
|
|
||
| private static final String BIDDER_NAME = "msft"; | ||
|
|
||
| @Bean("msftConfigurationProperties") | ||
| @ConfigurationProperties("adapters.msft") | ||
| MsftConfigurationProperties configurationProperties() { | ||
| return new MsftConfigurationProperties(); | ||
| } | ||
|
|
||
| @Bean | ||
| BidderDeps msftBidderDeps(MsftConfigurationProperties msftConfigurationProperties, JacksonMapper mapper) { | ||
|
|
||
| return BidderDepsAssembler.forBidder(BIDDER_NAME) | ||
| .withConfig(msftConfigurationProperties) | ||
| .bidderCreator(config -> new MsftBidder( | ||
| config.getEndpoint(), | ||
| msftConfigurationProperties.getHbSource(), | ||
| msftConfigurationProperties.getHbSourceVideo(), | ||
| msftConfigurationProperties.getIabCategories(), | ||
| mapper)) | ||
| .assemble(); | ||
| } | ||
|
|
||
| @Validated | ||
| @Data | ||
| @EqualsAndHashCode(callSuper = true) | ||
| @NoArgsConstructor | ||
| private static class MsftConfigurationProperties extends BidderConfigurationProperties { | ||
|
|
||
| @NotNull | ||
| Integer hbSource = 5; | ||
|
|
||
| @NotNull | ||
| Integer hbSourceVideo = 6; | ||
|
|
||
| Map<Integer, String> iabCategories; | ||
| } | ||
| } | ||
|
CTMBNara marked this conversation as resolved.
|
This file contains hidden or 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,119 @@ | ||
| adapters: | ||
| msft: | ||
| endpoint: http://ib.adnxs.com/openrtb2 | ||
| ortb-version: "2.6" | ||
| meta-info: | ||
| maintainer-email: prebid@microsoft.com | ||
| app-media-types: | ||
| - banner | ||
| - video | ||
| - native | ||
| site-media-types: | ||
| - banner | ||
| - video | ||
| - native | ||
| supported-vendors: | ||
| vendor-id: 32 | ||
| usersync: | ||
| cookie-family-name: adnxs | ||
| redirect: | ||
| url: https://ib.adnxs.com/getuid?{{redirect_url}} | ||
| support-cors: false | ||
| uid-macro: '$UID' | ||
| platform-id: 5 | ||
| iab-categories: | ||
| 1: IAB20-3 | ||
| 2: IAB18-5 | ||
| 3: IAB10-1 | ||
| 4: IAB2-3 | ||
| 5: IAB19-8 | ||
| 6: IAB22-1 | ||
| 7: IAB18-1 | ||
| 8: IAB12-3 | ||
| 9: IAB5-1 | ||
| 10: IAB4-5 | ||
| 11: IAB13-4 | ||
| 12: IAB8-7 | ||
| 13: IAB9-7 | ||
| 14: IAB7-1 | ||
| 15: IAB20-18 | ||
| 16: IAB10-7 | ||
| 17: IAB19-18 | ||
| 18: IAB13-6 | ||
| 19: IAB18-4 | ||
| 20: IAB1-5 | ||
| 21: IAB1-6 | ||
| 22: IAB3-4 | ||
| 23: IAB19-13 | ||
| 24: IAB22-2 | ||
| 25: IAB3-9 | ||
| 26: IAB17-18 | ||
| 27: IAB19-6 | ||
| 28: IAB1-7 | ||
| 29: IAB9-30 | ||
| 30: IAB20-7 | ||
| 31: IAB20-17 | ||
| 32: IAB7-32 | ||
| 33: IAB16-5 | ||
| 34: IAB19-34 | ||
| 35: IAB11-5 | ||
| 36: IAB12-3 | ||
| 37: IAB11-4 | ||
| 38: IAB12-3 | ||
| 39: IAB9-30 | ||
| 41: IAB7-44 | ||
| 42: IAB7-1 | ||
| 43: IAB7-30 | ||
| 50: IAB19-30 | ||
| 51: IAB17-12 | ||
| 52: IAB19-30 | ||
| 53: IAB3-1 | ||
| 55: IAB13-2 | ||
| 56: IAB19-30 | ||
| 57: IAB19-30 | ||
| 58: IAB7-39 | ||
| 59: IAB22-1 | ||
| 60: IAB7-39 | ||
| 61: IAB21-3 | ||
| 62: IAB5-1 | ||
| 63: IAB12-3 | ||
| 64: IAB20-18 | ||
| 65: IAB11-2 | ||
| 66: IAB17-18 | ||
| 67: IAB9-9 | ||
| 68: IAB9-5 | ||
| 69: IAB7-44 | ||
| 71: IAB22-3 | ||
| 73: IAB19-30 | ||
| 74: IAB8-5 | ||
| 78: IAB22-1 | ||
| 85: IAB12-2 | ||
| 86: IAB22-3 | ||
| 87: IAB11-3 | ||
| 112: IAB7-32 | ||
| 113: IAB7-32 | ||
| 114: IAB7-32 | ||
| 115: IAB7-32 | ||
| 118: IAB9-5 | ||
| 119: IAB9-5 | ||
| 120: IAB9-5 | ||
| 121: IAB9-5 | ||
| 122: IAB9-5 | ||
| 123: IAB9-5 | ||
| 124: IAB9-5 | ||
| 125: IAB9-5 | ||
| 126: IAB9-5 | ||
| 127: IAB22-1 | ||
| 132: IAB1-2 | ||
| 133: IAB19-30 | ||
| 137: IAB3-9 | ||
| 138: IAB19-3 | ||
| 140: IAB2-3 | ||
| 141: IAB2-1 | ||
| 142: IAB2-3 | ||
| 143: IAB17-13 | ||
| 166: IAB11-4 | ||
| 175: IAB3-1 | ||
| 176: IAB13-4 | ||
| 182: IAB8-9 | ||
| 183: IAB3-5 |
This file contains hidden or 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,68 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-04/schema#", | ||
| "title": "Microsoft Adapter Params", | ||
| "description": "A schema which validates params accepted by the Microsoft adapter", | ||
| "type": "object", | ||
| "properties": { | ||
| "placement_id": { | ||
| "type": "integer", | ||
| "description": "Placement ID from Microsoft Monetize. You may use inv_code with member instead of a placement_id." | ||
| }, | ||
| "member": { | ||
| "type": "integer", | ||
| "description": "Member ID from Microsoft Monetize. Must be used with inv_code." | ||
| }, | ||
| "inv_code": { | ||
| "type": "string", | ||
| "description": "Inventory code from Microsoft Monetize. Must be used with member." | ||
| }, | ||
| "allow_smaller_sizes": { | ||
| "type": "boolean", | ||
| "description": "If true, ads smaller than your ad unit's size array will be allowed to serve." | ||
| }, | ||
| "use_pmt_rule": { | ||
| "type": "boolean", | ||
| "description": "If true, Microsoft Monetize will return net price after publisher payment rules are applied." | ||
| }, | ||
| "keywords": { | ||
| "type": "string", | ||
| "description": "Comma-delimited key-value pairs (max 100). Must be enabled by a Microsoft Monetize account manager." | ||
| }, | ||
| "traffic_source_code": { | ||
| "type": "string", | ||
| "description": "Specifies the third-party source of this impression." | ||
| }, | ||
| "pubclick": { | ||
| "type": "string", | ||
| "description": "Specifies a publisher supplied url for third-party click tracking." | ||
| }, | ||
| "ext_inv_code": { | ||
| "type": "string", | ||
| "description": "Specifies predefined value passed on the query string that can be used in reporting. The value must be entered into Microsoft Monetize before it is logged.." | ||
| }, | ||
| "ext_imp_id": { | ||
| "type": "string", | ||
| "description": "Specifies the unique identifier of an externally generated auction." | ||
| }, | ||
| "banner_frameworks": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "integer" | ||
| }, | ||
| "description": "List of supported API frameworks for banner ads supported by the publisher." | ||
| } | ||
| }, | ||
| "oneOf": [ | ||
| { | ||
| "required": [ | ||
| "placement_id" | ||
| ] | ||
| }, | ||
| { | ||
| "required": [ | ||
| "inv_code", | ||
| "member" | ||
| ] | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.