Plattar API SDK is an NPM Module that allows interfacing with the Plattar API in an object-oriented way.

The software is open source and maintained by the Plattar team. Souce code can be found in Plattar Github Repository at plattar-api sdk.

Run the following command to install using NPM
npm install @plattar/plattar-api

Below is a sample js code to check if the module has installed and working correctly.

Sample code to get your project data
const {
  Project
} = require('@plattar/plattar-api');

// this is a sample project id created for this demo
const project = new Project('267f1c90-e5b8-11ea-a494-c7a7855ca934');

project.get().then((proj) => {
  // print our project data
  console.log(proj.attributes);
}).catch((error) => {
  console.error(error);
});

A successful output like below will print in your console.

Console output of the sample code
Some sections omitted
{
  "title": "Test Project",
  "theme": "plattarxr/www",
  "..."
}