Skip to content

Elixir GenServer implementation of the INWX DomRobot XML-RPC API

Notifications You must be signed in to change notification settings

jgelens/inwx-domrobot-elixir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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, %{param: %{"code" => 1000,
  ...
}}}

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

# Send an "account.logout" request to the connection
iex(5)> InwxDomrobot.logout conn
{:ok,
 %{param: %{"code" => 1500,
    "msg" => "Command completed successfully; ending session",
    "runtime" => 0.0264, "svTRID" => "..."}}}

About

Elixir GenServer implementation of the INWX DomRobot XML-RPC API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%