transip 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +26 -4
- data/lib/transip.rb +1 -1
- data/lib/transip/version.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -16,6 +16,14 @@ Credits for full rewrite to work with new TransIP API version go to Richard Bron
|
|
16
16
|
|
17
17
|
== Install
|
18
18
|
|
19
|
+
Install from rubygems (rubygems.org/gems/transip):
|
20
|
+
|
21
|
+
gem install transip
|
22
|
+
|
23
|
+
or add in your Bundle Gemfile:
|
24
|
+
|
25
|
+
gem 'transip'
|
26
|
+
|
19
27
|
For the latest version: Download / clone the repository. Bundle install the needed gems and require the lib.
|
20
28
|
|
21
29
|
git clone git://github.com/joost/transip.git
|
@@ -23,19 +31,33 @@ For the latest version: Download / clone the repository. Bundle install the need
|
|
23
31
|
bundle install
|
24
32
|
irb # and require './lib/transip'
|
25
33
|
|
34
|
+
== API Credentials
|
35
|
+
|
36
|
+
Enable the TransIP API via https://www.transip.nl/cp/mijn-account/#api.
|
37
|
+
Make sure:
|
38
|
+
* you enable the API
|
39
|
+
* add your IP to the access list
|
40
|
+
* create and save your RSA private key
|
41
|
+
|
26
42
|
== Usage
|
27
43
|
|
28
|
-
For the most up-to-date documentation see the source files.
|
44
|
+
For the most up-to-date documentation see the source files.
|
45
|
+
|
46
|
+
Setup the API client:
|
47
|
+
|
48
|
+
# use this in production
|
49
|
+
transip = Transip.new(username: 'your_username', key: 'your_private_rsa_key', ip: '12.34.12.3', mode: :readwrite)
|
50
|
+
|
51
|
+
In development you can leave out the ip. To test request use :readonly mode.
|
52
|
+
|
53
|
+
transip.actions # => [:batch_check_availability, :check_availability, :get_whois, :get_domain_names, :get_info, :batch_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, :get_all_tld_infos, :get_tld_info, :get_current_domain_action, :retry_current_domain_action_with_new_data, :retry_transfer_with_different_auth_code, :cancel_domain_action]
|
29
54
|
|
30
|
-
transip = Transip.new(:username => 'api_username', :key => private_key, :ip => '12.34.12.3', :mode => 'readwrite') # use this in production
|
31
|
-
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]
|
32
55
|
transip.request(:get_domain_names)
|
33
56
|
transip.request(:get_info, :domain_name => 'example.com')
|
34
57
|
transip.request(:get_whois, :domain_name => 'example.com')
|
35
58
|
transip.request(:set_dns_entries, :domain_name => 'example.com', :dns_entries => [Transip::DnsEntry.new('test', 5.inutes, 'A', '74.125.77.147')])
|
36
59
|
transip.request(:register, Transip::Domain.new('example.com', nil, nil, [Transip::DnsEntry.new('test', 5.minutes, 'A', '74.125.77.147')]))
|
37
60
|
|
38
|
-
|
39
61
|
Please feel free to contribute and send me a pull request via Github!
|
40
62
|
|
41
63
|
Copyright (c) 2013 Richard Bronkhorst, released under the MIT license
|
data/lib/transip.rb
CHANGED
data/lib/transip/version.rb
CHANGED