SceneVideo

Plattar API scenevideo Reference

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

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

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

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

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

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

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