Module: Transip
- Defined in:
- lib/transip.rb,
lib/transip/client.rb,
lib/transip/version.rb,
lib/transip/api_error.rb
Overview
Implements the www.transip.nl API (v5.0). For more info see: www.transip.nl/g/api/
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 Usage:
transip = Transip::DomainClient.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.minutes, 'A', '74.125.77.147')])
transip.request(:set_contacts, :domain_name => 'example.com', :contacts => [Transip::WhoisContact.new('type', 'first', 'middle', 'last', 'company', 'kvk', 'companyType', 'street','number','postalCode','city','phoneNumber','faxNumber','email','country')])
transip.request(:register, Transip::Domain.new('example.com', nil, nil, [Transip::DnsEntry.new('test', 5.minutes, 'A', '74.125.77.147')]))
Defined Under Namespace
Classes: ApiError, Client, ColocationClient, DnsEntry, Domain, DomainBranding, DomainClient, ForwardClient, Nameserver, Tld, TransipStruct, Vps, VpsClient, VpsService, WebhostingClient, WhoisContact
Constant Summary collapse
- VERSION =
"0.4.2"
Class Method Summary collapse
-
.new(*args) ⇒ Object
Backwards compatibility with v3.x of the gem.
Class Method Details
.new(*args) ⇒ Object
Backwards compatibility with v3.x of the gem. TODO: Remove
35 36 37 38 |
# File 'lib/transip.rb', line 35 def self.new(*args) puts "Transip.new is deprecated. Use Transip::DomainClient.new instead!" Client.new(*args) end |