Skip to content
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

New Adapter: Pixfuture #4105

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

pixfuture-media
Copy link

Summary
We have developed a new Prebid Server adapter and are proposing its addition to the master branch for review.

Changes
Implemented a new Prebid Server adapter.

Added unit tests to ensure functionality.

Updated documentation with usage instructions and parameters.

Reason for Change
This new adapter will allow for more robust and flexible bidding options, enhancing our server-side header bidding capabilities.

Testing
Passed all unit tests.

Successfully integrated with our test environment and confirmed expected behavior.

No breaking changes detected in existing functionality.

Request
Please review the code changes and provide feedback. Once approved, we will merge this adapter into the master branch.


// Builder builds a new instance of the Pixfuture adapter.
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
bidder := &PixfutureAdapter{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can call this simply "adapter", the PixfutureAdapter identification is already supplied by the package name. As you have it, referencing your adapter from outside the package would be PixfutureAdapter.PixfutureAdapter which looks a little redundant. See example below:

  package foo

  type adapter struct {
    endpoint string
  }
  
  func  Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
    return &adapter{endpoint: "https://www.foo.com"}, nil
  }

var bidExt openrtb_ext.ExtBid
err := jsonutil.Unmarshal(bid.Ext, &bidExt)
if err == nil && bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, bba6eed

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:49:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:64:	MakeBids		90.0%
total:									(statements)		91.4%

@bsardo bsardo changed the title writrte title Add Pixfuture Prebid Server Adapter for Review New Adapter: Pixfuture Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant