Skip to content

Commit 6f7299a

Browse files
Merge pull request #1 from mycodemedia/feature/prebid.js
mycodemedia/prebid.js
2 parents f411575 + ccbf724 commit 6f7299a

File tree

3 files changed

+611
-0
lines changed

3 files changed

+611
-0
lines changed

modules/mycodemediaBidAdapter.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { registerBidder } from '../src/adapters/bidderFactory.js';
2+
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
3+
import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs } from '../libraries/teqblazeUtils/bidderUtils.js';
4+
5+
const BIDDER_CODE = 'mycodemedia';
6+
const AD_URL = 'https://east-backend.mycodemedia.com/pbjs';
7+
const SYNC_URL = 'https://usersync.mycodemedia.com';
8+
9+
export const spec = {
10+
code: BIDDER_CODE,
11+
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
12+
13+
isBidRequestValid: isBidRequestValid(),
14+
buildRequests: buildRequests(AD_URL),
15+
interpretResponse,
16+
getUserSyncs: getUserSyncs(SYNC_URL)
17+
};
18+
19+
registerBidder(spec);

modules/mycodemediaBidAdapter.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Overview
2+
3+
```
4+
Module Name: MyCodeMedia Bidder Adapter
5+
Module Type: MyCodeMedia Bidder Adapter
6+
Maintainer: [email protected]
7+
```
8+
9+
# Description
10+
11+
Connects to MyCodeMedia exchange for bids.
12+
MyCodeMedia bid adapter supports Banner, Video (instream and outstream) and Native.
13+
14+
# Test Parameters
15+
```
16+
var adUnits = [
17+
// Will return static test banner
18+
{
19+
code: 'adunit1',
20+
mediaTypes: {
21+
banner: {
22+
sizes: [ [300, 250], [320, 50] ],
23+
}
24+
},
25+
bids: [
26+
{
27+
bidder: 'mycodemedia',
28+
params: {
29+
placementId: 'testBanner',
30+
}
31+
}
32+
]
33+
},
34+
{
35+
code: 'addunit2',
36+
mediaTypes: {
37+
video: {
38+
playerSize: [ [640, 480] ],
39+
context: 'instream',
40+
minduration: 5,
41+
maxduration: 60,
42+
}
43+
},
44+
bids: [
45+
{
46+
bidder: 'mycodemedia',
47+
params: {
48+
placementId: 'testVideo',
49+
}
50+
}
51+
]
52+
},
53+
{
54+
code: 'addunit3',
55+
mediaTypes: {
56+
native: {
57+
title: {
58+
required: true
59+
},
60+
body: {
61+
required: true
62+
},
63+
icon: {
64+
required: true,
65+
size: [64, 64]
66+
}
67+
}
68+
},
69+
bids: [
70+
{
71+
bidder: 'mycodemedia',
72+
params: {
73+
placementId: 'testNative',
74+
}
75+
}
76+
]
77+
}
78+
];
79+
```

0 commit comments

Comments
 (0)