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

feat: interest group storage helpers #35

Merged
merged 15 commits into from
Apr 17, 2021
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
strategy:
matrix:
node:
- 12
- 13
os:
- ubuntu-latest
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,32 @@ npm install --save @magnite/fledge.polyfill

## Usage

<!-- insert usage -->
### Directly in a browser

```html
<script type="module">
import { fledge } from "./node_modules/@magnite/fledge.polyfill/esm/index.js";

const options = {
owner: "www.buyer.com",
name: "an-interest-group",
bidding_logic_url: "https://dsp.com/bidding",
};

// join an interest group
fledge.joinAdInterestGroup(options, 864000000).then(response => console.log(response));

// leave an interest group
fledge.leaveAdInterestGroup(options).then(response => console.log(response));
</script>
```

## Where to Find Documentation

The best way to find out what's available is to dig through source code, as each directory has a README file to describe each feature.

* [Interest Groups](./src/interest-groups/README.md)

## How We Track Changes [![Keep a Changelog](https://img.shields.io/badge/Keep%20a%20Changelog-1.0.0-orange)](https://keepachangelog.com/en/1.0.0/)

This project uses a CHANGELOG and [GitHub releases](https://help.github.com/en/github/administering-a-repository/about-releases) which contains a curated, chronologically ordered list of notable changes for each version of a project. [Read more about changelogs](https://keepachangelog.com/en/1.0.0/).
Expand Down
25 changes: 25 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Fledge Prototype</title>
</head>
<body>
<script type="module">
import { fledge } from '../dist/esm/index.js';
const options = {
owner: 'www.rp.com',
name: 'womens-running-shoes',
bidding_logic_url: 'https://magnite.com/bidding',
};
fledge.joinAdInterestGroup(options, 2592000000).then(response => {
console.log({response});
});
/*
fledge.leaveAdInterestGroup(options).then(response => {
console.log({response});
});
*/
</script>
</body>
</html>
Loading