Skip to content
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

Ivp 3828 #17

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3cfdf9d
add Rise adapter
noamtzuberi Jan 3, 2021
923e646
fixes
noamtzuberi Jan 3, 2021
499f36f
change param isOrg to org
noamtzuberi Jan 5, 2021
d33a8af
Rise adapter
noamtzuberi Jan 5, 2021
b2cdd97
change email for rise
noamtzuberi Jan 5, 2021
b8a140c
change email for rise
noamtzuberi Jan 5, 2021
3ce6a3b
fix circle failed
noamtzuberi Jan 5, 2021
dd10c25
bump
noamtzuberi Jan 5, 2021
464d2b7
bump
noamtzuberi Jan 5, 2021
1c52066
bump
noamtzuberi Jan 5, 2021
2b1fad5
remove space
noamtzuberi Jan 6, 2021
b08dd59
Merge branch 'master' of https://github.com/streamrail/Prebid.js
noamtzu Jul 6, 2021
924bb15
Upgrade Rise adapter to 5.0
noamtzu Jul 6, 2021
0f9e730
Merge branch 'prebid:master' into master
noamtzu Jul 13, 2021
87c6a56
Merge branch 'prebid:master' into master
noamtzu Jul 20, 2021
e8e613b
Merge branch 'master' of https://github.com/streamrail/Prebid.js
noamtzu Aug 18, 2021
1ba7048
Merge branch 'master' of github.com:prebid/Prebid.js
Aug 23, 2021
a032702
Merge branch 'prebid:master' into master
noamtzu Aug 27, 2021
a5e5954
Merge branch 'prebid:master' into master
noamtzu Sep 5, 2021
bc2dafd
Merge branch 'prebid:master' into master
noamtzu Sep 12, 2021
75344c1
Merge branch 'prebid:master' into master
noamtzu Sep 19, 2021
2e17e14
Merge branch 'prebid:master' into master
noamtzu Nov 21, 2021
03099f3
Merge branch 'prebid:master' into master
noamtzu Jan 13, 2022
5c30696
Merge branch 'prebid:master' into master
noamtzu Jan 17, 2022
bc1d897
Merge branch 'prebid:master' into master
noamtzu Jan 23, 2022
3ed7867
Merge branch 'prebid:master' into master
noamtzu Jan 27, 2022
9d8d6af
Merge branch 'prebid:master' into master
noamtzu Jan 30, 2022
12ef7fb
Merge branch 'prebid:master' into master
noamtzu Feb 10, 2022
a4bfb4f
Merge branch 'prebid:master' into master
OronW Feb 17, 2022
901d081
Merge branch 'prebid:master' into master
noamtzu Feb 21, 2022
33be3da
Merge branch 'prebid:master' into master
noamtzu Mar 7, 2022
0305688
Merge branch 'prebid:master' into master
noamtzu Mar 29, 2022
968253b
Merge branch 'prebid:master' into master
noamtzu Apr 3, 2022
208a3ef
Merge branch 'prebid:master' into master
noamtzu Apr 17, 2022
756ccf3
Merge branch 'prebid:master' into master
noamtzu May 12, 2022
dc33d03
Merge branch 'prebid:master' into master
noamtzu May 22, 2022
e27c291
Merge branch 'prebid:master' into master
noamtzu May 25, 2022
4fc0639
Merge branch 'prebid:master' into master
noamtzu Jun 8, 2022
4bbbbb3
Merge branch 'prebid:master' into master
noamtzu Jun 9, 2022
8e9318d
Merge branch 'prebid:master' into master
lasloche Jun 14, 2022
54e0d62
support rtbDomain seller end point
Aug 2, 2022
27e9a02
Merge branch 'prebid:master' into master
noamtzu Aug 3, 2022
7db5a5c
removed hb. from rtbDomain end point
Aug 3, 2022
2c43f6a
added rtbDomain to docs
Aug 7, 2022
6a4f2eb
Merge branch 'master' into IVP-3828
Aug 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions modules/riseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const BIDDER_CODE = 'rise';
const ADAPTER_VERSION = '6.0.0';
const TTL = 360;
const CURRENCY = 'USD';
const SELLER_ENDPOINT = 'https://hb.yellowblue.io/';
const DEFAULT_SELLER_ENDPOINT = 'https://hb.yellowblue.io/';
const MODES = {
PRODUCTION: 'hb-multi',
TEST: 'hb-multi-test'
Expand Down Expand Up @@ -42,13 +42,14 @@ export const spec = {
// use data from the first bid, to create the general params for all bids
const generalObject = validBidRequests[0];
const testMode = generalObject.params.testMode;
const rtbDomain = generalObject.params.rtbDomain;

combinedRequestsObject.params = generateGeneralParams(generalObject, bidderRequest);
combinedRequestsObject.bids = generateBidsParams(validBidRequests, bidderRequest);

return {
method: 'POST',
url: getEndpoint(testMode),
url: getEndpoint(testMode, rtbDomain),
data: combinedRequestsObject
}
},
Expand Down Expand Up @@ -223,9 +224,11 @@ function isSyncMethodAllowed(syncRule, bidderCode) {
/**
* Get the seller endpoint
* @param testMode {boolean}
* @param rtbDomain {string}
* @returns {string}
*/
function getEndpoint(testMode) {
function getEndpoint(testMode, rtbDomain) {
const SELLER_ENDPOINT = rtbDomain ? `https://${rtbDomain}/` : DEFAULT_SELLER_ENDPOINT;
return testMode
? SELLER_ENDPOINT + MODES.TEST
: SELLER_ENDPOINT + MODES.PRODUCTION;
Expand Down
17 changes: 17 additions & 0 deletions test/spec/modules/riseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import * as utils from 'src/utils.js';

const ENDPOINT = 'https://hb.yellowblue.io/hb-multi';
const TEST_ENDPOINT = 'https://hb.yellowblue.io/hb-multi-test';
const RTB_DOMAIN_TEST = 'testseller.com';
const RTB_DOMAIN_ENDPOINT = `https://${RTB_DOMAIN_TEST}/hb-multi`;
const RTB_DOMAIN_TEST_ENDPOINT = `https://${RTB_DOMAIN_TEST}/hb-multi-test`;
const TTL = 360;
/* eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */

Expand Down Expand Up @@ -119,6 +122,20 @@ describe('riseAdapter', function () {
expect(request.method).to.equal('POST');
});

it('sends bid request to rtbDomain ENDPOINT via POST', function () {
bidRequests[0].params.rtbDomain = RTB_DOMAIN_TEST;
const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.url).to.equal(RTB_DOMAIN_ENDPOINT);
expect(request.method).to.equal('POST');
});

it('sends bid request to rtbDomain TEST ENDPOINT via POST', function () {
testModeBidRequests[0].params.rtbDomain = RTB_DOMAIN_TEST;
const request = spec.buildRequests(testModeBidRequests, bidderRequest);
expect(request.url).to.equal(RTB_DOMAIN_TEST_ENDPOINT);
expect(request.method).to.equal('POST');
});

it('should send the correct bid Id', function () {
const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.data.bids[0].bidId).to.equal('299ffc8cca0b87');
Expand Down