=pod

=encoding utf8

=head1 NAME

Bot::ChatBots::Trello - Trello adapter for Bot::ChatBots

=head1 VERSION

This document describes Bot::ChatBots::Trello version 0.002.

=begin html

<a href="https://travis-ci.org/polettix/Bot-ChatBots-Trello">
<img alt="Build Status" src="https://travis-ci.org/polettix/Bot-ChatBots-Trello.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/Bot-ChatBots-Trello">
<img alt="Current CPAN version" src="https://badge.fury.io/pl/Bot-ChatBots-Trello.svg">
</a>
<a href="http://cpants.cpanauthors.org/dist/Bot-ChatBots-Trello">
<img alt="Kwalitee" src="http://cpants.cpanauthors.org/dist/Bot-ChatBots-Trello.png">
</a>
<a href="http://www.cpantesters.org/distro/B/Bot-ChatBots-Trello.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=Bot-ChatBots-Trello">
<img alt="CPAN Testers Matrix" src="https://img.shields.io/badge/matrix-@testers-blue.svg">
</a>

=end html


=head1 SYNOPSIS

   # A minimal Trello Bot using WebHooks
   use Mojolicious::Lite;
   plugin 'Bot::ChatBots::Trello' => instances => [
      [
         'WebHook',
         processor  => \&processor,
         url        => $ENV{URL}, # whatever you think is good
      ],
      # more can follow here...
   ];
   app->start;
   sub processor {
      my $record = shift;
      say $record->{payload}{action}{type} ' happened';
      return $record;
   }



=head1 DESCRIPTION

This module allows you to to define L<Bot::ChatBots> for
L<Trello|https://trello.com/>, a kanban boards online application.

Strictly speaking, this I<module> is a L<Mojolicious> plugin that allows
you to load and use L<Bot::ChatBots::Telegram::WebHook> (see L</SYNOPSIS>
for a quick example), providing a way to receive I<actions> from Trello.

These modules rely upon L<Log::Any> for emitting logging information; you
are encouraged to read that module's documentation for further
information. For what we are concerned, you have to remember that all logs
will be lost unless you configure L<Log::Any>, e.g. to send messages on
standard output you can do this:

   use Log::Any::Adapter qw< Stderr >;

If using the web hook, then you will probably want to send the logs
together with L<Mojolicious>'s logs, like this:

   use Mojolicious::Lite;
   use Log::Any::Adapter;
   Log::Any::Adapter->set(MojoLog => logger => app->log);

The configuration above relies on the presence of
L<Log::Any::Adapter::MojoLog>.


=head1 METHODS

All the heavylifting is done by L<Bot::ChatBots::MojoPlugin>.


=head1 BUGS AND LIMITATIONS

Report bugs either through GitHub (patches welcome).

=head1 SEE ALSO

L<Bot::ChatBots>, L<Bot::ChatBots::Trello::WebHook>.

=head1 AUTHOR

Flavio Poletti <polettix@cpan.org>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2018 by Flavio Poletti <polettix@cpan.org>

This module is free software. You can redistribute it and/or modify it
under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.

=cut
