-
Notifications
You must be signed in to change notification settings - Fork 2.4k
LunamediaHB Bid Adapter: transfer maintenance to Ferio #15099
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +1,103 @@ | ||
| # Overview | ||
|
|
||
| ``` | ||
| Module Name: lunamedia Bidder Adapter | ||
| Module Type: lunamedia Bidder Adapter | ||
| Maintainer: support@lunamedia.io | ||
| Module Name: LunamediaHB Bidder Adapter | ||
| Module Type: Bidder Adapter | ||
| Maintainer: prebid@ferio.cloud | ||
| ``` | ||
|
|
||
| # Description | ||
|
|
||
| Module that connects to lunamedia demand sources | ||
| Module that connects to LunamediaHB demand sources. | ||
|
|
||
| # Bid Params | ||
|
|
||
| | Name | Scope | Type | Description | | ||
| | ------------- | -------- | ------ | ---------------------------------------- | | ||
| | `publisherId` | required | String | Publisher ID on the Lunamedia platform. | | ||
| | `adUnitId` | required | String | Ad unit ID on the Lunamedia platform. | | ||
| | `tenantId` | required | String | Tenant ID on the Lunamedia platform. | | ||
|
|
||
| # Test Parameters | ||
| ``` | ||
| var adUnits = [ | ||
| { | ||
| code:'1', | ||
| mediaTypes:{ | ||
| banner: { | ||
| sizes: [[300, 250]], | ||
| } | ||
| }, | ||
| bids:[ | ||
| { | ||
| bidder: 'lunamediahb', | ||
| params: { | ||
| placementId: 0 | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| code:'1', | ||
| mediaTypes:{ | ||
| video: { | ||
| playerSize: [640, 480], | ||
| context: 'instream' | ||
| } | ||
| }, | ||
| bids:[ | ||
| { | ||
| bidder: 'lunamediahb', | ||
| params: { | ||
| placementId: 0 | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| code:'1', | ||
| mediaTypes:{ | ||
| native: { | ||
| title: { | ||
| required: true | ||
| }, | ||
| icon: { | ||
| required: true, | ||
| size: [64, 64] | ||
| } | ||
| } | ||
| }, | ||
| bids:[ | ||
| { | ||
| bidder: 'lunamediahb', | ||
| params: { | ||
| placementId: 0 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ]; | ||
|
|
||
| ```javascript | ||
| var adUnits = [ | ||
| { | ||
| code: "banner-div", | ||
| mediaTypes: { | ||
| banner: { | ||
| sizes: [[300, 250]], | ||
| }, | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: "lunamediahb", | ||
| params: { | ||
| publisherId: "publisher-123", | ||
| adUnitId: "ad-unit-456", | ||
| tenantId: "tenant-789", | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| code: "video-div", | ||
| mediaTypes: { | ||
| video: { | ||
| playerSize: [640, 480], | ||
| context: "instream", | ||
| mimes: ["video/mp4"], | ||
| protocols: [2, 3, 5, 6], | ||
| }, | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: "lunamediahb", | ||
| params: { | ||
| publisherId: "publisher-123", | ||
| adUnitId: "ad-unit-456", | ||
| tenantId: "tenant-789", | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| code: "native-div", | ||
| mediaTypes: { | ||
| native: { | ||
| ortb: { | ||
| ver: "1.2", | ||
| assets: [ | ||
| { | ||
| id: 1, | ||
| required: 1, | ||
| title: { | ||
| len: 90, | ||
| }, | ||
| }, | ||
| { | ||
| id: 2, | ||
| required: 1, | ||
| img: { | ||
| type: 3, | ||
| w: 300, | ||
| h: 250, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| }, | ||
| bids: [ | ||
| { | ||
| bidder: "lunamediahb", | ||
| params: { | ||
| publisherId: "publisher-123", | ||
| adUnitId: "ad-unit-456", | ||
| tenantId: "tenant-789", | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| ]; | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { | ||
| type BidderSpec, | ||
| registerBidder, | ||
| } from "../src/adapters/bidderFactory.js"; | ||
| import { createFerioBidderSpec } from "../libraries/ferioUtils/bidderUtils.js"; | ||
|
|
||
| const BIDDER_CODE = "lunamediahb"; | ||
| const LUNAMEDIAHB_ENDPOINT = "https://lunamedia.bid/prebid"; | ||
| const LUNAMEDIAHB_GVLID = 998; | ||
|
|
||
| export interface LunamediaHBBidParams { | ||
| publisherId: string; | ||
| adUnitId: string; | ||
| tenantId: string; | ||
| } | ||
|
|
||
| declare module "../src/adUnits" { | ||
| interface BidderParams { | ||
| [BIDDER_CODE]: LunamediaHBBidParams; | ||
| } | ||
| } | ||
|
|
||
| export const spec: BidderSpec<typeof BIDDER_CODE> = { | ||
| ...createFerioBidderSpec({ | ||
| code: BIDDER_CODE, | ||
| endpoint: LUNAMEDIAHB_ENDPOINT, | ||
| requiredParams: ["tenantId"], | ||
| }), | ||
|
Comment on lines
+24
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When COPPA is enabled ( Useful? React with 👍 / 👎. |
||
| gvlid: LUNAMEDIAHB_GVLID, | ||
| }; | ||
|
|
||
| registerBidder(spec); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't require new params in a minor version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Can we remove the lunamediahb adapter and incorporate it as a ferio adapter alias within minor version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but leave a stub in place that does a noop so you don't break a build script looking for the file. There's a few examples of this live
Then the stub would get cleaned up in next major version
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still the issue of breaking publishers with different params though, this isn't a workaround to that
#14991 has the same struggle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copying advice from slack here