AI-CleverbotIO
view release on metacpan or search on metacpan
my $cleverbot = AI::CleverbotIO->new(
key => $ENV{CLEVERBOT_API_KEY},
nick => $ENV{CLEVERBOT_NICK},
user => $ENV{CLEVERBOT_API_USER},
);
# call to create() is mostly safe, you might get an error
# back but still 200 OK. You can avoid this (and wasting one
# API call) if you know the nick is already active for these
# API credentials.
$cleverbot->create();
# then, it's just... ask()
my $answer = $cleverbot->ask('Hello darling!');
say $answer->{response};
DESCRIPTION
This module allows you to interact with the API served by
https://cleverbot.io.
lib/AI/CleverbotIO.pod view on Meta::CPAN
my $cleverbot = AI::CleverbotIO->new(
key => $ENV{CLEVERBOT_API_KEY},
nick => $ENV{CLEVERBOT_NICK},
user => $ENV{CLEVERBOT_API_USER},
);
# call to create() is mostly safe, you might get an error
# back but still 200 OK. You can avoid this (and wasting one
# API call) if you know the nick is already active for these
# API credentials.
$cleverbot->create();
# then, it's just... ask()
my $answer = $cleverbot->ask('Hello darling!');
say $answer->{response};
=head1 DESCRIPTION
This module allows you to interact with the API served by
L<https://cleverbot.io>.
( run in 0.238 second using v1.01-cache-2.11-cpan-a5abf4f5562 )