Skip to content

Conversation

@Heihuang
Copy link

Adding iqiyi prebid server adapter

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 9d4c906

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:38:	MakeRequests		83.9%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:96:	MakeBids		86.7%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:130:	getMediaTypeForImp	80.0%
total:								(statements)		84.5%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, c36b02c

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:38:	MakeRequests		83.9%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:96:	MakeBids		86.7%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:130:	getMediaTypeForImp	80.0%
total:								(statements)		84.5%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, cf8485b

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	pickCurrency		60.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	Builder			80.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:45:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:50:	MakeRequests		83.9%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:108:	MakeBids		87.5%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:143:	getMediaTypeForImp	80.0%
total:								(statements)		82.8%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, a937b11

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	pickCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	Builder			85.7%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:54:	MakeRequests		96.8%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:112:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:147:	getMediaTypeForImp	100.0%
total:								(statements)		97.0%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 3346579

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	pickCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:54:	MakeRequests		94.3%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:114:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:149:	getMediaTypeForImp	100.0%
total:								(statements)		97.1%

remove go.mod and go.sum files

add go.mod go.sum

format json file
@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, e254d40

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	pickCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:54:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:114:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:149:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@bsardo bsardo added the adapter label Nov 18, 2025
@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 9e70614

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	pickCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:54:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:114:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:149:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@bsardo
Copy link
Collaborator

bsardo commented Nov 20, 2025

@Heihuang your tests are failing due to formatting issues. Please run go fmt.

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 9c8c4cb

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:21:	pickCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:33:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:49:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:54:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:114:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:149:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@postindustria-code
Copy link
Contributor

I send a request via postman:

{
    "id": "some-random-id",
    "test": 1,
    "imp": [
        {
            "id": "adunit-1",
            "banner": {
                "format": [
                    {
                        "w": 300,
                        "h": 200
                    },
                    {
                        "w": 300,
                        "h": 250
                    }
                ]
            },
            "ext": {
                "prebid": {
                    "bidder": {
                        "iqiyi": {
                            "accountid": "123456"
                        }
                    }
                }
            }
        }
    ],
    "device": {
        // data
    },
    "regs": {
        // data
    },
    "user": {
        // data
    },
    "site": {
        "domain": "dailyleap.com",
        "publisher": {
            "domain": "dailyleap.com",
            "id": "p-bid-account-y9eg0fEH"
        },
        "page": "https://www.dailyleap.com/12-fun-workouts-to-try-if-you-hate-the-gym-but-want-to-get-fit/",
        "ref": "https://www.dailyleap.com/"
    },
    "ext": {
        "prebid": {
            "auctiontimestamp": 1733226735069,
            "targeting": {
                "includewinners": true,
                "includebidderkeys": false
            },
            "cache": {
                "bids": {
                    "returnCreative": true
                },
                "vastxml": {
                    "returnCreative": true
                }
            },
            "schains": [
                {
                    "bidders": [
                        "iqiyi"
                    ],
                    "schain": {
                        "ver": "1.0",
                        "complete": 1,
                        "nodes": [
                            {
                                "asi": "adapex.io",
                                "sid": "s4103",
                                "hp": 1
                            }
                        ]
                    }
                }
            ],
            "channel": {
                "name": "pbjs",
                "version": "v9.20.0"
            },
            "aliases": {
                "adtelligents2s": "adtelligent"
            },
            "floors": {
                "enabled": false,
                "floorMin": 0.1,
                "floorMinCur": "USD"
            },
            "createtids": false
        },
        "tmaxmax": 2000
    },
    "cur": [
        "USD"
    ],
    "tmax": 1500
}

And I got the response with this error:

{
...
        "errors": {
            "iqiyi": [
                {
                    "code": 14,
                    "message":"expect { or n, but found �"
                }
            ]
        },
        ...
        }

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 0164a55

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:120:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:155:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 44d93de

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:120:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:155:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 8202caf

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:121:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:156:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 915de84

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:121:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:156:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 55901f9

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:121:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:156:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 20a7a08

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:121:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:156:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

Copy link
Contributor

@pm-nikhil-vaidya pm-nikhil-vaidya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added minor comment, rest looks good

Comment on lines +122 to +130
if response.StatusCode == http.StatusNoContent {
return nil, nil
}

if response.StatusCode != http.StatusOK {
return nil, []error{&errortypes.BadServerResponse{
Message: fmt.Sprintf("Unexpected http status code: %d", response.StatusCode),
}}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Use adapters.IsResponseStatusCodeNoContent and adapters.CheckResponseStatusCodeForErrors for checking errors

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 29f1e54

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:121:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:156:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

@github-actions
Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 04a799f

iqiyi

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:27:	selectCurrency		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:39:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:55:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:60:	MakeRequests		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:121:	MakeBids		100.0%
github.com/prebid/prebid-server/v3/adapters/iqiyi/iqiyi.go:156:	getMediaTypeForImp	100.0%
total:								(statements)		100.0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants