npm i @marxlnfcs/powerdns
/** SimpleClient */
(async () => {
// create a new simple client instance
const client = createPowerDNSSimpleClient({
baseUrl: 'http://localhost:8082/api/v1',
apiKey: 'apikey'
});
// get information about the domain "example.com"
console.log(await client.getDomain("example.com"));
});
/** AdvancedClient */
(async () => {
// create a new advanced client instance
const client = createPowerDNSAdvancedClient({
baseUrl: 'http://localhost:8082/api/v1',
apiKey: 'apikey'
});
// get information about the zone "example.com" with records
console.log(await client.getZone("example.com", {
rrsets: true
}));
});
The simple client integrates all common functions for domain management.
The advanced client is directly connected to the PowerDNS API and has all API-endpoints implemented.
Generated using TypeDoc