README.rdoc in transip-0.1.0 vs README.rdoc in transip-0.2.0
- old
+ new
@@ -11,25 +11,34 @@
* <b>Savon Gem:</b> See: http://savonrb.com. Wouldn't be so simple without it!
== Install
-Have to turn into a gem..
-Download / clone the repository. Bundle install the needed gems and require the lib.
+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
bundle install
irb # and require './transip'
== Usage
For the most up-to-date documentation see the source files. Use as follows:
- transip = Transip.new('username', '12.34.12.3')
- transip.generate_hash('your_api_password')
- transip.actions # => [:check_availability, .., :set_contacts]
+ 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.request(:get_domain_names)
- transip.request(:get_info, :domain_name => 'domain.com')
+ 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')]))
== TODO
* Tests
\ No newline at end of file