NAME

Bot::ChatBots::Telegram::Role::Source - Telegram Source Role

SYNOPSIS

package Some::Thing;
use Moo;
with 'Bot::ChatBots::Telegram::Role::Source';
...

DESCRIPTION

This role is meant to be consumed by Bot::ChatBots::Telegram::WebHook and Bot::ChatBots::Telegram::LongPoll.

ACCESSORS

This role defines the accessors in the following subsections.

token

my $token = $obj->token;
$obj->token($ENV{TOKEN});

Accessor for the token, used to access the Telegram service remotely. This also has an associated predicate function "has_token".

METHODS

This method defines the methods in the following subsections.

has_token

say 'yes!' if $obj->has_token;

Predicate function to assess whether a "token" is present or not.

normalize_record

my $record = $self->normlize_record($input_record);

Perform some normalization on the record to give it a more "general" shape. Which is still in a state of flux.

SEE ALSO

Bot::ChatBots.

AUTHOR

Flavio Poletti <polettix@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2016 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.