Namecheap.Client (Namecheap v0.2.1) View Source
Facilitates HTTP requests to the Namecheap API endpoint.
Link to this section Summary
Functions
Runs a command against the Namecheap API, parses the response, and returns a
Namecheap.Response
struct.
Link to this section Functions
Specs
command(cmd :: String.t(), params :: Namecheap.params(), opts :: Keyword.t()) :: Namecheap.Response.t()
Runs a command against the Namecheap API, parses the response, and returns a
Namecheap.Response
struct.
You should check the Namecheap docs for each method to know what
parameters are supported. It's better to use a function from the Namecheap
module instead of using the Client directly if supported.
Arguments
cmd
- The full name of the Namecheap API "method", eg"namecheap.domains.check"
params
- Map of query paramaters to pass along with the request. Global paramaters are inferred from your settings, but can be overridden here. Example:%{"DomainList" => "domain1.com,domain2.com"}
opts
- Keyword list of options (see below).
Options
Options supplied to the opts
argument.
parser
- Set the parser to anyFloki.HTMLParser
compatible parser.Namecheap.Parser
is the default, but you can also useNamecheap.NoOpParser
if you just want the raw XML, or even useFloki
directly.
Example
Namecheap.Client.command("namecheap.domains.check", %{
"DomainList" => "domain1.com,domain2.com"
})