SceneCarousel

Plattar API scenecarousel Reference

Parent
Relationships
Imports
NodeJS Imports
const {
  	Scene,
  	SceneCarousel,
  	Server
} = require('@plattar/plattar-api');
Initialisation
Initialise the SceneCarousel Object
const carousel = new SceneCarousel('your-scene-carousel-id');
.get()
Populate the object with data
carousel.get().then((carousel) => {
	// do something with carousel
}).catch((error) => {
	// do something with error
});
.update()
Update the object with new data
Server.default().auth(process.env.PLATTAR_AUTH_TOKEN);

carousel.attributes.title = 'your-new-scene-carousel-title';

carousel.update().then((carousel) => {
	// do something with carousel
}).catch((error) => {
	// do something with error
});
.create()
Create a new object
Server.default().auth(process.env.PLATTAR_AUTH_TOKEN);

carousel.attributes.title = 'your-new-scene-carousel-title';

// you must pass the parent object during create function
const parent = new Scene('your-scene-id');

carousel.create(parent).then((carousel) => {
	// do something with carousel
}).catch((error) => {
	// do something with error
});
.delete()
Delete a previous object
Server.default().auth(process.env.PLATTAR_AUTH_TOKEN);

carousel.delete().then((carousel) => {
	// do something with carousel
}).catch((error) => {
	// do something with error
});