A Node.js wrapper for the JustAnotherPanel API. Made by fknMega
npm install justanotherpanel-api-wrapper
First, import the library:
const Api = require('justanotherpanel-api-wrapper');
Initialize the API client with your API key:
const client = new Api();
client.api_key = 'YOUR_API_KEY';
Here's a list of available methods and how to use them:
Place an order:
const orderData = {
// ...your order details here
};
client.order(orderData).then(response => console.log(response));
Check the status of an order:
const orderId = 'YOUR_ORDER_ID';
client.status(orderId).then(response => console.log(response));
Check the status of multiple orders:
const orderIds = ['ORDER_ID_1', 'ORDER_ID_2'];
client.multiStatus(orderIds).then(response => console.log(response));
Get a list of available services:
client.services().then(response => console.log(response));
Check your balance:
client.balance().then(response => console.log(response));
... and so on for the other methods.
- node-fetch
ISC