Update Teapot lib to comply with api v5.6, v5.7, v6.0

This commit is contained in:
eleksir
2022-04-16 19:27:32 +03:00
parent 305550f6cf
commit 216a139c18
46 changed files with 277 additions and 155 deletions

View File

@@ -4,7 +4,7 @@ use strict;
use warnings;
use 5.018; ## no critic (ProhibitImplicitImport)
use utf8;
$Teapot::Bot::VERSION = '0.022';
$Teapot::Bot::VERSION = '0.023';
# ABSTRACT: A base class to make your very own Telegram bot
1;
@@ -25,7 +25,7 @@ A base class to make your very own Telegram bot
=head1 VERSION
version 0.022
version 0.023
=head1 SYNOPSIS

View File

@@ -28,7 +28,7 @@ use Teapot::Bot::Object::Chat ();
use Teapot::Bot::Object::ChatMember ();
use Teapot::Bot::Object::ChatInviteLink ();
$Teapot::Bot::Brain::VERSION = '0.022';
$Teapot::Bot::Brain::VERSION = '0.023';
# base class for building telegram robots with Mojolicious
has longpoll_time => 60;
@@ -716,7 +716,7 @@ Teapot::Bot::Brain - A base class to make your very own Telegram bot
=head1 VERSION
version 0.022
version 0.023
=head1 SYNOPSIS

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::PhotoSize ();
$Teapot::Bot::Object::Animation::VERSION = '0.022';
$Teapot::Bot::Object::Animation::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -43,7 +43,7 @@ Teapot::Bot::Object::Animation - The base class for Telegram message 'Animation'
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'Animation' type.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::Audio::VERSION = '0.022';
$Teapot::Bot::Object::Audio::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -41,7 +41,7 @@ Teapot::Bot::Object::Audio - The base class for Telegram 'Audio' type objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Audio' type objects.

View File

@@ -13,7 +13,7 @@ use List::Util qw/any/;
use Mojo::Base -base;
$Teapot::Bot::Object::Base::VERSION = '0.022';
$Teapot::Bot::Object::Base::VERSION = '0.023';
has '_brain'; # a reference to our brain
@@ -187,7 +187,7 @@ Teapot::Bot::Object::Base - The base class for all Telegram::Bot::Object objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION

View File

@@ -7,7 +7,7 @@ use 5.018; ## no critic (ProhibitImplicitImport)
use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::CallbackGame::VERSION = '0.022';
$Teapot::Bot::Object::CallbackGame::VERSION = '0.023';
# https://core.telegram.org/bots/api#callbackgame
# "A placeholder, currently holds no information. Use BotFather to set up your game"
@@ -30,7 +30,7 @@ Teapot::Bot::Object::CallbackGame - The base class for Telegram message 'Callbac
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'CallbackGame' type.

View File

@@ -12,7 +12,7 @@ use Teapot::Bot::Object::Message ();
use Teapot::Bot::Object::ChatPermissions ();
use Teapot::Bot::Object::ChatLocation ();
$Teapot::Bot::Object::Chat::VERSION = '0.022';
$Teapot::Bot::Object::Chat::VERSION = '0.023';
has 'id';
has 'type';
@@ -77,7 +77,7 @@ Teapot::Bot::Object::Chat - The base class for Telegram 'Chat' type objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Chat' type objects.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::User ();
$Teapot::Bot::Object::ChatInviteLink::VERSION = '0.022';
$Teapot::Bot::Object::ChatInviteLink::VERSION = '0.023';
has 'invite_link';
has 'creator';
@@ -44,7 +44,7 @@ Teapot::Bot::Object::ChatInviteLink - The base class for Telegram message 'ChatI
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'ChatInviteLink' type.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::ChatLocation::VERSION = '0.022';
$Teapot::Bot::Object::ChatLocation::VERSION = '0.023';
has 'location';
has 'address';
@@ -34,7 +34,7 @@ Teapot::Bot::Object::ChatLocation - The base class for Telegram message 'ChatLoc
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'ChatLocation' type.

View File

