First touch to satisfy perlcritic
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
package Teapot::Bot;
|
package Teapot::Bot;
|
||||||
$Teapot::Bot::VERSION = '0.021';
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
$Teapot::Bot::VERSION = '0.021';
|
||||||
# ABSTRACT: A base class to make your very own Telegram bot
|
# ABSTRACT: A base class to make your very own Telegram bot
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package Teapot::Bot::Brain;
|
package Teapot::Bot::Brain;
|
||||||
$Teapot::Bot::Brain::VERSION = '0.021';
|
|
||||||
# ABSTRACT: A base class to make your very own Telegram bot
|
|
||||||
|
|
||||||
|
# ABSTRACT: A base class to make your very own Telegram bot
|
||||||
|
|
||||||
use Mojo::Base -base;
|
use Mojo::Base -base;
|
||||||
|
|
||||||
@@ -16,6 +15,8 @@ use Data::Dumper;
|
|||||||
|
|
||||||
use Teapot::Bot::Object::Message;
|
use Teapot::Bot::Object::Message;
|
||||||
|
|
||||||
|
$Teapot::Bot::Brain::VERSION = '0.021';
|
||||||
|
|
||||||
# base class for building telegram robots with Mojolicious
|
# base class for building telegram robots with Mojolicious
|
||||||
has longpoll_time => 60;
|
has longpoll_time => 60;
|
||||||
has ua => sub { Mojo::UserAgent->new->inactivity_timeout(shift->longpoll_time + 15) };
|
has ua => sub { Mojo::UserAgent->new->inactivity_timeout(shift->longpoll_time + 15) };
|
||||||
@@ -50,6 +51,7 @@ sub add_repeating_task {
|
|||||||
|
|
||||||
# kick it off
|
# kick it off
|
||||||
$repeater->();
|
$repeater->();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -58,6 +60,7 @@ sub add_listener {
|
|||||||
my $coderef = shift;
|
my $coderef = shift;
|
||||||
|
|
||||||
push @{ $self->listeners }, $coderef;
|
push @{ $self->listeners }, $coderef;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub init {
|
sub init {
|
||||||
@@ -71,6 +74,7 @@ sub think {
|
|||||||
|
|
||||||
$self->_add_getUpdates_handler;
|
$self->_add_getUpdates_handler;
|
||||||
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
|
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -106,7 +110,6 @@ sub sendMessage {
|
|||||||
# check reply_markup is the right kind
|
# check reply_markup is the right kind
|
||||||
if (exists $args->{reply_markup}) {
|
if (exists $args->{reply_markup}) {
|
||||||
my $reply_markup = $args->{reply_markup};
|
my $reply_markup = $args->{reply_markup};
|
||||||
die "bad reply_markup supplied"
|
|
||||||
if ( ref($reply_markup) ne 'Teapot::Bot::Object::InlineKeyboardMarkup' &&
|
if ( ref($reply_markup) ne 'Teapot::Bot::Object::InlineKeyboardMarkup' &&
|
||||||
ref($reply_markup) ne 'Teapot::Bot::Object::ReplyKeyboardMarkup' &&
|
ref($reply_markup) ne 'Teapot::Bot::Object::ReplyKeyboardMarkup' &&
|
||||||
ref($reply_markup) ne 'Teapot::Bot::Object::ReplyKeyboardRemove' &&
|
ref($reply_markup) ne 'Teapot::Bot::Object::ReplyKeyboardRemove' &&
|
||||||
@@ -201,6 +204,8 @@ sub _add_getUpdates_handler {
|
|||||||
$http_active = 0;
|
$http_active = 0;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# process a message which arrived via getUpdates
|
# process a message which arrived via getUpdates
|
||||||
@@ -227,6 +232,8 @@ sub _process_message {
|
|||||||
# call the listener code, supplying ourself and the update
|
# call the listener code, supplying ourself and the update
|
||||||
$listener->($self, $update);
|
$listener->($self, $update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package Teapot::Bot::Object::Animation;
|
package Teapot::Bot::Object::Animation;
|
||||||
$Teapot::Bot::Object::Animation::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram message 'Animation' type.
|
# ABSTRACT: The base class for Telegram message 'Animation' type.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::PhotoSize;
|
use Teapot::Bot::Object::PhotoSize;
|
||||||
use Carp qw/croak/;
|
use Carp qw/croak/;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Animation::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'width';
|
has 'width';
|
||||||
has 'height';
|
has 'height';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Audio;
|
package Teapot::Bot::Object::Audio;
|
||||||
$Teapot::Bot::Object::Audio::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Audio' type objects
|
# ABSTRACT: The base class for Telegram 'Audio' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Audio::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'duration';
|
has 'duration';
|
||||||
has 'performer';
|
has 'performer';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Base;
|
package Teapot::Bot::Object::Base;
|
||||||
$Teapot::Bot::Object::Base::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for all Teapot::Bot::Object objects.
|
# ABSTRACT: The base class for all Teapot::Bot::Object objects.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base -base;
|
use Mojo::Base -base;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Base::VERSION = '0.021';
|
||||||
|
|
||||||
has '_brain'; # a reference to our brain
|
has '_brain'; # a reference to our brain
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package Teapot::Bot::Object::Chat;
|
package Teapot::Bot::Object::Chat;
|
||||||
$Teapot::Bot::Object::Chat::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Chat' type objects
|
# ABSTRACT: The base class for Telegram 'Chat' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::ChatPhoto;
|
use Teapot::Bot::Object::ChatPhoto;
|
||||||
use Teapot::Bot::Object::Message;
|
use Teapot::Bot::Object::Message;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Chat::VERSION = '0.021';
|
||||||
|
|
||||||
has 'id';
|
has 'id';
|
||||||
has 'type';
|
has 'type';
|
||||||
has 'title';
|
has 'title';
|
||||||
@@ -34,12 +34,12 @@ sub fields {
|
|||||||
|
|
||||||
|
|
||||||
sub is_user {
|
sub is_user {
|
||||||
shift->id > 0;
|
return shift->id > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub is_group {
|
sub is_group {
|
||||||
shift->id < 0;
|
return shift->id < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::ChatPhoto;
|
package Teapot::Bot::Object::ChatPhoto;
|
||||||
$Teapot::Bot::Object::ChatPhoto::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'ChatPhoto' type objects
|
# ABSTRACT: The base class for Telegram 'ChatPhoto' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::ChatPhoto::VERSION = '0.021';
|
||||||
|
|
||||||
has 'small_file_id';
|
has 'small_file_id';
|
||||||
has 'big_file_id';
|
has 'big_file_id';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Contact;
|
package Teapot::Bot::Object::Contact;
|
||||||
$Teapot::Bot::Object::Contact::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Contact' objects.
|
# ABSTRACT: The base class for Telegram 'Contact' objects.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Contact::VERSION = '0.021';
|
||||||
|
|
||||||
has 'phone_number';
|
has 'phone_number';
|
||||||
has 'first_name';
|
has 'first_name';
|
||||||
has 'last_name';
|
has 'last_name';
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package Teapot::Bot::Object::Document;
|
package Teapot::Bot::Object::Document;
|
||||||
$Teapot::Bot::Object::Document::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Document' objects
|
# ABSTRACT: The base class for Telegram 'Document' objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
use Teapot::Bot::Object::PhotoSize;
|
use Teapot::Bot::Object::PhotoSize;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Document::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'thumb'; #PhotoSize
|
has 'thumb'; #PhotoSize
|
||||||
has 'file_name';
|
has 'file_name';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::EncryptedCredentials;
|
package Teapot::Bot::Object::EncryptedCredentials;
|
||||||
$Teapot::Bot::Object::EncryptedCredentials::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'EncryptedCredentials' type objects
|
# ABSTRACT: The base class for Telegram 'EncryptedCredentials' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::EncryptedCredentials::VERSION = '0.021';
|
||||||
|
|
||||||
has 'data';
|
has 'data';
|
||||||
has 'hash';
|
has 'hash';
|
||||||
has 'secret';
|
has 'secret';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::EncryptedPassportElement;
|
package Teapot::Bot::Object::EncryptedPassportElement;
|
||||||
$Teapot::Bot::Object::EncryptedPassportElement::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'EncryptedPassportElement' type objects
|
# ABSTRACT: The base class for Telegram 'EncryptedPassportElement' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::EncryptedPassportElement::VERSION = '0.021';
|
||||||
|
|
||||||
# XXX Implement rest of this
|
# XXX Implement rest of this
|
||||||
# https://core.telegram.org/bots/api#encryptedpassportelement
|
# https://core.telegram.org/bots/api#encryptedpassportelement
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
package Teapot::Bot::Object::Game;
|
package Teapot::Bot::Object::Game;
|
||||||
$Teapot::Bot::Object::Game::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram message 'Game' type.
|
# ABSTRACT: The base class for Telegram message 'Game' type.
|
||||||
|
|
||||||
|
|
||||||
@@ -8,6 +7,8 @@ use Teapot::Bot::Object::PhotoSize;
|
|||||||
use Teapot::Bot::Object::Animation;
|
use Teapot::Bot::Object::Animation;
|
||||||
use Teapot::Bot::Object::MessageEntity;
|
use Teapot::Bot::Object::MessageEntity;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Game::VERSION = '0.021';
|
||||||
|
|
||||||
has 'title';
|
has 'title';
|
||||||
has 'description';
|
has 'description';
|
||||||
has 'photo'; # Array of PhotoSize
|
has 'photo'; # Array of PhotoSize
|
||||||
@@ -23,7 +24,7 @@ sub fields {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub arrays { qw/photo text_entities/ }
|
sub arrays { return qw/photo text_entities/; }
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package Teapot::Bot::Object::InlineKeyboardButton;
|
package Teapot::Bot::Object::InlineKeyboardButton;
|
||||||
$Teapot::Bot::Object::InlineKeyboardButton::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'InlineKeyboardButton' type objects
|
# ABSTRACT: The base class for Telegram 'InlineKeyboardButton' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::LoginUrl;
|
use Teapot::Bot::Object::LoginUrl;
|
||||||
use Teapot::Bot::Object::CallbackGame;
|
use Teapot::Bot::Object::CallbackGame;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::InlineKeyboardButton::VERSION = '0.021';
|
||||||
|
|
||||||
has 'text';
|
has 'text';
|
||||||
has 'url';
|
has 'url';
|
||||||
has 'login_url'; #LoginUrl
|
has 'login_url'; #LoginUrl
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::InlineKeyboardMarkup;
|
package Teapot::Bot::Object::InlineKeyboardMarkup;
|
||||||
$Teapot::Bot::Object::InlineKeyboardMarkup::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'InlineKeyboardMarkup' type objects
|
# ABSTRACT: The base class for Telegram 'InlineKeyboardMarkup' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::InlineKeyboardButton;
|
use Teapot::Bot::Object::InlineKeyboardButton;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::InlineKeyboardMarkup::VERSION = '0.021';
|
||||||
|
|
||||||
has 'inline_keyboard';
|
has 'inline_keyboard';
|
||||||
|
|
||||||
sub fields {
|
sub fields {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Invoice;
|
package Teapot::Bot::Object::Invoice;
|
||||||
$Teapot::Bot::Object::Invoice::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Invoice' type objects
|
# ABSTRACT: The base class for Telegram 'Invoice' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Invoice::VERSION = '0.021';
|
||||||
|
|
||||||
has 'title';
|
has 'title';
|
||||||
has 'description';
|
has 'description';
|
||||||
has 'start_parameter';
|
has 'start_parameter';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Location;
|
package Teapot::Bot::Object::Location;
|
||||||
$Teapot::Bot::Object::Location::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram message 'Location' type.
|
# ABSTRACT: The base class for Telegram message 'Location' type.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Location::VERSION = '0.021';
|
||||||
|
|
||||||
has 'longitude';
|
has 'longitude';
|
||||||
has 'latitude';
|
has 'latitude';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::LoginUrl;
|
package Teapot::Bot::Object::LoginUrl;
|
||||||
$Teapot::Bot::Object::LoginUrl::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'LoginUrl' type objects
|
# ABSTRACT: The base class for Telegram 'LoginUrl' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::LoginUrl::VERSION = '0.021';
|
||||||
|
|
||||||
has 'url';
|
has 'url';
|
||||||
has 'forward_text';
|
has 'forward_text';
|
||||||
has 'bot_username';
|
has 'bot_username';
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package Teapot::Bot::Object::Message;
|
package Teapot::Bot::Object::Message;
|
||||||
$Teapot::Bot::Object::Message::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for the Telegram type "Message".
|
# ABSTRACT: The base class for the Telegram type "Message".
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
use Teapot::Bot::Object::User;
|
use Teapot::Bot::Object::User;
|
||||||
@@ -30,6 +28,8 @@ use Teapot::Bot::Object::InlineKeyboardMarkup;
|
|||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Message::VERSION = '0.021';
|
||||||
|
|
||||||
# basic message stuff
|
# basic message stuff
|
||||||
has 'message_id';
|
has 'message_id';
|
||||||
has 'from'; # User
|
has 'from'; # User
|
||||||
@@ -124,7 +124,7 @@ sub fields {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub arrays {
|
sub arrays {
|
||||||
qw/photo entities caption_entities new_chat_members new_chat_photo/
|
return qw/photo entities caption_entities new_chat_members new_chat_photo/;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::MessageEntity;
|
package Teapot::Bot::Object::MessageEntity;
|
||||||
$Teapot::Bot::Object::MessageEntity::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'MessageEntity' type objects
|
# ABSTRACT: The base class for Telegram 'MessageEntity' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::User;
|
use Teapot::Bot::Object::User;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::MessageEntity::VERSION = '0.021';
|
||||||
|
|
||||||
has 'type';
|
has 'type';
|
||||||
has 'offset';
|
has 'offset';
|
||||||
has 'length';
|
has 'length';
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package Teapot::Bot::Object::PassportData;
|
package Teapot::Bot::Object::PassportData;
|
||||||
$Teapot::Bot::Object::PassportData::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'PassportData' type objects
|
# ABSTRACT: The base class for Telegram 'PassportData' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::EncryptedPassportElement;
|
use Teapot::Bot::Object::EncryptedPassportElement;
|
||||||
use Teapot::Bot::Object::EncryptedCredentials;
|
use Teapot::Bot::Object::EncryptedCredentials;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::PassportData::VERSION = '0.021';
|
||||||
|
|
||||||
has 'data'; # Array of EncryptedPassportElement
|
has 'data'; # Array of EncryptedPassportElement
|
||||||
has 'credentials'; # EncryptedCredentials
|
has 'credentials'; # EncryptedCredentials
|
||||||
|
|
||||||
@@ -15,8 +15,9 @@ sub fields {
|
|||||||
'Teapot::Bot::Object::EncryptedCredentials' => [qw/credentials/],
|
'Teapot::Bot::Object::EncryptedCredentials' => [qw/credentials/],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub arrays {
|
sub arrays {
|
||||||
qw/data/;
|
return qw/data/;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::PhotoSize;
|
package Teapot::Bot::Object::PhotoSize;
|
||||||
$Teapot::Bot::Object::PhotoSize::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram message 'PhotoSize' type.
|
# ABSTRACT: The base class for Telegram message 'PhotoSize' type.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Carp qw/croak/;
|
use Carp qw/croak/;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::PhotoSize::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'width';
|
has 'width';
|
||||||
has 'height';
|
has 'height';
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Poll;
|
package Teapot::Bot::Object::Poll;
|
||||||
$Teapot::Bot::Object::Poll::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Poll' type objects
|
# ABSTRACT: The base class for Telegram 'Poll' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::PollOption;
|
use Teapot::Bot::Object::PollOption;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Poll::VERSION = '0.021';
|
||||||
|
|
||||||
has 'id';
|
has 'id';
|
||||||
has 'question';
|
has 'question';
|
||||||
@@ -20,7 +19,7 @@ sub fields {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub arrays {
|
sub arrays {
|
||||||
qw/options/;
|
return qw/options/;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::PollOption;
|
package Teapot::Bot::Object::PollOption;
|
||||||
$Teapot::Bot::Object::PollOption::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'PollOption' type objects
|
# ABSTRACT: The base class for Telegram 'PollOption' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::PollOption::VERSION = '0.021';
|
||||||
|
|
||||||
has 'text';
|
has 'text';
|
||||||
has 'voter_count';
|
has 'voter_count';
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::Sticker;
|
package Teapot::Bot::Object::Sticker;
|
||||||
$Teapot::Bot::Object::Sticker::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram message 'Sticker' type.
|
# ABSTRACT: The base class for Telegram message 'Sticker' type.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::PhotoSize;
|
use Teapot::Bot::Object::PhotoSize;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Sticker::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'width';
|
has 'width';
|
||||||
has 'height';
|
has 'height';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::SuccessfulPayment;
|
package Teapot::Bot::Object::SuccessfulPayment;
|
||||||
$Teapot::Bot::Object::SuccessfulPayment::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'SuccessfulPayment' type objects
|
# ABSTRACT: The base class for Telegram 'SuccessfulPayment' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
# use Teapot::Bot::Object::OrderInfo;
|
# use Teapot::Bot::Object::OrderInfo;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::SuccessfulPayment::VERSION = '0.021';
|
||||||
|
|
||||||
has 'currency';
|
has 'currency';
|
||||||
has 'total_amount';
|
has 'total_amount';
|
||||||
has 'invoice_payload';
|
has 'invoice_payload';
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package Teapot::Bot::Object::User;
|
package Teapot::Bot::Object::User;
|
||||||
$Teapot::Bot::Object::User::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram message 'User' type.
|
# ABSTRACT: The base class for Telegram message 'User' type.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::User::VERSION = '0.021';
|
||||||
|
|
||||||
has 'id';
|
has 'id';
|
||||||
has 'is_bot';
|
has 'is_bot';
|
||||||
has 'first_name';
|
has 'first_name';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::Venue;
|
package Teapot::Bot::Object::Venue;
|
||||||
$Teapot::Bot::Object::Venue::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'LoginUrl' type objects
|
# ABSTRACT: The base class for Telegram 'LoginUrl' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::Location;
|
use Teapot::Bot::Object::Location;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Venue::VERSION = '0.021';
|
||||||
|
|
||||||
has 'location'; #Location
|
has 'location'; #Location
|
||||||
has 'title';
|
has 'title';
|
||||||
has 'address';
|
has 'address';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Teapot::Bot::Object::Video;
|
package Teapot::Bot::Object::Video;
|
||||||
$Teapot::Bot::Object::Video::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Video' object.
|
# ABSTRACT: The base class for Telegram 'Video' object.
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::PhotoSize;
|
use Teapot::Bot::Object::PhotoSize;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Video::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'width';
|
has 'width';
|
||||||
has 'height';
|
has 'height';
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package Teapot::Bot::Object::VideoNote;
|
package Teapot::Bot::Object::VideoNote;
|
||||||
$Teapot::Bot::Object::VideoNote::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'VideoNote' type objects
|
# ABSTRACT: The base class for Telegram 'VideoNote' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
use Teapot::Bot::Object::PhotoSize;
|
use Teapot::Bot::Object::PhotoSize;
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::VideoNote::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'length';
|
has 'length';
|
||||||
has 'duration';
|
has 'duration';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package Teapot::Bot::Object::Voice;
|
package Teapot::Bot::Object::Voice;
|
||||||
$Teapot::Bot::Object::Voice::VERSION = '0.021';
|
|
||||||
# ABSTRACT: The base class for Telegram 'Voice' type objects
|
# ABSTRACT: The base class for Telegram 'Voice' type objects
|
||||||
|
|
||||||
|
|
||||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||||
|
|
||||||
|
$Teapot::Bot::Object::Voice::VERSION = '0.021';
|
||||||
|
|
||||||
has 'file_id';
|
has 'file_id';
|
||||||
has 'duration';
|
has 'duration';
|
||||||
has 'mime_type';
|
has 'mime_type';
|
||||||
|
|||||||
Reference in New Issue
Block a user