-
Notifications
You must be signed in to change notification settings - Fork 6
UOE-12550: Adding placementid support for Nativo #1105
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
Conversation
Code coverage summaryNote:
nativoRefer here for heat map coverage report
|
Code coverage summaryNote:
nativoRefer here for heat map coverage report
|
|
||
for i := range request.Imp { | ||
|
||
imp := &request.Imp[i] |
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.
We don't need additional variable declaration, if we access by index then it will be pass by 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.
Accessing the request.imp directly and later updating the imp.ext changes the original incoming request.
@@ -807,3 +807,14 @@ func builderOpenweb(params BidderParameters) (json.RawMessage, error) { | |||
jsonStr.WriteByte('}') | |||
return jsonStr.Bytes(), nil | |||
} | |||
|
|||
func builderNativo(params BidderParameters) (json.RawMessage, error) { |
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.
Can be rewritten as
func builderNativo(params BidderParameters) (json.RawMessage, error) {
if pid, ok := getInt(params.FieldMap["placementId"]); !ok || pid == 0 {
return nil, fmt.Errorf(errMandatoryParameterMissingFormat, params.AdapterName, "placementId")
}
jsonStr := bytes.Buffer{}
fmt.Fprintf(&jsonStr, `{"placementid":"%d"}`, pid)
return jsonStr.Bytes(), nil
}
@@ -807,3 +807,14 @@ func builderOpenweb(params BidderParameters) (json.RawMessage, error) { | |||
jsonStr.WriteByte('}') | |||
return jsonStr.Bytes(), nil | |||
} | |||
|
|||
func builderNativo(params BidderParameters) (json.RawMessage, error) { | |||
jsonStr := bytes.Buffer{} |
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.
Nitpick: We can use bytes.NewBuffer()
to create a new buffer
Code coverage summaryNote:
nativoRefer here for heat map coverage report
|
Closing as PR is raised via Pubmatic-openwrap account |
Description
Please add change description or link to ticket, docs, etc.
Checklist:
header-bidding
repo with appropiate commit id.For Prebid upgrade, refer: https://inside.pubmatic.com:8443/confluence/display/Products/Prebid-server+upgrade