@@ -12,7 +12,7 @@ use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::User ();
$Teapot::Bot::Object::ChatMember::VERSION = '0.022';
$Teapot::Bot::Object::ChatMember::VERSION = '0.023';
# ChatMemberOwner
has 'user';
@@ -145,7 +145,7 @@ Teapot::Bot::Object::ChatMember - The base class for Telegram 'ChatMember' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'ChatMember' type objects.

View File

@@ -13,7 +13,7 @@ use Teapot::Bot::Object::ChatMember ();
use Teapot::Bot::Object::ChatInviteLink ();
use Teapot::Bot::Object::Voice ();
$Teapot::Bot::Object::ChatMemberUpdated::VERSION = '0.022';
$Teapot::Bot::Object::ChatMemberUpdated::VERSION = '0.023';
has 'chat';
has 'from';
@@ -50,7 +50,7 @@ Teapot::Bot::Object::ChatMemberUpdated - The base class for Telegram 'ChatMember
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'ChatMemberUpdated' type objects.

View File

@@ -10,7 +10,7 @@ use Carp qw(carp);
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Brain ();
$Teapot::Bot::Object::ChatPermissions::VERSION = '0.022';
$Teapot::Bot::Object::ChatPermissions::VERSION = '0.023';
# all fields are optional
# N.B. Some of the fields "overlaps" other, so in order to guess valid set of permissions you should check all of them
@@ -98,7 +98,7 @@ Teapot::Bot::Object::ChatPermissions - The base class for Telegram 'ChatPermissi
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'ChatPermissions' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::ChatPhoto::VERSION = '0.022';
$Teapot::Bot::Object::ChatPhoto::VERSION = '0.023';
has 'small_file_id';
has 'small_file_unique_id';
@@ -35,7 +35,7 @@ Teapot::Bot::Object::ChatPhoto - The base class for Telegram 'ChatPhoto' type ob
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'ChatPhoto' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::Contact::VERSION = '0.022';
$Teapot::Bot::Object::Contact::VERSION = '0.023';
has 'phone_number';
has 'first_name';
@@ -36,7 +36,7 @@ Teapot::Bot::Object::Contact - The base class for Telegram 'Contact' objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Contact' objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::Dice::VERSION = '0.022';
$Teapot::Bot::Object::Dice::VERSION = '0.023';
has 'emoji';
has 'value';
@@ -31,7 +31,7 @@ Teapot::Bot::Object::Dice - The base class for Telegram message 'Dice' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'Dice' type.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::PhotoSize ();
$Teapot::Bot::Object::Document::VERSION = '0.022';
$Teapot::Bot::Object::Document::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -39,7 +39,7 @@ Teapot::Bot::Object::Document - The base class for Telegram 'Document' objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Document' objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::EncryptedCredentials::VERSION = '0.022';
$Teapot::Bot::Object::EncryptedCredentials::VERSION = '0.023';
has 'data';
has 'hash';
@@ -32,7 +32,7 @@ Teapot::Bot::Object::EncryptedCredentials - The base class for Telegram 'Encrypt
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'EncryptedCredentials' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::EncryptedPassportElement::VERSION = '0.022';
$Teapot::Bot::Object::EncryptedPassportElement::VERSION = '0.023';
# XXX Implement rest of this
# https://core.telegram.org/bots/api#encryptedpassportelement
@@ -38,7 +38,7 @@ Teapot::Bot::Object::EncryptedPassportElement - The base class for Telegram 'Enc
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'EncryptedPassportElement' type objects.

View File

@@ -11,7 +11,7 @@ use Teapot::Bot::Object::PhotoSize ();
use Teapot::Bot::Object::Animation ();
use Teapot::Bot::Object::MessageEntity ();
$Teapot::Bot::Object::Game::VERSION = '0.022';
$Teapot::Bot::Object::Game::VERSION = '0.023';
has 'title';
has 'description';
@@ -45,7 +45,7 @@ Teapot::Bot::Object::Game - The base class for Telegram message 'Game' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'Game' type.

View File

