AI-CleverbotIO
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AI/CleverbotIO.pod view on Meta::CPAN
=pod
=encoding utf8
=head1 NAME
AI::CleverbotIO - A Perl wrapper for the cleverbot.io API
=head1 VERSION
This document describes AI::CleverbotIO version 0.002.
=begin html
<a href="https://travis-ci.org/polettix/AI-CleverbotIO">
<img alt="Build Status" src="https://travis-ci.org/polettix/AI-CleverbotIO.svg?branch=master">
</a>
<a href="https://www.perl.org/">
<img alt="Perl Version" src="https://img.shields.io/badge/perl-5.10+-brightgreen.svg">
</a>
<a href="https://badge.fury.io/pl/AI-CleverbotIO">
<img alt="Current CPAN version" src="https://badge.fury.io/pl/AI-CleverbotIO.svg">
</a>
<a href="http://cpants.cpanauthors.org/dist/AI-CleverbotIO">
<img alt="Kwalitee" src="http://cpants.cpanauthors.org/dist/AI-CleverbotIO.png">
</a>
<a href="http://www.cpantesters.org/distro/A/AI-CleverbotIO.html?distmat=1">
<img alt="CPAN Testers" src="https://img.shields.io/badge/cpan-testers-blue.svg">
</a>
<a href="http://matrix.cpantesters.org/?dist=AI-CleverbotIO">
<img alt="CPAN Testers Matrix" src="https://img.shields.io/badge/matrix-@testers-blue.svg">
</a>
=end html
=head1 SYNOPSIS
use AI::CleverbotIO;
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
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.368 second using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )