-
Notifications
You must be signed in to change notification settings - Fork 860
New Adapter: ElementalTv #4639
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
Open
pavel-ptashyts
wants to merge
21
commits into
prebid:master
Choose a base branch
from
pavel-ptashyts:adoppler_to_elemental_rename_and_refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+111
−165
Open
New Adapter: ElementalTv #4639
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
494f8c1
Update Adoppler/ElementaTv:
pavel-ptashyts fb8f6b1
Update Adoppler/ElementaTv:
pavel-ptashyts 3cf30b8
Update Adoppler/ElementaTv:
pavel-ptashyts b59b75d
Update Adoppler/ElementaTv
pavel-ptashyts 5998af2
Merge branch 'master' into adoppler_to_elemental_rename_and_refactor
pavel-ptashyts 4f18562
Merge branch 'master' into adoppler_to_elemental_rename_and_refactor
pavel-ptashyts 9ae372e
Update Adoppler/ElementaTv add params_test.go
pavel-ptashyts 8089b80
Update Adoppler/ElementaTv
pavel-ptashyts e309265
Update Adoppler/ElementaTv
pavel-ptashyts 4e5037a
Update ElementalTv
pavel-ptashyts 26a6fec
Merge branch 'master' into adoppler_to_elemental_rename_and_refactor
pavel-ptashyts 720ecfb
Update adapters/elementaltv/elementaltv.go
pavel-ptashyts 23928f5
Update adapters/elementaltv/elementaltv.go
pavel-ptashyts 2774221
Update adapters/elementaltv/params_test.go
pavel-ptashyts a0f30a9
Update ElementalTv
pavel-ptashyts e0c0fcd
Merge branch 'master' into adoppler_to_elemental_rename_and_refactor
pavel-ptashyts 7280fab
Update ElementalTv
pavel-ptashyts 76a2fed
Update adapters/elementaltv/elementaltv_test.go
pavel-ptashyts 8dc67cd
Code refactoring
pavel-ptashyts e561748
Merge branch 'master' into adoppler_to_elemental_rename_and_refactor
pavel-ptashyts 3df45ba
Code refactoring
pavel-ptashyts 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
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
81 changes: 0 additions & 81 deletions
81
adapters/adoppler/adopplertest/exemplary/custom-client.json
This file was deleted.
Oops, something went wrong.
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
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 elementaltv | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/prebid/prebid-server/v3/adapters/adapterstest" | ||
| "github.com/prebid/prebid-server/v3/config" | ||
| "github.com/prebid/prebid-server/v3/openrtb_ext" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestJsonSamples(t *testing.T) { | ||
| bidder, buildErr := Builder(openrtb_ext.BidderElementalTV, config.Adapter{ | ||
| Endpoint: "https://pbs.elementaltv.io/processHeaderBid/{{.AdUnit}}"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) | ||
|
|
||
| require.NoError(t, buildErr, "Builder returned unexpected error") | ||
|
|
||
| adapterstest.RunJSONBidderTest(t, "elementaltvtest", bidder) | ||
| } | ||
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
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
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
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
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
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
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
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
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
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
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,38 @@ | ||
| package elementaltv | ||
|
|
||
| import ( | ||
| "encoding/json" | ||
| "testing" | ||
|
|
||
| "github.com/prebid/prebid-server/v3/openrtb_ext" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestValidParams(t *testing.T) { | ||
| validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") | ||
| require.NoErrorf(t, err, "Failed to fetch the json schema: %v", err) | ||
| for _, p := range validParams { | ||
| err := validator.Validate(openrtb_ext.BidderElementalTV, json.RawMessage(p)) | ||
| require.NoError(t, err, "Schema rejected valid params: %s", p) | ||
| } | ||
| } | ||
|
|
||
| func TestInvalidParams(t *testing.T) { | ||
| validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") | ||
| require.NoErrorf(t, err, "Failed to fetch the json schema: %v", err) | ||
|
|
||
| for _, p := range invalidParams { | ||
| err := validator.Validate(openrtb_ext.BidderElementalTV, json.RawMessage(p)) | ||
| require.Error(t, err, "Schema allowed invalid params: %s", p) | ||
| } | ||
| } | ||
|
|
||
| var validParams = []string{ | ||
| `{"adunit":"123"}`, | ||
| `{"adunit":"SSP:123"}`, | ||
| `{"adunit":"5346"}`} | ||
|
|
||
| var invalidParams = []string{ | ||
| `{}`, | ||
| `{"adunitt":"123"}`, | ||
| } |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is missing params_test.go, You can refer other adapters for reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done