Skip to content

pickabee/gandirb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gandirb - Ruby library for using the Gandi XML-RPC API

This is a ruby library for using the Gandi XML-RPC API. It currently only provides methods for using the domain and mail API, but is extensible enough to add hosting in the future.

Howto

See wiki.gandi.net/fr/api-xml/docs/domain for the full documentation on the API. Note the session_id doesn’t have to be explicitly provided when calling a method.

It should also be noted that the ruby xml-rpc lib seems to have a bug with the ssl support, resulting in a timeout of about 15 seconds. After this time the current connection won’t work and result in various exception. This lib takes this issue into account and provides a workaround by restarting the connection. See the comments for Gandi::Base#raw_call for more details.

Quick example :

require 'gandi'
gandi_session = Gandi::Domain.login 'XXYYY-Gandi', 'mypasswd', Gandi::Domain::TEST_URL #or use Gandi::Domain::URL in production mode
gandi_session.account_currency # => "EUR"
gandi_session.domain_available ["mycoolwebsite.com"] # => {"mycoolwebsite.com"=>true}
gandi_session.domain_available "mycoolwebsite.com" # => true #additional syntax
gandi_session.domain_list # => ["mypersonalwebsite.com"]

Detailed RDoc documentation for each method is available using rake rdoc.

TODO

  • More tests

  • Finish adding and cleaning up domain and mail methods

  • Better handling of failures and server exceptions, and stricter params checking

  • Refactor Domain and Base class and add a Session class to separate XML-RPC code and prepare adding hosting methods

Copyright © 2009 Pickabee. Released under the MIT licence, see LICENSE for details. Some parts inspired by github.com/jerome/gandi/tree

About

Ruby lib for using Gandi XML-RPC API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages