CardTitle

Plattar API cardtitle Reference

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

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

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

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

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

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

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