import { OptiSigns } from "@optisigns/optisigns";
async function manageAssets() {
const client = new OptiSigns("YOUR_API_KEY");
try {
// Upload a new asset
const asset = await client.assets.uploadFileAsset(
"./path/to/image.jpg",
"team_id"
);
// Create a website asset
const websiteAsset = await client.assets.createWebsiteAppAsset(
{
url: "https://example.com",
title: "Company Website",
},
"team_id"
);
// Modify asset settings
await client.assets.modifyAssetSettings(
asset.id,
{
name: "Updated Asset Name",
},
"team_id"
);
} catch (error) {
console.error("Error:", error);
}
}