Skip to main content

How to Save and Load a Shed Using the API

app.on("loaded", async function () {
console.log("Ready");
await app.load("J6Gui1kGUHJ/0");
const id = await app.getHash();
console.log("Loaded shed id: " + id);
const shed = await app.toJson();
console.log("Shed: ", shed.width, shed.height, shed.length);

// Make some changes to the shed using the UI

// Save the changes & get the latest id
await app.save();
const id2 = await app.getHash();
console.log("Loaded shed id: " + id2);
});