@@ -10,7 +10,7 @@ use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::LoginUrl ();
use Teapot::Bot::Object::CallbackGame ();
$Teapot::Bot::Object::InlineKeyboardButton::VERSION = '0.022';
$Teapot::Bot::Object::InlineKeyboardButton::VERSION = '0.023';
has 'text';
has 'url';
@@ -43,7 +43,7 @@ Teapot::Bot::Object::InlineKeyboardButton - The base class for Telegram 'InlineK
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'InlineKeyboardButton' type objects.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::InlineKeyboardButton ();
$Teapot::Bot::Object::InlineKeyboardMarkup::VERSION = '0.022';
$Teapot::Bot::Object::InlineKeyboardMarkup::VERSION = '0.023';
has 'inline_keyboard';
@@ -35,7 +35,7 @@ Teapot::Bot::Object::InlineKeyboardMarkup - The base class for Telegram 'InlineK
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'InlineKeyboardMarkup' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::Invoice::VERSION = '0.022';
$Teapot::Bot::Object::Invoice::VERSION = '0.023';
has 'title';
has 'description';
@@ -34,7 +34,7 @@ Teapot::Bot::Object::Invoice - The base class for Telegram 'Invoice' type object
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Invoice' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::Location::VERSION = '0.022';
$Teapot::Bot::Object::Location::VERSION = '0.023';
has 'longitude';
has 'latitude';
@@ -35,7 +35,7 @@ Teapot::Bot::Object::Location - The base class for Telegram message 'Location' t
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'Location' type.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::LoginUrl::VERSION = '0.022';
$Teapot::Bot::Object::LoginUrl::VERSION = '0.023';
has 'url';
has 'forward_text';
@@ -33,7 +33,7 @@ Teapot::Bot::Object::LoginUrl - The base class for Telegram 'LoginUrl' type obje
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'LoginUrl' type objects.

View File

@@ -0,0 +1,55 @@
package Teapot::Bot::Object::MaskPosition;
# ABSTRACT: The base class for Telegram 'MaskPosition' type objects
use strict;
use warnings;
use 5.018; ## no critic (ProhibitImplicitImport)
use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::MaskPosition::VERSION = '0.023';
has 'point';
has 'x_shift';
has 'y_shift';
has 'scale';
sub fields {
return { scalar => [qw/point x_shift y_shift scale/] };
}
1;
__END__
=pod
=encoding utf8
=head1 NAME
Teapot::Bot::Object::MaskPosition - The base class for Telegram 'MaskPosition' type objects
=head1 VERSION
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'MaskPosition' type objects.
See L<https://core.telegram.org/bots/api#MaskPosition> for details of the
attributes available for C<Teapot::Bot::Object::MaskPosition> objects.
=head1 AUTHOR
Sergei Fedosov <eleksir@gmail.com>
=head1 LICENSE AND COPYRIGHT
This software is copyright (c) 2022 by Sergei Fedosov <eleksir@gmail.com>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View File

