NodeJS PlanetHoster API integration.
Please refer to the documentation of the PlanetHoster API for all endpoints details.
npm install ph-node-api
const PhNodeApi = require('ph-node-api');
async function testConnection(api) {
try {
console.log(await api.testConnection());
} catch (e) {
console.log(e);
}
}
const api = new PhNodeApi({
api_key: 'API_KEY',
api_user: 'API_USER'
});
testConnection(api);