ScenePanorama

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

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

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

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

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

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

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