Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed repo and updated bundle

  • Loading branch information...
commit 2b145298b92bb5e0ca6d30b3de734728452dc37d 1 parent 6b7a245
Richard Bronkhorst authored
Showing with 18 additions and 13 deletions.
  1. +3 −3 Gemfile.lock
  2. +10 −8 README.rdoc
  3. +5 −2 lib/transip.rb
View
6 Gemfile.lock
@@ -6,7 +6,7 @@ GEM
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
- builder (3.0.4)
+ builder (3.2.2)
curb (0.8.4)
facets (2.9.3)
gyoku (1.1.0)
@@ -14,9 +14,9 @@ GEM
httpi (2.1.0)
rack
rubyntlm (~> 0.3.2)
- nokogiri (1.5.6)
+ nokogiri (1.5.10)
nori (2.3.0)
- rack (1.4.4)
+ rack (1.5.2)
rubyntlm (0.3.4)
savon (2.3.0)
akami (~> 1.2.0)
View
18 README.rdoc
@@ -2,6 +2,11 @@
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
@@ -9,23 +14,20 @@ For more info see:
== Install
-Use the gem.
-
- gem install transip --source http://github.com/richmans/transip-api
-
For the latest version: Download / clone the repository. Bundle install the needed gems and require the lib.
- git clone git://github.com/richmans/transip-api.git
+ git clone git://github.com/richmans/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 = Transip.new(:username => 'api_username', :key => private_key) # will try to determine IP (will not work behind NAT) and uses readonly mode
+ 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')
View
7 lib/transip.rb
@@ -9,9 +9,12 @@
#
# Implements the www.transip.nl API (v4.2). For more info see: https://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.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 = Transip.new(:username => 'api_username', :key => private_key) # will try to determine IP (will not work behind NAT) and uses readonly mode
+# 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')
Please sign in to comment.
Something went wrong with that request. Please try again.