@brandbird/integration
v0.1.8
Published
Integrate Brandbird into your web app
Downloads
5
Readme
Installation
With NPM
npm i @brandbird/integration
With yarn
yarn add @brandbird/integration
Usage
Be aware that we restrict the integration of Brandbird by platforms at the moment. Are you interested? Hit us up at [email protected]
import { openBrandBird } from '@brandbird/integration';
async function() {
try {
const blob = await openBrandBird(
{
provider: 'YOUR PRODUCT NAME', // The name of your own product
src: 'Image in Base64 format or a public URL', // Optional: input image to editor
platform: 'twitter', // Optional: adjust the canvas size ('twitter' | 'instagram' | 'linkedin' | 'facebook')
width: 1200, // Optional
height: 900, // Optional
}
);
// do something with the blob, e.g. create an object url to show it in an img tag:
// URL.createObjectURL(blob);
} catch (error) {
// error handling
}
}