Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Node.js client for Gandi.net XML-RPC API, written in CoffeeScript.
CoffeeScript JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
.gitignore
README.md
index.js
package.json

README.md

node-gandi

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

NPM module Gittip

Usage

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

Simple example

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(error, value){
   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({
        version: function(callback){
            client.version_info(function(error,value){
                callback(error,value);
            });
        },
        info: function(callback){
            client.domain_info('bm-jp.fr', function(error,value){
                callback(error,value);
            });
        },
    },
    function(err, results){ 
       console.log('Domain id: %j' + results.info);
    });
});

Dependencies

  • Gandi API ~3.2.3
  • Coffee-Script ~1.4.0
  • xmlrpc ~1.1.0

Bitdeli Badge

Something went wrong with that request. Please try again.