Net::eNom - Interact with eNom.com reseller API
Version 0.01
use Net::eNom; my $enom = Net::eNom->new( username => $u, password => $p, test => 1 ); $enom->AddToCart( EndUserIP => "1.2.3.4", ProductType => "Register", SLD => "myspiffynewdomain", TLD => "com" ); ...
Constructs a new object for interacting with the eNom API. If the "test" parameter is given, then the API calls will be made to the test server instead of the live one.
my $response = $enom->AddBulkDomains( ProductType => "register", ListCount => 1, SLD1 => "myspiffynewdomain", TLD1 => "com", UseCart => 1 );
Performs the specified command - see the eNom API users guide (https://www.enom.com/resellers/APICommandCatalog.pdf) for the commands and their arguments.
For convenience, if you pass the 'Domain' argument, it will be split into 'SLD' and 'TLD'; that is, you can say
my $response = $enom->Check(SLD => "myspiffynewdomain", TLD => "com");
or
my $response = $enom->Check(Domain => "myspiffynewdomain.com");
The return value is a Perl hash representing the response XML from the eNom API; the only differences are
The "errors" key returns an array instead of a hash
"responses" returns an array of hashes
Keys which end with a number are transformed into an array
So for instance, a command Check(Domain = "enom.@")> (the "@" means "com, net, org") might return:
Check(Domain =
{ 'Domain' => [ 'enom.com', 'enom.net', 'enom.org' ], 'Command' => 'CHECK', 'RRPCode' => [ '211', '211', '211' ], 'RRPText' => [ 'Domain not available', 'Domain not available', 'Domain not available' ] };
You will need to read the API guide to check whether to expect responses in "RRPText" or "responses"; it's not exactly consistent.
Simon Cozens, <simon at simon-cozens.org>
<simon at simon-cozens.org>
Please report any bugs or feature requests to bug-net-enom at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-eNom. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-enom at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::eNom
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-eNom
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-eNom
CPAN Ratings
http://cpanratings.perl.org/d/Net-eNom
Search CPAN
http://search.cpan.org/dist/Net-eNom/
Thanks to the UK Free Software Network (http://www.ukfsn.org/) for their support of this module's development. For free-software-friendly hosting and other Internet services, try UKFSN.
Copyright 2009 Simon Cozens.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Net::eNom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::eNom
CPAN shell
perl -MCPAN -e shell install Net::eNom
For more information on module installation, please visit the detailed CPAN module installation guide.