README.rdoc in transip-0.2.0 vs README.rdoc in transip-0.3.0
- old
+ new
@@ -1,48 +1,41 @@
= TransIP API
-Ruby gem to use the full TransIP API (v2).
+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:
-* <b>The origin of this code:</b> https://github.com/joost/transip-api
+* <b>The origin of this code:</b> https://github.com/joost/transip
* <b>TransIP API Docs:</b> https://www.transip.nl/g/api
-Credits:
+Credits for full rewrite to work with new TransIP API version go to Richard Bronkhorst (https://github.com/richmans).
-* <b>Savon Gem:</b> See: http://savonrb.com. Wouldn't be so simple without it!
-
== Install
-Use the gem.
-
- gem install transip
-
For the latest version: Download / clone the repository. Bundle install the needed gems and require the lib.
- git clone git://github.com/joost/transip-api.git
+ git clone git://github.com/joost/transip.git
+ cd transip
bundle install
- irb # and require './transip'
+ irb # and require './lib/transip'
== Usage
For the most up-to-date documentation see the source files. Use as follows:
- require 'transip'
- transip = Transip.new(:username => 'api_username') # will try to determine IP (will not work behind NAT) and uses readonly mode
- transip = Transip.new(:username => 'api_username', :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 = 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 => 'yelloyello.be')
- transip.request_with_ip4_fix(:check_availability, :domain_name => 'yelloyello.be') # Will fix your IP if not correct (voodoo magic)
- transip.request_with_ip4_fix(:get_info, :domain_name => 'one_of_your_domains.com')
- transip.request(:get_whois, :domain_name => 'google.com')
- transip.request(:set_dns_entries, :domain_name => 'bdgg.nl', :dns_entries => [Transip::DnsEntry.new('test', 5.minutes, 'A', '74.125.77.147')])
- transip.request(:register, Transip::Domain.new('newdomain.com', nil, nil, [Transip::DnsEntry.new('test', 5.minutes, 'A', '74.125.77.147')]))
+ 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')]))
-== TODO
-* Tests
-
Please feel free to contribute and send me a pull request via Github!
-Copyright (c) 2011 Joost Hietbrink, released under the MIT license
+Copyright (c) 2013 Richard Bronkhorst, released under the MIT license
\ No newline at end of file