-
Notifications
You must be signed in to change notification settings - Fork 762
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
Add Adpone adapter #1033
Add Adpone adapter #1033
Conversation
|
||
headers := http.Header{} | ||
headers.Add("Content-Type", "application/json;charset=utf-8") | ||
requestToBidder := &adapters.RequestData{ |
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.
Do you think more headers might be helpful? Other adapters include headers such as x-openrtb-version. Do you think it'll help to include more header info?
headers.Add("Accept", "application/json")
headers.Add("x-openrtb-version", "2.5")
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.
Absolutely yes; I will add more headers. Thanks a lot
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.
Are there no bidder JSON parameters to expect and validate for?
static/bidder-info/adpone.yaml
Outdated
- banner | ||
site: | ||
mediaTypes: | ||
- banner |
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 you add a newline in here?
static/bidder-params/adpone.json
Outdated
"title": "Adpone Adapter Params", | ||
"description": "A schema which validates params accepted by the adpone adapter", | ||
"type": "object", | ||
"properties": {}, |
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.
Are we sure we don't have any parameters we want to check for? If not, do you think you'll need them in the future?
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.
Probably in the future we will need some parameters so I have added one (placementId). Thanks!
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.
Null check issue on line 29
adapters/adpone/adpone.go
Outdated
requestsToBidder []*adapters.RequestData, | ||
errs []error, | ||
) { | ||
var imp = &openRTBRequest.Imp[0] |
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.
When a request with an empty openRTBRequest.Imp
array comes in, your adapter fails with an "index out of range" error in line 29. Can we check for nil
before dereferencing the Imp
array and check its length before accessing any of its elements?
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.
LGTM thanks for your patience
* adpone adapter * adpone adapter * go fmt files * fix typo * remove extra information from req * fix testing * fix usersync_test * add adpone json schema * add adpone to syncer_test.go * add adpone to syncer.go * Add extra headers + return error if no impresison in the bid request * add optional placementId param * remove imp_adpone.go * fix adpone.json * remove some headers * added placementId as optional parameter * go fmt files * fix index out of ragne
* adpone adapter * adpone adapter * go fmt files * fix typo * remove extra information from req * fix testing * fix usersync_test * add adpone json schema * add adpone to syncer_test.go * add adpone to syncer.go * Add extra headers + return error if no impresison in the bid request * add optional placementId param * remove imp_adpone.go * fix adpone.json * remove some headers * added placementId as optional parameter * go fmt files * fix index out of ragne
* adpone adapter * adpone adapter * go fmt files * fix typo * remove extra information from req * fix testing * fix usersync_test * add adpone json schema * add adpone to syncer_test.go * add adpone to syncer.go * Add extra headers + return error if no impresison in the bid request * add optional placementId param * remove imp_adpone.go * fix adpone.json * remove some headers * added placementId as optional parameter * go fmt files * fix index out of ragne
* adpone adapter * adpone adapter * go fmt files * fix typo * remove extra information from req * fix testing * fix usersync_test * add adpone json schema * add adpone to syncer_test.go * add adpone to syncer.go * Add extra headers + return error if no impresison in the bid request * add optional placementId param * remove imp_adpone.go * fix adpone.json * remove some headers * added placementId as optional parameter * go fmt files * fix index out of ragne
No description provided.