bannerify-js, for a more typed and efficient experience. This SDK allows you to interact with our API without having to make HTTP requests directly.
Install
- npm
- pnpm
- yarn
- bun
Instantiate
If you want to use SDK, you will need your api key — you can create a new one in the settings. Afterwards you need to provide it to the client:Response format
Because forgetting to handle thrown errors properly in javascript is often forgotten, we have decided to explicitely return errors to be handled. Fortunately typescript helps us here and everything is typesafe. Every method returns either anerror or a result field, never both and never none.
Checking for errors
To check for errors you use theerror property, our errors are easy to read and provide a link to our documentation for more information.
Options
The constructor accepts some options to customize the behavior:API key
Your project’s API key