NAME
WWW::LogicBoxes::Role::Command::Domain::Availability - Domain Availability Related Operations
SYNOPSIS
use WWW::LogicBoxes;
my $logic_boxes = WWW::LogicBoxes->new( ... );
# Check If Domains Are Available
my $domain_availabilities = $logic_boxes->check_domain_availability(
slds => [qw( cpan drzigman brainstormincubator )],
tlds => [qw( com net org )],
suggestions => 0,
);
for my $domain_availability (@{ $domain_availabilities }) {
if( $domain_availability->is_available ) {
print 'Domain ' . $domain_availability->name . " is available!\n";
}
else {
print 'Domain ' . $domain_availability->name . " is not available.\n";
}
}
# Get Domain Suggestions
my $domain_availabilities = $logic_boxes->suggest_domain_names(
phrase => 'fast race cars',
tlds => [qw( com net org )],
hyphen => 0,
related => 1,
num_results => 10,
);
for my $domain_availability (@{ $domain_availabilities }) {
if( $domain_availability->is_available ) {
print 'Domain ' . $domain_availability->name . " is available!\n";
}
else {
print 'Domain ' . $domain_availability->name . " is not available.\n";
}
}
REQUIRES
submit
DESCRIPTION
Implements domain availability related operations with the LogicBoxes's API.
METHODS
check_domain_availability
use WWW::LogicBoxes;
my $logic_boxes = WWW::LogicBoxes->new( ... );
# Check If Domains Are Available
my $domain_availabilities = $logic_boxes->check_domain_availability(
slds => [qw( cpan drzigman brainstormincubator )],
tlds => [qw( com net org )],
suggestions => 0,
);
for my $domain_availability (@{ $domain_availabilities }) {
if( $domain_availability->is_available ) {
print 'Domain ' . $domain_availability->name . " is available!\n";
}
else {
print 'Domain ' . $domain_availability->name . " is not available.\n";
}
}
Given an ArrayRef of slds and tlds returns an ArrayRef of WWW::LogicBoxes::DomainAvailability objects. Optionally takes suggestions params (defaults to false), if specified then additional domain suggestions will be returned.
suggest_domain_names
use WWW::LogicBoxes;
my $logic_boxes = WWW::LogicBoxes->new( ... );
my $domain_availabilities = $logic_boxes->suggest_domain_names(
phrase => 'fast race cars',
tlds => [qw( com net org )],
hyphen => 0,
related => 1,
num_results => 10,
);
for my $domain_availability (@{ $domain_availabilities }) {
if( $domain_availability->is_available ) {
print 'Domain ' . $domain_availability->name . " is available!\n";
}
else {
print 'Domain ' . $domain_availability->name . " is not available.\n";
}
}
Accepts the following arguments:
- phrase
-
A search phrase to be used for domain suggestions
- tlds
-
ArrayRef of Public Suffixes to return domains for.
- hyphen
-
Default false, if true will include - hacks.
-
Default false, if true will include related domains.
- num_results
-
Default 10, number of results to return.
Return an ArrayRef of WWW::LogicBoxes::DomainAvailability objects.