Freenom API bindings for Node.js.
npm install --save freenom
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);
});
- 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.
Structured after the fullcontact package.