Planethoster Api
An async API wrapper for the PlanetHoster API, every call will return a promise
Please refer to the documentation of the PlanetHoster API for all calls explained.
You can try it now with NPM RunKit
Installation
npm install planethoster-api
Initialization
In order to use this module, you have to import it first
var planethosterApi = ;
Then, initialize the PlanetHoster object with the keys you obtained from the PlanetHoster Dashboard
const planethosterClient = api_key: 'API_KEY' api_user: 'API_USER'
Examples
// Domain API{ let res = await planethosterClient; console;} ; // World API{ let res = await planethosterClient; console;} ;
Possible functions
Make sure to checkout documentation for specific parameters and more explanation ApiDoc
Domain
let res = await planethosterClient... // options down below
// Returns domain name prices for registration, renewal and transfer. // Returns information pertinent to your reseller account. (active doamin, credit left, etc..) // Checks whether a domain name is available to register. // Retrieve information for a domain which you successfully registered or created a transfer order. // Returns the contact information (WHOIS information) for the active domain name. // Returns the nameservers for a registered domain name. // Retrieves the DNS records for the active domain name registered with PlanetHoster. // Get the lock status of a registered domain name. // Saves the contact information (WHOIS information) for the given active domain name. // Update nameservers associated with your domain. // Saves the DNS records for the active domain name registered with PlanetHoster. // Lock or unlock a registered and active domain name. // Email the domain name registrant their EPP code (also called Auth Info) for the given domain. // Attempts to register a domain name for 1 to 10 years. // Renew an already active domain name for 1-10 years. // Transfer a domain name from your current registrar to PlanetHoster. // Deletes the DNS zone on the PlanetHoster DNS servers for the given domain.
World (Hosting)
let res = await planethosterClient... // options down below
// Displays The World account and all World sub accounts information. // Creates a world hosting account, assigns the requested resources and install a CMS // Proceed to the suspension of a World account. // Reactivate suspended world account. // Modify the resources associated with a World account. // Increases resources associated with The World account.