node-gandi

Node.js client for Gandi.net XML-RPC API, written in CoffeeScript

node-gandi

Node.js client for Gandi.net XML-RPC API, written in CoffeeScript.

This module is available on npm, and it's versionned 1.0 on January 2013.

var gandi = require('node-gandi'),
    apikey = 'Your-OT&E-API-Key';
 
// For mesures of security, always do the first tests on the OT&E system 
gandi.createOTEClient(apikey, function(client){
  client.version_info(function(errorvalue){
   if(error) {
        console.log('ERR: ' + error);
    }else {
        console.log('Result: %j', value);
        }
    });
});

Workflow execution using async series

var async = require('async'),
    gandi = require('node-gandi'),
    apikey = 'Your-OT&E-API-Key';
 
gandi.createOTEClient(apikey, function(client){
  // Ask for version info, then ask for domain_info 
  async.series({
        versionfunction(callback){
            client.version_info(function(error,value){
                callback(error,value);
            });
        },
        infofunction(callback){
            client.domain_info('bm-jp.fr', function(error,value){
                callback(error,value);
            });
        },
    },
    function(errresults){ 
       console.log('Domain id: %j' + results.info);
    });
});
  • Gandi API ~3.2.3
  • Coffee-Script ~1.4.0
  • xmlrpc ~1.1.0