Namecheap (Namecheap v0.1.0) View Source

Simple functions for interacting with the Namecheap API.

Link to this section Summary

Functions

Check the status of domain names, including their price and availability.

Link to this section Functions

Specs

check_domains(domains :: [String.t()]) ::
  {:ok, [Namecheap.DomainCheckResult.t()]} | {:error, any()}

Check the status of domain names, including their price and availability.

Pass a list of domain names and receive a list of Namecheap.DomainCheckResult structs.

The order of the results is undefined.

Example

Namecheap.check_domains(["tribes.host", "us.xyz"])
#=>
{:ok,
 [
   %Namecheap.DomainCheckResult{
     available: false,
     description: "",
     domain: "tribes.host",
     eap_fee: #Decimal<0>,
     error_no: "0",
     icann_fee: #Decimal<0>,
     is_premium: false,
     premium_registration_price: #Decimal<0>,
     premium_renewal_price: #Decimal<0>,
     premium_restore_price: #Decimal<0>,
     premium_transfer_price: #Decimal<0>
   },
   %Namecheap.DomainCheckResult{
     available: true,
     description: "",
     domain: "us.xyz",
     eap_fee: #Decimal<0.0>,
     error_no: "0",
     icann_fee: #Decimal<0>,
     is_premium: true,
     premium_registration_price: #Decimal<13000.0>,
     premium_renewal_price: #Decimal<13000.0>,
     premium_restore_price: #Decimal<65.0>,
     premium_transfer_price: #Decimal<13000.0>
   }
 ]}