1.0.6 • Published 10 months ago

infr v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Infr

Infr - API for Better Ads Infr is a Node.js wrapper for the Infr API. It provides methods to interact with the Infr API and retrieve ad data. The complete documentation & more packages for the Infr API can be found here.

Installation

Install the package with npm:

npm install infr

Usage First, import the InfrDisplayer class from the package:

import { InfrDisplayer } from 'infr';

Next, create an instance of InfrDisplayer with your public API key:

const infr = new InfrDisplayer('your-public-key');

You can then call the getAd method to retrieve an ad:

const ad = await infr.getAd('A test backdrop');

The getAd method returns a Promise that resolves to the ad data.

Development Mode

If you want to use the package in development mode (which will use the test environment and test API key), pass development as the third argument when creating an instance of InfrDisplayer:

// Use the test environment and test API key
// Using `test` will also suffice
const infr = new InfrDisplayer('test');

Testing

To run the package's tests, use the npm test command:

npm test

Issues

If you have any issues with the package, please file an issue on GitHub

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago