Skip to content
Elixir GenServer implementation of the INWX DomRobot XML-RPC API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.gitignore
README.md
mix.exs
mix.lock

README.md

InwxDomrobot

INWX offers a complete XML-RPC API covering most of their sites features. The DomRobot API allows you to manage accounts, domains, name servers and much more directly from your application. Considering the way their API is built, this package merely acts as a cookie storage and an XML encoder/decoder proxy.

Please note that 2FA is currently not supported with this client.

Installation

Install from hex.pm

def deps do
  [{:inwx_domrobot, "~> 0.1.0"}]
end

Usage

# Start a new connection
iex(1)> {:ok, conn} = InwxDomrobot.start_link
{:ok, PID<0.213.0>}

# Send an "account.login" request to the connection
iex(2)> InwxDomrobot.login conn, "username", "password"
{:ok, 1000}

# Send arbitrary commands to the connection
iex(3)> InwxDomrobot.query conn, "account.info"
{:ok, %XMLRPC.MethodResponse{param: %{"code" => 1000,
  ...
}}}

iex(4)> InwxDomrobot.query conn, "account.update", [%{ firstname: "Sven" }]
{:ok, %XMLRPC.MethodResponse{param: %{"code" => 1001,
  ...
}}}

# Send an "account.logout" request to the connection
iex(5)> InwxDomrobot.logout conn
{:ok,
 %XMLRPC.MethodResponse{param: %{"code" => 1500,
    "msg" => "Command completed successfully; ending session",
    "runtime" => 0.0264, "svTRID" => "..."}}}
You can’t perform that action at this time.