Project

Plattar API application Reference

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

project.attributes.title = 'your-new-project-title';

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

project.attributes.title = 'your-new-project-title';

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

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