Skip to content

Rename synacormedia adapter to imds to reflect ownership change #2508

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 5 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions adapters/imds/imds.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/prebid/prebid-server/openrtb_ext"
)

type ImdsAdapter struct {
type adapter struct {
EndpointTemplate *template.Template
}

Expand All @@ -34,13 +34,13 @@ func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server co
return nil, fmt.Errorf("unable to parse endpoint url template: %v", err)
}

bidder := &ImdsAdapter{
bidder := &adapter{
EndpointTemplate: template,
}
return bidder, nil
}

func (a *ImdsAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
var errs []error
var bidRequests []*adapters.RequestData

Expand All @@ -53,7 +53,7 @@ func (a *ImdsAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapte
return bidRequests, errs
}

func (a *ImdsAdapter) makeRequest(request *openrtb2.BidRequest) (*adapters.RequestData, []error) {
func (a *adapter) makeRequest(request *openrtb2.BidRequest) (*adapters.RequestData, []error) {
var errs []error
var validImps []openrtb2.Imp
var re *ReqExt
Expand Down Expand Up @@ -126,7 +126,7 @@ func (a *ImdsAdapter) makeRequest(request *openrtb2.BidRequest) (*adapters.Reque
}

// Builds enpoint url based on adapter-specific pub settings from imp.ext
func (adapter *ImdsAdapter) buildEndpointURL(params *openrtb_ext.ExtImpImds) (string, error) {
func (adapter *adapter) buildEndpointURL(params *openrtb_ext.ExtImpImds) (string, error) {
return macros.ResolveMacros(adapter.EndpointTemplate, macros.EndpointTemplateParams{Host: params.SeatId})
}

Expand All @@ -149,7 +149,7 @@ func getExtImpObj(imp *openrtb2.Imp) (*openrtb_ext.ExtImpImds, error) {
}

// MakeBids make the bids for the bid response.
func (a *ImdsAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {
func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {
const errorMessage string = "Unexpected status code: %d. Run with request.debug = 1 for more info"
switch {
case response.StatusCode == http.StatusNoContent:
Expand Down
10 changes: 6 additions & 4 deletions static/bidder-info/imds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ capabilities:
- banner
- video
userSync:
# imds supports user syncing, but requires configuration by the host. contact this
# bidder directly at the email address in this file to ask about enabling user sync.
cookie-family-name: imds
iframe:
url: "https://ad-cdn.technoratimedia.com/html/usersync.html?cb={{.RedirectURL}}"
userMacro: "[USER_ID]"
url: "https://ad-cdn.technoratimedia.com/html/usersync.html?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb={{.RedirectURL}}"
userMacro: "[USER_ID]"
redirect:
url: "https://sync.technoratimedia.com/services?srv=cs&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb={{.RedirectURL}}"
userMacro: "[USER_ID]"
10 changes: 6 additions & 4 deletions static/bidder-info/synacormedia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ capabilities:
- banner
- video
userSync:
# synacormedia supports user syncing, but requires configuration by the host. contact this
# bidder directly at the email address in this file to ask about enabling user sync.
cookie-family-name: imds
iframe:
url: "https://ad-cdn.technoratimedia.com/html/usersync.html?cb={{.RedirectURL}}"
userMacro: "[USER_ID]"
url: "https://ad-cdn.technoratimedia.com/html/usersync.html?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb={{.RedirectURL}}"
userMacro: "[USER_ID]"
redirect:
url: "https://sync.technoratimedia.com/services?srv=cs&gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb={{.RedirectURL}}"
userMacro: "[USER_ID]"