Robert Stone

NAME

WWW::LogicBoxes::Role::Command::CheckAvailability

SYNOPSIS

    use strict;
    use warnings;

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;

    my $api = WWW::LogicBoxes->new({
        username => '123456',
        password => 'Top Secret!',
    });

    my $domains = $api->check_availability({
        slds => [ 'cpan', 'hostgator', 'drzigman' ],
        tlds => [ 'com', 'net', 'org' ]
    });

METHODS

check_availability

    my $api = WWW::LogicBoxes->new({ ... });
    my $domains = $api->check_availability({
        slds => [ 'cpan', 'hostgator', 'drzigman' ],
        tlds => [ 'com', 'net', 'org' ]
    });

Checks to see if the specified combination of slds and tlds are available which must be presented as ArrayRef's of strings. Returned is an arrayref of WWW::LogicBoxes::Domain objects.

The method will also croak if there is a failure communicating with the LogicBoxes API (such as it's down or it returned invalid JSON)

suggest_names

    my $api = WWW::LogicBoxes->new({ ... });
    my $domains = $api->suggest_names({
        phrase      => "fast sports car",
        tlds        => [ 'com', 'net', 'org' ],
        hyphen      => 0,
        related     => 0,
        num_results => 10,
    });

suggest_names will ask the LogicBoxes API to suggest potential domain names given a search phrase.

phrase

Required. A string representing a search phrase. It's worth noting that the more specific the query the more results you'll get so something like "car" may get zero results but "fast sports car" gets a lot.

tlds

An ArrayRef of Strings containing the tlds you wish to include in the search

hyphen

Boolean that indicates if you wish to allow hypheniations in domain names, defaults to false.

Boolean that indicates if you with to allow related concepts to your phrase. Defaults to false.

num_results

The number of phrase matches you wish to allow. Note that the actual max number of results from a given query is the num_results * the number of tlds since the num_results refers only to sld matches. Defaults to 10.

Returned is an ArrayRef of WWW::LogicBoxes::Domain objects.