First touch to satisfy perlcritic
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package Teapot::Bot::Object::Animation;
|
||||
$Teapot::Bot::Object::Animation::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram message 'Animation' type.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::PhotoSize;
|
||||
use Carp qw/croak/;
|
||||
|
||||
$Teapot::Bot::Object::Animation::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'width';
|
||||
has 'height';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::Audio;
|
||||
$Teapot::Bot::Object::Audio::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Audio' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::Audio::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'duration';
|
||||
has 'performer';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::Base;
|
||||
$Teapot::Bot::Object::Base::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for all Teapot::Bot::Object objects.
|
||||
|
||||
|
||||
use Mojo::Base -base;
|
||||
|
||||
$Teapot::Bot::Object::Base::VERSION = '0.021';
|
||||
|
||||
has '_brain'; # a reference to our brain
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package Teapot::Bot::Object::Chat;
|
||||
$Teapot::Bot::Object::Chat::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Chat' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::ChatPhoto;
|
||||
use Teapot::Bot::Object::Message;
|
||||
|
||||
$Teapot::Bot::Object::Chat::VERSION = '0.021';
|
||||
|
||||
has 'id';
|
||||
has 'type';
|
||||
has 'title';
|
||||
@@ -34,12 +34,12 @@ sub fields {
|
||||
|
||||
|
||||
sub is_user {
|
||||
shift->id > 0;
|
||||
return shift->id > 0;
|
||||
}
|
||||
|
||||
|
||||
sub is_group {
|
||||
shift->id < 0;
|
||||
return shift->id < 0;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::ChatPhoto;
|
||||
$Teapot::Bot::Object::ChatPhoto::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'ChatPhoto' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::ChatPhoto::VERSION = '0.021';
|
||||
|
||||
has 'small_file_id';
|
||||
has 'big_file_id';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::Contact;
|
||||
$Teapot::Bot::Object::Contact::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Contact' objects.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::Contact::VERSION = '0.021';
|
||||
|
||||
has 'phone_number';
|
||||
has 'first_name';
|
||||
has 'last_name';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package Teapot::Bot::Object::Document;
|
||||
$Teapot::Bot::Object::Document::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Document' objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
use Teapot::Bot::Object::PhotoSize;
|
||||
|
||||
$Teapot::Bot::Object::Document::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'thumb'; #PhotoSize
|
||||
has 'file_name';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::EncryptedCredentials;
|
||||
$Teapot::Bot::Object::EncryptedCredentials::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'EncryptedCredentials' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::EncryptedCredentials::VERSION = '0.021';
|
||||
|
||||
has 'data';
|
||||
has 'hash';
|
||||
has 'secret';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::EncryptedPassportElement;
|
||||
$Teapot::Bot::Object::EncryptedPassportElement::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'EncryptedPassportElement' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::EncryptedPassportElement::VERSION = '0.021';
|
||||
|
||||
# XXX Implement rest of this
|
||||
# https://core.telegram.org/bots/api#encryptedpassportelement
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package Teapot::Bot::Object::Game;
|
||||
$Teapot::Bot::Object::Game::VERSION = '0.021';
|
||||
# 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::MessageEntity;
|
||||
|
||||
$Teapot::Bot::Object::Game::VERSION = '0.021';
|
||||
|
||||
has 'title';
|
||||
has 'description';
|
||||
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,12 +1,12 @@
|
||||
package Teapot::Bot::Object::InlineKeyboardButton;
|
||||
$Teapot::Bot::Object::InlineKeyboardButton::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'InlineKeyboardButton' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::LoginUrl;
|
||||
use Teapot::Bot::Object::CallbackGame;
|
||||
|
||||
$Teapot::Bot::Object::InlineKeyboardButton::VERSION = '0.021';
|
||||
|
||||
has 'text';
|
||||
has 'url';
|
||||
has 'login_url'; #LoginUrl
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package Teapot::Bot::Object::InlineKeyboardMarkup;
|
||||
$Teapot::Bot::Object::InlineKeyboardMarkup::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'InlineKeyboardMarkup' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::InlineKeyboardButton;
|
||||
|
||||
$Teapot::Bot::Object::InlineKeyboardMarkup::VERSION = '0.021';
|
||||
|
||||
has 'inline_keyboard';
|
||||
|
||||
sub fields {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::Invoice;
|
||||
$Teapot::Bot::Object::Invoice::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Invoice' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::Invoice::VERSION = '0.021';
|
||||
|
||||
has 'title';
|
||||
has 'description';
|
||||
has 'start_parameter';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::Location;
|
||||
$Teapot::Bot::Object::Location::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram message 'Location' type.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::Location::VERSION = '0.021';
|
||||
|
||||
has 'longitude';
|
||||
has 'latitude';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::LoginUrl;
|
||||
$Teapot::Bot::Object::LoginUrl::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'LoginUrl' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::LoginUrl::VERSION = '0.021';
|
||||
|
||||
has 'url';
|
||||
has 'forward_text';
|
||||
has 'bot_username';
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package Teapot::Bot::Object::Message;
|
||||
$Teapot::Bot::Object::Message::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for the Telegram type "Message".
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
use Teapot::Bot::Object::User;
|
||||
@@ -30,6 +28,8 @@ use Teapot::Bot::Object::InlineKeyboardMarkup;
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
$Teapot::Bot::Object::Message::VERSION = '0.021';
|
||||
|
||||
# basic message stuff
|
||||
has 'message_id';
|
||||
has 'from'; # User
|
||||
@@ -124,7 +124,7 @@ sub fields {
|
||||
}
|
||||
|
||||
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;
|
||||
$Teapot::Bot::Object::MessageEntity::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'MessageEntity' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::User;
|
||||
|
||||
$Teapot::Bot::Object::MessageEntity::VERSION = '0.021';
|
||||
|
||||
has 'type';
|
||||
has 'offset';
|
||||
has 'length';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package Teapot::Bot::Object::PassportData;
|
||||
$Teapot::Bot::Object::PassportData::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'PassportData' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::EncryptedPassportElement;
|
||||
use Teapot::Bot::Object::EncryptedCredentials;
|
||||
|
||||
$Teapot::Bot::Object::PassportData::VERSION = '0.021';
|
||||
|
||||
has 'data'; # Array of EncryptedPassportElement
|
||||
has 'credentials'; # EncryptedCredentials
|
||||
|
||||
@@ -15,8 +15,9 @@ sub fields {
|
||||
'Teapot::Bot::Object::EncryptedCredentials' => [qw/credentials/],
|
||||
};
|
||||
}
|
||||
|
||||
sub arrays {
|
||||
qw/data/;
|
||||
return qw/data/;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package Teapot::Bot::Object::PhotoSize;
|
||||
$Teapot::Bot::Object::PhotoSize::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram message 'PhotoSize' type.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Carp qw/croak/;
|
||||
|
||||
$Teapot::Bot::Object::PhotoSize::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'width';
|
||||
has 'height';
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package Teapot::Bot::Object::Poll;
|
||||
$Teapot::Bot::Object::Poll::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Poll' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::PollOption;
|
||||
|
||||
$Teapot::Bot::Object::Poll::VERSION = '0.021';
|
||||
|
||||
has 'id';
|
||||
has 'question';
|
||||
@@ -20,7 +19,7 @@ sub fields {
|
||||
}
|
||||
|
||||
sub arrays {
|
||||
qw/options/;
|
||||
return qw/options/;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::PollOption;
|
||||
$Teapot::Bot::Object::PollOption::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'PollOption' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::PollOption::VERSION = '0.021';
|
||||
|
||||
has 'text';
|
||||
has 'voter_count';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package Teapot::Bot::Object::Sticker;
|
||||
$Teapot::Bot::Object::Sticker::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram message 'Sticker' type.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::PhotoSize;
|
||||
|
||||
$Teapot::Bot::Object::Sticker::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'width';
|
||||
has 'height';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package Teapot::Bot::Object::SuccessfulPayment;
|
||||
$Teapot::Bot::Object::SuccessfulPayment::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'SuccessfulPayment' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
# use Teapot::Bot::Object::OrderInfo;
|
||||
|
||||
$Teapot::Bot::Object::SuccessfulPayment::VERSION = '0.021';
|
||||
|
||||
has 'currency';
|
||||
has 'total_amount';
|
||||
has 'invoice_payload';
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package Teapot::Bot::Object::User;
|
||||
$Teapot::Bot::Object::User::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram message 'User' type.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::User::VERSION = '0.021';
|
||||
|
||||
has 'id';
|
||||
has 'is_bot';
|
||||
has 'first_name';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package Teapot::Bot::Object::Venue;
|
||||
$Teapot::Bot::Object::Venue::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'LoginUrl' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::Location;
|
||||
|
||||
$Teapot::Bot::Object::Venue::VERSION = '0.021';
|
||||
|
||||
has 'location'; #Location
|
||||
has 'title';
|
||||
has 'address';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package Teapot::Bot::Object::Video;
|
||||
$Teapot::Bot::Object::Video::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Video' object.
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::PhotoSize;
|
||||
|
||||
$Teapot::Bot::Object::Video::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'width';
|
||||
has 'height';
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package Teapot::Bot::Object::VideoNote;
|
||||
$Teapot::Bot::Object::VideoNote::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'VideoNote' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
use Teapot::Bot::Object::PhotoSize;
|
||||
|
||||
$Teapot::Bot::Object::VideoNote::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'length';
|
||||
has 'duration';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package Teapot::Bot::Object::Voice;
|
||||
$Teapot::Bot::Object::Voice::VERSION = '0.021';
|
||||
# ABSTRACT: The base class for Telegram 'Voice' type objects
|
||||
|
||||
|
||||
use Mojo::Base 'Teapot::Bot::Object::Base';
|
||||
|
||||
$Teapot::Bot::Object::Voice::VERSION = '0.021';
|
||||
|
||||
has 'file_id';
|
||||
has 'duration';
|
||||
has 'mime_type';
|
||||
|
||||
Reference in New Issue
Block a user