transip 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
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. Use as follows:
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
@@ -339,7 +339,7 @@ class Transip
339
339
 
340
340
  # Returns Array with all possible SOAP WSDL actions.
341
341
  def actions
342
- client.wsdl.soap_actions
342
+ client.operations
343
343
  end
344
344
 
345
345
  # This makes sure that arrays are properly encoded as soap-arrays by Gyoku
@@ -1,3 +1,3 @@
1
1
  class Transip
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: