freenom

1.0.0 • Public • Published

freenom

Version npm Build Status Coverage Status

Freenom API bindings for Node.js.

Install

npm install --save freenom

API

This module exports a constructor function which takes two arguments:

var Freenom = require('freenom');
 
var freenom = new Freenom([email][, password]);

The email and password arguments are optional. If you provide them, you can avoid to specify the authentication parameters when you call the methods that require authentication.

Every resource is accessed via your freenom instance:

var freenom = new Freenom();
// freenom.<resouce_name>.<method_name>

The last argument of every resource method is an error-first callback:

var freenom = new Freenom();
 
freenom.service.ping(function (err, res) {
  if (err) throw err;
 
  console.log(res);
});

Available resources and methods

  • service
    • ping(callback)
  • domain
    • search(params, callback)
    • register(params, callback)
    • renew(params, callback)
    • getinfo(params, callback)
    • modify(params, callback)
    • delete(params, callback)
    • restore(params, callback)
    • upgrade(params, callback)
    • list([params], callback)
  • nameserver
    • register(params, callback)
    • delete(params, callback)
    • list(params, callback)
  • contact
    • register(params, callback)
    • delete(params, callback)
    • getinfo(params, callback)
    • list([params], callback)
  • transfer
    • price(params, callback)
    • request(params, callback)
    • approve(params, callback)
    • decline(params, callback)
    • list([params], callback)

where params is a plain JavaScript object, e.g. { domainname: 'test002.tk' }. See http://www.freenom.com/en/freenom-api.html for parameters details.

Credits

Structured after the fullcontact package.

License

MIT

Dependencies (1)

Dev Dependencies (5)

Package Sidebar

Install

npm i freenom

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lpinca