Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@generatebanners/node-sdk
Advanced tools
GenerateBanners.com • API documentation • Twitter
Automate image generation with ease.
Use the GenerateBanners.com visual editor to create your templates. Use this SDK to generate many image variations.
To install the GenerateBanners SDK with NPM, run:
npm i @generatebanners/node-sdk
If you want to install it with Yarn instead, run:
yarn add @generatebanners/node-sdk
Load the module via require
:
const GenerateBanners = require('@generatebanners/node-sdk');
Get your API key and secret on the account page. We recommand you use environment variables to keep your crendentials secure.
const client = new GenerateBanners({
apiKey: process.env.GB_API_KEY,
apiSecret: process.env.GB_API_SECRET,
});
You would then run your file in the following way (if you have called your file index.js
):
GB_API_KEY=p_123 GB_API_SECRET=s_123 node index.js
const GenerateBanners = require('@generatebanners/node-sdk');
const client = new GenerateBanners({
apiKey: process.env.GB_API_KEY,
apiSecret: process.env.GB_API_SECRET,
});
// Find TEMPLATE_ID by going to https://www.generatebanners.com/app then clicking on your template
const imageUrl = client.image.signedUrl({
templateId: "TEMPLATE_ID",
variables: {
title_text: "My title",
},
});
const fs = require("fs").promises;
const GenerateBanners = require('@generatebanners/node-sdk');
async function main() {
const client = new GenerateBanners({
apiKey: process.env.GB_API_KEY,
apiSecret: process.env.GB_API_SECRET,
});
// Find TEMPLATE_ID by going to https://www.generatebanners.com/app then clicking on your template
const imageUrl = client.image.signedUrl({
templateId: "TEMPLATE_ID",
variables: {
title_text: "My title",
},
});
const img = await client.utils.download(imageUrl);
await fs.writeFile(`./generated-${Date.now()}.jpg`, img);
}
main();
FAQs
GenerateBanners SDK for JavaScript.
The npm package @generatebanners/node-sdk receives a total of 3 weekly downloads. As such, @generatebanners/node-sdk popularity was classified as not popular.
We found that @generatebanners/node-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.