@@ -35,12 +35,12 @@ use Teapot::Bot::Object::InlineKeyboardMarkup ();
use Teapot::Bot::Object::ProximityAlertTriggered ();
use Teapot::Bot::Object::Dice ();
use Teapot::Bot::Object::MessageAutoDeleteTimerChanged ();
use Teapot::Bot::Object::VoiceChatScheduled ();
use Teapot::Bot::Object::VoiceChatStarted ();
use Teapot::Bot::Object::VoiceChatEnded ();
use Teapot::Bot::Object::VoiceChatParticipantsInvited ();
use Teapot::Bot::Object::VideoChatScheduled ();
use Teapot::Bot::Object::VideoChatStarted ();
use Teapot::Bot::Object::VideoChatEnded ();
use Teapot::Bot::Object::VideoChatParticipantsInvited ();
$Teapot::Bot::Object::Message::VERSION = '0.022';
$Teapot::Bot::Object::Message::VERSION = '0.023';
# basic message stuff
has 'message_id';
@@ -96,10 +96,11 @@ has 'successful_payment'; # SuccessfulPayment
has 'connected_website';
has 'passport_data'; # PassportData
has 'proximity_alert_triggered';
has 'voice_chat_scheduled'; # Optional. Service message: voice chat scheduled
has 'voice_chat_started'; # Optional. Service message: voice chat started
has 'voice_chat_ended'; # Optional. Service message: voice chat ended
has 'voice_chat_participants_invited'; # Optional. Service message: new participants invited to a voice chat
has 'video_chat_scheduled';
has 'video_chat_started';
has 'video_chat_ended';
has 'video_chat_participants_invited';
has 'web_app_data';
has 'reply_markup'; # Array of InlineKeyboardMarkup
sub fields {
@@ -112,39 +113,40 @@ sub fields {
group_chat_created supergroup_chat_created
channel_chat_created migrate_to_chat_id
migrate_from_chat_id connected_website/],
'Teapot::Bot::Object::User' => [qw/from forward_from via_bot new_chat_members left_chat_member /],
'Teapot::Bot::Object::User' => [qw/from forward_from via_bot new_chat_members left_chat_member /],
'Teapot::Bot::Object::Chat' => [qw/sender_chat chat forward_from_chat/],
'Teapot::Bot::Object::Message' => [qw/reply_to_message pinned_message/],
'Teapot::Bot::Object::MessageEntity' => [qw/entities caption_entities /],
'Teapot::Bot::Object::Chat' => [qw/sender_chat chat forward_from_chat/],
'Teapot::Bot::Object::Message' => [qw/reply_to_message pinned_message/],
'Teapot::Bot::Object::MessageEntity' => [qw/entities caption_entities /],
'Teapot::Bot::Object::Audio' => [qw/audio/],
'Teapot::Bot::Object::Document' => [qw/document/],
'Teapot::Bot::Object::Animation' => [qw/animation/],
'Teapot::Bot::Object::Game' => [qw/game/],
'Teapot::Bot::Object::PhotoSize' => [qw/photo new_chat_photo/],
'Teapot::Bot::Object::Sticker' => [qw/sticker/],
'Teapot::Bot::Object::Video' => [qw/video/],
'Teapot::Bot::Object::Voice' => [qw/voice/],
'Teapot::Bot::Object::VideoNote' => [qw/video_note/],
'Teapot::Bot::Object::Audio' => [qw/audio/],
'Teapot::Bot::Object::Document' => [qw/document/],
'Teapot::Bot::Object::Animation' => [qw/animation/],
'Teapot::Bot::Object::Game' => [qw/game/],
'Teapot::Bot::Object::PhotoSize' => [qw/photo new_chat_photo/],
'Teapot::Bot::Object::Sticker' => [qw/sticker/],
'Teapot::Bot::Object::Video' => [qw/video/],
'Teapot::Bot::Object::Voice' => [qw/voice/],
'Teapot::Bot::Object::VideoNote' => [qw/video_note/],
'Teapot::Bot::Object::Contact' => [qw/contact/],
'Teapot::Bot::Object::Location' => [qw/location/],
'Teapot::Bot::Object::Venue' => [qw/venue/],
'Teapot::Bot::Object::Contact' => [qw/contact/],
'Teapot::Bot::Object::Location' => [qw/location/],
'Teapot::Bot::Object::Venue' => [qw/venue/],
'Teapot::Bot::Object::Poll' => [qw/poll/],
'Teapot::Bot::Object::Poll' => [qw/poll/],
'Teapot::Bot::Object::Invoice' => [qw/invoice/],
'Teapot::Bot::Object::SuccessfulPayment' => [qw/successful_payment/],
'Teapot::Bot::Object::PassportData' => [qw/passport_data/],
'Teapot::Bot::Object::InlineKeyboardMarkup' => [qw/reply_markup/],
'Teapot::Bot::Object::Invoice' => [qw/invoice/],
'Teapot::Bot::Object::SuccessfulPayment' => [qw/successful_payment/],
'Teapot::Bot::Object::PassportData' => [qw/passport_data/],
'Teapot::Bot::Object::InlineKeyboardMarkup' => [qw/reply_markup/],
'Teapot::Bot::Object::ProximityAlertTriggered' => [qw/proximity_alert_triggered/],
'Teapot::Bot::Object::Dice' => [qw/dice/],
'Teapot::Bot::Object::Dice' => [qw/dice/],
'Teapot::Bot::Object::MessageAutoDeleteTimerChanged' => [qw/message_auto_delete_timer_changed/],
'Teapot::Bot::Object::VoiceChatScheduled' => [qw/voice_chat_scheduled/],
'Teapot::Bot::Object::VoiceChatStarted' => [qw/voice_chat_started/],
'Teapot::Bot::Object::VoiceChatEnded' => [qw/voice_chat_ended/],
'Teapot::Bot::Object::VoiceChatParticipantsInvited' => [qw/voice_chat_participants_invited/],
'Teapot::Bot::Object::VideoChatScheduled' => [qw/voice_chat_scheduled/],
'Teapot::Bot::Object::VideoChatStarted' => [qw/voice_chat_started/],
'Teapot::Bot::Object::VideoChatEnded' => [qw/voice_chat_ended/],
'Teapot::Bot::Object::VideoChatParticipantsInvited' => [qw/voice_chat_participants_invited/],
'Teapot::Bot::Object::WebAppData' => [qw/web_app_data/],
};
}
@@ -210,7 +212,7 @@ Teapot::Bot::Object::Message - The base class for the Telegram type "Message"
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for the Telegram type "Message".
@@ -227,6 +229,13 @@ A convenience method to reply to a message with text.
Will return the C<Teapot::Bot::Object::Message> object representing the message
sent.
=head2 replyMd
A convenience method to reply to a message with markdown formatted text.
Will return the C<Teapot::Bot::Object::Message> object representing the message
sent.
=head2 typing
Sends notification to chat that bot is "typing" something.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::MessageAutoDeleteTimerChanged::VERSION = '0.022';
$Teapot::Bot::Object::MessageAutoDeleteTimerChanged::VERSION = '0.023';
has 'message_auto_delete_time';
@@ -32,7 +32,7 @@ Teapot::Bot::Object::MessageAutoDeleteTimerChanged - The base class for Telegram
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'MessageAutoDeleteTimerChanged' type objects.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::User ();
$Teapot::Bot::Object::MessageEntity::VERSION = '0.022';
$Teapot::Bot::Object::MessageEntity::VERSION = '0.023';
has 'type';
has 'offset';
@@ -39,7 +39,7 @@ Teapot::Bot::Object::MessageEntity - The base class for Telegram 'MessageEntity'
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'MessageEntity' type objects.

