Skip to content

Commit

Permalink
Addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
infytvcode committed Jun 28, 2022
1 parent b734f9f commit 8cbf8ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adapters/infytv/infytv.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ import (
"github.com/prebid/prebid-server/openrtb_ext"
)

type Adapter struct {
type adapter struct {
endpoint string
}

// Builder builds a new instance of the InfyTV adapter for the given bidder with the given config.
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters.Bidder, error) {
bidder := &Adapter{
bidder := &adapter{
endpoint: config.Endpoint,
}
return bidder, nil
}

func (a *Adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
requestJSON, err := json.Marshal(request)
if err != nil {
return nil, []error{err}
Expand All @@ -39,7 +39,7 @@ func (a *Adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte
return []*adapters.RequestData{requestData}, nil
}

func (a *Adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) {
func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) {

if responseData.StatusCode == http.StatusNoContent {
return nil, nil
Expand Down
2 changes: 2 additions & 0 deletions adapters/infytv/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ func TestInvalidParams(t *testing.T) {

var validParams = []string{
`{"publisherId": "1598991608990"}`,
`{"publisherId": "1598991608990", "placementId": "9999"}`,
}

var invalidParams = []string{
`{"publisherId": 42}`,
`{"publisherId": 42, "placementId":9898}`,
}

0 comments on commit 8cbf8ee

Please sign in to comment.