From 8cbf8ee2d2dc6a9ed9b914c15c64f63b328a9a49 Mon Sep 17 00:00:00 2001 From: Nayan Date: Tue, 28 Jun 2022 06:08:03 +0000 Subject: [PATCH] Addressing PR comments --- adapters/infytv/infytv.go | 8 ++++---- adapters/infytv/params_test.go | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/adapters/infytv/infytv.go b/adapters/infytv/infytv.go index 4b63cbdaf9a..af41958b1c1 100644 --- a/adapters/infytv/infytv.go +++ b/adapters/infytv/infytv.go @@ -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} @@ -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 diff --git a/adapters/infytv/params_test.go b/adapters/infytv/params_test.go index c08bdeee31e..6719b102622 100644 --- a/adapters/infytv/params_test.go +++ b/adapters/infytv/params_test.go @@ -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}`, }