View File

@@ -10,7 +10,7 @@ use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::EncryptedPassportElement ();
use Teapot::Bot::Object::EncryptedCredentials ();
$Teapot::Bot::Object::PassportData::VERSION = '0.022';
$Teapot::Bot::Object::PassportData::VERSION = '0.023';
has 'data'; # Array of EncryptedPassportElement
has 'credentials'; # EncryptedCredentials
@@ -40,7 +40,7 @@ Teapot::Bot::Object::PassportData - The base class for Telegram 'PassportData' t
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'PassportData' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::PhotoSize::VERSION = '0.022';
$Teapot::Bot::Object::PhotoSize::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -34,7 +34,7 @@ Teapot::Bot::Object::PhotoSize - The base class for Telegram message 'PhotoSize'
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'PhotoSize' type.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::PollOption ();
$Teapot::Bot::Object::Poll::VERSION = '0.022';
$Teapot::Bot::Object::Poll::VERSION = '0.023';
has 'id';
has 'question';
@@ -52,7 +52,7 @@ Teapot::Bot::Object::Poll - The base class for Telegram 'Poll' type objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Poll' type objects

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::PollAnswer::VERSION = '0.022';
$Teapot::Bot::Object::PollAnswer::VERSION = '0.023';
has 'poll_id';
has 'user';
@@ -39,7 +39,7 @@ Teapot::Bot::Object::PollAnswer - The base class for Telegram 'PollAnswer' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'PollAnswer' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::PollOption::VERSION = '0.022';
$Teapot::Bot::Object::PollOption::VERSION = '0.023';
has 'text';
has 'voter_count';
@@ -31,7 +31,7 @@ Teapot::Bot::Object::PollOption - The base class for Telegram 'PollOption' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'PollOption' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::ProximityAlertTriggered::VERSION = '0.022';
$Teapot::Bot::Object::ProximityAlertTriggered::VERSION = '0.023';
has 'traveler'; # User
has 'watcher'; # User
@@ -35,7 +35,7 @@ Teapot::Bot::Object::ProximityAlertTriggered - The base class for Telegram messa
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'ProximityAlertTriggered' type.

