npm i @squarecloud/api
const { SquareCloudAPI } = require("@squarecloud/api");

const api = new SquareCloudAPI("Your API Key");

Parameters

API Key

  • Type: string
  • Required: Yes
  • Description: A valid API key must be provided as a string for authentication.

Get Started

Using the get started endpoint, you can obtain a user object representing the user associated with the API key, as well as a list of applications associated with the user.

const user = await api.users.get();
const application = user.applications.get("Application ID");

console.log(user.applications); // List of Application's

Application

Using the Client, you can obtain an object representing your application. This object is an instance of the Application class, allowing you to manage your application more conveniently without always needing to pass the ID.

Obtaining an Application
const app = user.applications.get("Application ID");
console.log(app); // Output: application object
Obtaining All Applications
console.log(user.applications); // user = api.users.get() [Promise]