TransIP API

Ruby gem to use the full TransIP API (v4.2). This fork uses an updated version of savon, and implements the new request signing method that the guys at TransIP have introduced into their api. So far, i have only tested the :get_domain_names, :get_info and :set_dns_entries calls.

The transip API makes use of public/private key encryption. You need to use the TransIP control panel to give your server access to the api, and to generate a key. You can then use the key together with your username to gain access to the api

For more info see:

Credits for full rewrite to work with new TransIP API version go to Richard Bronkhorst (github.com/richmans).

Install

For the latest version: Download / clone the repository. Bundle install the needed gems and require the lib.

git clone git://github.com/joost/transip.git
cd transip
bundle install
irb # and require './lib/transip'

Usage

For the most up-to-date documentation see the source files. Use as follows:

transip = Transip.new(:username => 'api_username', :key => private_key, :ip => '12.34.12.3', :mode => 'readwrite') # use this in production
transip.actions # => [:check_availability, :get_whois, :get_domain_names, :get_info, :get_auth_code, :get_is_locked, register, :cancel, :transfer_with_owner_change, :transfer_without_owner_change, :set_nameservers, :set_lock, unset_lock, :set_dns_entries, :set_owner, :set_contacts]
transip.request(:get_domain_names)
transip.request(:get_info, :domain_name => 'example.com')
transip.request(:get_whois, :domain_name => 'example.com')
transip.request(:set_dns_entries, :domain_name => 'example.com', :dns_entries => [Transip::DnsEntry.new('test', 5.inutes, 'A', '74.125.77.147')])
transip.request(:register, Transip::Domain.new('example.com', nil, nil, [Transip::DnsEntry.new('test', 5.minutes, 'A', '74.125.77.147')]))

Please feel free to contribute and send me a pull request via Github!

Copyright © 2013 Richard Bronkhorst, released under the MIT license