View File

@@ -8,22 +8,27 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::PhotoSize ();
use Teapot::Bot::Object::MaskPosition ();
$Teapot::Bot::Object::Sticker::VERSION = '0.022';
$Teapot::Bot::Object::Sticker::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
has 'width';
has 'height';
has 'is_animated';
has 'is_video';
has 'thumb'; # PhotoSize
has 'emoji';
has 'set_name';
# has 'mask_position'; # XXX TODO
has 'mask_position';
has 'file_size';
sub fields {
return {
scalar => [ qw/file_id width height emoji set_name file_size/ ],
scalar => [ qw/file_id file_unique_id width height is_animated is_video emoji set_name file_size/ ],
'Teapot::Bot::Object::PhotoSize' => [ qw/thumb/ ],
'Teapot::Bot::Object::MaskPosition' => [qw/mask_position/],
};
}
@@ -41,7 +46,7 @@ Teapot::Bot::Object::Sticker - The base class for Telegram message 'Sticker' typ
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'Sticker' type.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
# use Teapot::Bot::Object::OrderInfo;
$Teapot::Bot::Object::SuccessfulPayment::VERSION = '0.022';
$Teapot::Bot::Object::SuccessfulPayment::VERSION = '0.023';
has 'currency';
has 'total_amount';
@@ -41,7 +41,7 @@ Teapot::Bot::Object::SuccessfulPayment - The base class for Telegram 'Successful
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'SuccessfulPayment' type objects.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::User::VERSION = '0.022';
$Teapot::Bot::Object::User::VERSION = '0.023';
has 'id';
has 'is_bot';
@@ -41,7 +41,7 @@ Teapot::Bot::Object::User - The base class for Telegram message 'User' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'User' type.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::Location ();
$Teapot::Bot::Object::Venue::VERSION = '0.022';
$Teapot::Bot::Object::Venue::VERSION = '0.023';
has 'location'; #Location
has 'title';
@@ -41,7 +41,7 @@ Teapot::Bot::Object::Venue - The base class for Telegram 'LoginUrl' type objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'LoginUrl' type objects.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::PhotoSize ();
$Teapot::Bot::Object::Video::VERSION = '0.022';
$Teapot::Bot::Object::Video::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -43,7 +43,7 @@ Teapot::Bot::Object::Video - The base class for Telegram 'Video' object
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Video' object.

View File

