Skip to content

Commit

Permalink
Merge pull request #5 from Connatix/add-cnx-adapter
Browse files Browse the repository at this point in the history
Increment package version to v3
  • Loading branch information
patrickszeleczki authored Nov 4, 2024
2 parents a69ba3c + ce01457 commit 4be32f5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
17 changes: 9 additions & 8 deletions adapters/connatix/connatix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (

"github.com/buger/jsonparser"
"github.com/prebid/openrtb/v20/openrtb2"
"github.com/prebid/prebid-server/v2/adapters"
"github.com/prebid/prebid-server/v2/config"
"github.com/prebid/prebid-server/v2/errortypes"
"github.com/prebid/prebid-server/v2/openrtb_ext"
"github.com/prebid/prebid-server/v3/adapters"
"github.com/prebid/prebid-server/v3/config"
"github.com/prebid/prebid-server/v3/errortypes"
"github.com/prebid/prebid-server/v3/openrtb_ext"
"github.com/prebid/prebid-server/v3/util/jsonutil"
)

const (
Expand Down Expand Up @@ -88,7 +89,7 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
}

var connatixResponse openrtb2.BidResponse
if err := json.Unmarshal(response.Body, &connatixResponse); err != nil {
if err := jsonutil.Unmarshal(response.Body, &connatixResponse); err != nil {
return nil, []error{err}
}

Expand All @@ -100,7 +101,7 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
var bidExt bidExt
var bidType openrtb_ext.BidType

if err := json.Unmarshal(bid.Ext, &bidExt); err != nil {
if err := jsonutil.Unmarshal(bid.Ext, &bidExt); err != nil {
bidType = openrtb_ext.BidTypeBanner
} else {
bidType = getBidType(bidExt)
Expand All @@ -120,7 +121,7 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest

func validateAndBuildImpExt(imp *openrtb2.Imp) (impExtIncoming, error) {
var ext impExtIncoming
if err := json.Unmarshal(imp.Ext, &ext); err != nil {
if err := jsonutil.Unmarshal(imp.Ext, &ext); err != nil {
return impExtIncoming{}, err
}

Expand Down Expand Up @@ -176,7 +177,7 @@ func splitRequests(imps []openrtb2.Imp, request *openrtb2.BidRequest, uri string
impsForReq := imps[startInd:endInd]
request.Imp = impsForReq

reqJSON, err := json.Marshal(request)
reqJSON, err := jsonutil.Marshal(request)
if err != nil {
errs = append(errs, err)
return nil, errs
Expand Down
6 changes: 3 additions & 3 deletions adapters/connatix/connatix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package connatix
import (
"testing"

"github.com/prebid/prebid-server/v2/adapters/adapterstest"
"github.com/prebid/prebid-server/v2/config"
"github.com/prebid/prebid-server/v2/openrtb_ext"
"github.com/prebid/prebid-server/v3/adapters/adapterstest"
"github.com/prebid/prebid-server/v3/config"
"github.com/prebid/prebid-server/v3/openrtb_ext"
)

func TestJsonSamples(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion adapters/connatix/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package connatix
import (
"net/url"

"github.com/prebid/prebid-server/v2/openrtb_ext"
"github.com/prebid/prebid-server/v3/openrtb_ext"
)

type adapter struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/connatix/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"testing"

"github.com/prebid/prebid-server/v2/openrtb_ext"
"github.com/prebid/prebid-server/v3/openrtb_ext"
)

// This file actually intends to test static/bidder-params/connatix.json
Expand Down
1 change: 1 addition & 0 deletions exchange/adapter_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import (
"github.com/prebid/prebid-server/v3/adapters/colossus"
"github.com/prebid/prebid-server/v3/adapters/compass"
"github.com/prebid/prebid-server/v3/adapters/concert"
"github.com/prebid/prebid-server/v3/adapters/connatix"
"github.com/prebid/prebid-server/v3/adapters/connectad"
"github.com/prebid/prebid-server/v3/adapters/consumable"
"github.com/prebid/prebid-server/v3/adapters/conversant"
Expand Down

0 comments on commit 4be32f5

Please sign in to comment.