This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

planethoster-api
TypeScript icon, indicating that this package has built-in type declarations

1.6.3 • Public • Published

Planethoster Api

NPM

Build Status License: MIT

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 = require('planethoster-api');

Then, initialize the PlanetHoster object with the keys you obtained from the PlanetHoster Dashboard

const planethosterClient = new planethosterApi({
  api_key: 'API_KEY',
  api_user: 'API_USER'
})

Examples

// Domain API
async function domainTestConnection(){
    let res = await planethosterClient.domain().testConnection();
    console.log(res);
}
 
domainTestConnection();
 
// World API
async function worldTestConnection(){
    let res = await planethosterClient.world().testConnection();
    console.log(res);
}
 
worldTestConnection();

Possible functions

Make sure to checkout documentation for specific parameters and more explanation ApiDoc

Domain

let res = await planethosterClient.domain()[...] // options down below
.tldPrices() // Returns domain name prices for registration, renewal and transfer.
.accountInfo() // Returns information pertinent to your reseller account. (active doamin, credit left, etc..)
.checkAvailability({}) // Checks whether a domain name is available to register.
.domainInfo() // Retrieve information for a domain which you successfully registered or created a transfer order.
.getContactDetails() // Returns the contact information (WHOIS information) for the active domain name.
.getNameservers() // Returns the nameservers for a registered domain name.
.getPhDnsRecord() // Retrieves the DNS records for the active domain name registered with PlanetHoster.
.getRegistrarLock() // Get the lock status of a registered domain name.
.saveContactDetails() // Saves the contact information (WHOIS information) for the given active domain name.
.saveNameservers() // Update nameservers associated with your domain.
.savePhDnsRecords() // Saves the DNS records for the active domain name registered with PlanetHoster.
.saveRegistrarLock() // Lock or unlock a registered and active domain name.
.emailEppCode() // Email the domain name registrant their EPP code (also called Auth Info) for the given domain.
.registerDomain() // Attempts to register a domain name for 1 to 10 years.
.renewDomain() // Renew an already active domain name for 1-10 years.
.transferDomain() // Transfer a domain name from your current registrar to PlanetHoster.
.deletePhDnsZone() // Deletes the DNS zone on the PlanetHoster DNS servers for the given domain.

World (Hosting)

* What is a world hosting?

let res = await planethosterClient.world()[...] // options down below
.getAccounts() // Displays The World account and all World sub accounts information.
.createAccount() // Creates a world hosting account, assigns the requested resources and install a CMS
.suspendAccount() // Proceed to the suspension of a World account.
.unsuspendAccount() // Reactivate suspended world account.
.modifyRessources() // Modify the resources associated with a World account.
.upgradePlan() // Increases resources associated with The World account.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i planethoster-api

Weekly Downloads

9

Version

1.6.3

License

MIT

Unpacked Size

31 kB

Total Files

16

Last publish

Collaborators

  • marcandre-ph