@@ -1,5 +1,5 @@
package Teapot::Bot::Object::VoiceChatEnded;
# ABSTRACT: The base class for Telegram message 'VoiceChatEnded' type.
package Teapot::Bot::Object::VideoChatEnded;
# ABSTRACT: The base class for Telegram message 'VideoChatEnded' type.
use strict;
use warnings;
@@ -8,9 +8,9 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::VoiceChatEnded::VERSION = '0.022';
$Teapot::Bot::Object::VideoChatEnded::VERSION = '0.023';
# This object represents a service message about a voice chat started in the chat. Currently holds no information.
# This object represents a service message about a Video chat started in the chat. Currently holds no information.
has 'duration';
sub fields {
@@ -27,17 +27,17 @@ __END__
=head1 NAME
Teapot::Bot::Object::VoiceChatEnded - The base class for Telegram message 'VoiceChatEnded' type
Teapot::Bot::Object::VideoChatEnded - The base class for Telegram message 'VideoChatEnded' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'VoiceChatEnded' type.
The base class for Telegram message 'VideoChatEnded' type.
See L<https://core.telegram.org/bots/api#voicechatended> for details of the
attributes available for C<Teapot::Bot::Object::VoiceChatEnded> objects.
See L<https://core.telegram.org/bots/api#Videochatended> for details of the
attributes available for C<Teapot::Bot::Object::VideoChatEnded> objects.
=head1 AUTHOR
@@ -45,7 +45,7 @@ Sergei Fedosov <eleksir@gmail.com>
=head1 LICENSE AND COPYRIGHT
This software is copyright (c) 2021 by Sergei Fedosov <eleksir@gmail.com>.
This software is copyright (c) 2022 by Sergei Fedosov <eleksir@gmail.com>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

View File

@@ -1,5 +1,5 @@
package Teapot::Bot::Object::VoiceChatParticipantsInvited;
# ABSTRACT: The base class for Telegram message 'VoiceChatParticipantsInvited' type.
package Teapot::Bot::Object::VideoChatParticipantsInvited;
# ABSTRACT: The base class for Telegram message 'VideoChatParticipantsInvited' type.
use strict;
use warnings;
@@ -9,9 +9,9 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::User ();
$Teapot::Bot::Object::VoiceChatParticipantsInvited::VERSION = '0.022';
$Teapot::Bot::Object::VideoChatParticipantsInvited::VERSION = '0.023';
# This object represents a service message about a voice chat started in the chat. Currently holds no information.
# This object represents a service message about a Video chat started in the chat. Currently holds no information.
has 'users';
sub fields {
@@ -32,17 +32,17 @@ __END__
=head1 NAME
Teapot::Bot::Object::VoiceChatParticipantsInvited - The base class for Telegram message 'VoiceChatParticipantsInvited' type
Teapot::Bot::Object::VideoChatParticipantsInvited - The base class for Telegram message 'VideoChatParticipantsInvited' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'VoiceChatParticipantsInvited' type.
The base class for Telegram message 'VideoChatParticipantsInvited' type.
See L<https://core.telegram.org/bots/api#voicechatparticipantsinvited> for details of the
attributes available for C<Teapot::Bot::Object::VoiceChatParticipantsInvited> objects.
See L<https://core.telegram.org/bots/api#Videochatparticipantsinvited> for details of the
attributes available for C<Teapot::Bot::Object::VideoChatParticipantsInvited> objects.
=head1 AUTHOR
@@ -50,7 +50,7 @@ Sergei Fedosov <eleksir@gmail.com>
=head1 LICENSE AND COPYRIGHT
This software is copyright (c) 2021 by Sergei Fedosov <eleksir@gmail.com>.
This software is copyright (c) 2022 by Sergei Fedosov <eleksir@gmail.com>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

View File

@@ -1,4 +1,4 @@
package Teapot::Bot::Object::VoiceChatScheduled;
package Teapot::Bot::Object::VideoChatScheduled;
# ABSTRACT: The base class for Telegram message 'VoiceChatEnded' type.
use strict;
@@ -8,9 +8,9 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::VoiceChatScheduled::VERSION = '0.022';
$Teapot::Bot::Object::VideoChatScheduled::VERSION = '0.023';
# This object represents a service message about a voice chat started in the chat. Currently holds no information.
# This object represents a service message about a video chat started in the chat. Currently holds no information.
has 'start_date';
sub fields {
@@ -27,17 +27,17 @@ __END__
=head1 NAME
Teapot::Bot::Object::VoiceChatScheduled - The base class for Telegram message 'VoiceChatScheduled' type
Teapot::Bot::Object::VideoChatScheduled - The base class for Telegram message 'VideoChatScheduled' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'VoiceChatScheduled' type.
The base class for Telegram message 'VideoChatScheduled' type.
See L<https://core.telegram.org/bots/api#voicechatscheduled> for details of the
attributes available for C<Teapot::Bot::Object::VoiceChatScheduled> objects.
See L<https://core.telegram.org/bots/api#Videochatscheduled> for details of the
attributes available for C<Teapot::Bot::Object::VideoChatScheduled> objects.
=head1 AUTHOR
@@ -45,7 +45,7 @@ Sergei Fedosov <eleksir@gmail.com>
=head1 LICENSE AND COPYRIGHT
This software is copyright (c) 2021 by Sergei Fedosov <eleksir@gmail.com>.
This software is copyright (c) 2022 by Sergei Fedosov <eleksir@gmail.com>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

View File

@@ -1,5 +1,5 @@
package Teapot::Bot::Object::VoiceChatStarted;
# ABSTRACT: The base class for Telegram message 'VoiceChatStarted' type.
package Teapot::Bot::Object::VideoChatStarted;
# ABSTRACT: The base class for Telegram message 'VideoChatStarted' type.
use strict;
use warnings;
@@ -8,9 +8,9 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::VoiceChatStarted::VERSION = '0.022';
$Teapot::Bot::Object::VideoChatStarted::VERSION = '0.023';
# This object represents a service message about a voice chat started in the chat. Currently holds no information.
# This object represents a service message about a Video chat started in the chat. Currently holds no information.
has 'stub';
sub fields {
@@ -27,17 +27,17 @@ __END__
=head1 NAME
Teapot::Bot::Object::VoiceChatStarted - The base class for Telegram message 'VoiceChatStarted' type
Teapot::Bot::Object::VideoChatStarted - The base class for Telegram message 'VideoChatStarted' type
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram message 'VoiceChatStarted' type.
The base class for Telegram message 'VideoChatStarted' type.
See L<https://core.telegram.org/bots/api#voicechatstarted> for details of the
attributes available for C<Teapot::Bot::Object::VoiceChatStarted> objects.
See L<https://core.telegram.org/bots/api#Videochatstarted> for details of the
attributes available for C<Teapot::Bot::Object::VideoChatStarted> objects.
=head1 AUTHOR
@@ -45,7 +45,7 @@ Sergei Fedosov <eleksir@gmail.com>
=head1 LICENSE AND COPYRIGHT
This software is copyright (c) 2021 by Sergei Fedosov <eleksir@gmail.com>.
This software is copyright (c) 2022 by Sergei Fedosov <eleksir@gmail.com>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

View File

@@ -9,7 +9,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
use Teapot::Bot::Object::PhotoSize ();
$Teapot::Bot::Object::VideoNote::VERSION = '0.022';
$Teapot::Bot::Object::VideoNote::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -40,7 +40,7 @@ Teapot::Bot::Object::VideoNote - The base class for Telegram 'VideoNote' type ob
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'VideoNote' type object.

View File

@@ -8,7 +8,7 @@ use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::Voice::VERSION = '0.022';
$Teapot::Bot::Object::Voice::VERSION = '0.023';
has 'file_id';
has 'file_unique_id';
@@ -34,7 +34,7 @@ Teapot::Bot::Object::Voice - The base class for Telegram 'Voice' type objects
=head1 VERSION
version 0.022
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'Voice' type objects.

View File

@@ -0,0 +1,53 @@
package Teapot::Bot::Object::WebAppData;
# ABSTRACT: The base class for Telegram 'WebAppData' type objects
use strict;
use warnings;
use 5.018; ## no critic (ProhibitImplicitImport)
use utf8;
use Mojo::Base 'Teapot::Bot::Object::Base';
$Teapot::Bot::Object::WebAppData::VERSION = '0.023';
has 'data';
has 'button_text';
sub fields {
return { scalar => [qw/data button_text/] };
}
1;
__END__
=pod
=encoding utf8
=head1 NAME
Teapot::Bot::Object::WebAppData - The base class for Telegram 'WebAppData' type objects
=head1 VERSION
version 0.023
=head1 DESCRIPTION
The base class for Telegram 'WebAppData' type objects.
See L<https://core.telegram.org/bots/api#webappdata> for details of the
attributes available for C<Teapot::Bot::Object::WebAppData> objects.
=head1 AUTHOR
Sergei Fedosov <eleksir@gmail.com>
=head1 LICENSE AND COPYRIGHT
This software is copyright (c) 2022 by Sergei Fedosov <eleksir@gmail.com>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut