The add on takes URL of the simulator, extracts id or friendly slug depending on the URL type and performs a query to extract image. However, the API gets the image based on id. So it cannot get the image based on friendly slug.
function getCircuitImagePath(id) {
var queryUrl = `circuitverse.org/api/v1/projects/${id}/image_preview`;
return JSON.parse(UrlFetchApp.fetch(queryUrl))["project_preview"];
}
The add on takes URL of the simulator, extracts id or friendly slug depending on the URL type and performs a query to extract image. However, the API gets the image based on id. So it cannot get the image based on friendly slug.
File of API usage: https://github.com/CircuitVerse/CircuitVerse-Presentation-Embed/blob/5b7d02aaec4a662749c1a3a26dd425a2cb6db136/Google%20Slides%20Add%20On/Code.js#L42
I think there are a few options
@tachyons, @Nitish145 any inputs here?