Skip to content

Commit

Permalink
feat(sublimeBidAdapter): updating sublimeBidAdapter module (#5726)
Browse files Browse the repository at this point in the history
- handle new notifyId parameter;
- bumping version to 0.6.0.
  • Loading branch information
fgcloutier authored Sep 24, 2020
1 parent 7f2d81a commit 80fc5b6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
11 changes: 7 additions & 4 deletions modules/sublimeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const DEFAULT_CURRENCY = 'EUR';
const DEFAULT_PROTOCOL = 'https';
const DEFAULT_TTL = 600;
const SUBLIME_ANTENNA = 'antenna.ayads.co';
const SUBLIME_VERSION = '0.5.2';
const SUBLIME_VERSION = '0.6.0';

/**
* Debug log message
Expand All @@ -23,7 +23,8 @@ export function log(msg, obj) {
// Default state
export const state = {
zoneId: '',
transactionId: ''
transactionId: '',
notifyId: ''
};

/**
Expand All @@ -47,8 +48,8 @@ export function sendEvent(eventName) {
z: state.zoneId,
e: eventName,
src: 'pa',
puid: state.transactionId,
trId: state.transactionId,
puid: state.transactionId || state.notifyId,
trId: state.transactionId || state.notifyId,
ver: SUBLIME_VERSION,
};

Expand Down Expand Up @@ -101,6 +102,7 @@ function buildRequests(validBidRequests, bidderRequest) {

setState({
transactionId: bid.transactionId,
notifyId: bid.params.notifyId,
zoneId: bid.params.zoneId,
debug: bid.params.debug || false,
});
Expand All @@ -117,6 +119,7 @@ function buildRequests(validBidRequests, bidderRequest) {
h: size[1],
})),
transactionId: bid.transactionId,
notifyId: bid.params.notifyId,
zoneId: bid.params.zoneId,
};

Expand Down
9 changes: 6 additions & 3 deletions modules/sublimeBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Maintainer: pbjs@sublimeskinz.com
# Description

Connects to Sublime for bids.
Sublime bid adapter supports Skinz and M-Skinz formats.
Sublime bid adapter supports Skinz.

# Nota Bene

Expand Down Expand Up @@ -53,10 +53,13 @@ var adUnits = [{
bids: [{
bidder: 'sublime',
params: {
zoneId: <zoneId>
zoneId: <zoneId>,
notifyId: <notifyId>
}
}]
}];
```

Where you replace `<zoneId>` by your Sublime Zone id
Where you replace:
- `<zoneId>` by your Sublime Zone id;
- `<notifyId>` by your Sublime Notify id
6 changes: 3 additions & 3 deletions test/spec/modules/sublimeBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('Sublime Adapter', function() {
currency: 'USD',
netRevenue: true,
ttl: 600,
pbav: '0.5.2',
pbav: '0.6.0',
ad: '',
},
];
Expand Down Expand Up @@ -191,7 +191,7 @@ describe('Sublime Adapter', function() {
netRevenue: true,
ttl: 600,
ad: '<!-- Creative -->',
pbav: '0.5.2',
pbav: '0.6.0',
};

expect(result[0]).to.deep.equal(expectedResponse);
Expand Down Expand Up @@ -241,7 +241,7 @@ describe('Sublime Adapter', function() {
netRevenue: true,
ttl: 600,
ad: '<!-- ad -->',
pbav: '0.5.2',
pbav: '0.6.0',
};

expect(result[0]).to.deep.equal(expectedResponse);
Expand Down

0 comments on commit 80fc5b6

Please sign in to comment.