Skip to content

Commit fb811cc

Browse files
authored
Codex/document undocumented public api functions (#6092)
* docs: add missing public api pages * Delete dev-docs/publisher-api-reference/createBid.md
1 parent 186aeee commit fb811cc

File tree

5 files changed

+117
-0
lines changed

5 files changed

+117
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: api_prebidjs
3+
title: pbjs.getAdserverTargetingForAdUnitCodeStr(adunitCode)
4+
description: getAdserverTargetingForAdUnitCodeStr API
5+
sidebarType: 1
6+
---
7+
8+
Returns the query string targeting parameters available at the moment for the specified ad unit.
9+
10+
**Kind**: static method of `pbjs`.
11+
12+
**Returns**: `Array` - list of targeting key-value strings.
13+
14+
**Request Params:**
15+
16+
{: .table .table-bordered .table-striped }
17+
18+
| Param | Type | Description |
19+
| --- | --- | --- |
20+
| `adunitCode` | `string` | adUnitCode to get the bid responses for |
21+
22+
**Example**
23+
24+
```javascript
25+
const targetingStrings = pbjs.getAdserverTargetingForAdUnitCodeStr('div-1');
26+
// ["hb_bidder=appnexus", "hb_adid=233bcbee889d46d", ...]
27+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: api_prebidjs
3+
title: pbjs.processQueue()
4+
description: processQueue API
5+
sidebarType: 1
6+
---
7+
8+
Processes commands that were pushed onto `pbjs.cmd` or `pbjs.que` before Prebid.js finished loading.
9+
10+
**Kind**: static method of `pbjs`.
11+
12+
Calling this method manually is rarely necessary because Prebid.js runs it automatically when the library loads.
13+
14+
**Example**
15+
16+
```javascript
17+
pbjs.processQueue();
18+
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: api_prebidjs
3+
title: pbjs.registerAnalyticsAdapter(options)
4+
description: registerAnalyticsAdapter API
5+
sidebarType: 1
6+
---
7+
8+
Registers an analytics adapter so it can listen to auction events.
9+
10+
**Kind**: static method of `pbjs`.
11+
12+
**Request Params:**
13+
14+
{: .table .table-bordered .table-striped }
15+
16+
| Param | Type | Description |
17+
| --- | --- | --- |
18+
| `options` | `object` | Object containing the adapter instance and code |
19+
20+
**Example**
21+
22+
```javascript
23+
pbjs.registerAnalyticsAdapter({
24+
adapter: myAnalyticsAdapter,
25+
code: 'myAnalytics',
26+
gvlid: 1
27+
});
28+
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: api_prebidjs
3+
title: pbjs.registerBidAdapter(bidderAdapter, bidderCode)
4+
description: registerBidAdapter API
5+
sidebarType: 1
6+
---
7+
8+
Registers a custom bid adapter for use within Prebid.js.
9+
10+
**Kind**: static method of `pbjs`.
11+
12+
**Request Params:**
13+
14+
{: .table .table-bordered .table-striped }
15+
16+
| Param | Type | Description |
17+
| --- | --- | --- |
18+
| `bidderAdapter` | `function` | Adapter instance that returns a `callBids` function |
19+
| `bidderCode` | `string` | Code that identifies the adapter |
20+
21+
**Example**
22+
23+
```javascript
24+
function myAdapter() {
25+
return { callBids: function() { /* ... */ } };
26+
}
27+
pbjs.registerBidAdapter(myAdapter, 'my');
28+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: api_prebidjs
3+
title: pbjs.triggerUserSyncs()
4+
description: triggerUserSyncs API
5+
sidebarType: 1
6+
---
7+
8+
Manually initiates user syncs when the `userSync.enableOverride` setting is enabled.
9+
10+
**Kind**: static method of `pbjs`.
11+
12+
**Example**
13+
14+
```javascript
15+
pbjs.triggerUserSyncs();
16+
```

0 commit comments

Comments
 (0)