File Coverage

blib/lib/Net/API/Telegram/Game.pm
Criterion Covered Total %
statement 7 13 53.8
branch n/a
condition n/a
subroutine 3 9 33.3
pod 6 6 100.0
total 16 28 57.1


line stmt bran cond sub pod time code
1             # -*- perl -*-
2             ##----------------------------------------------------------------------------
3             ## Net/API/Telegram/Game.pm
4             ## Version 0.1
5             ## Copyright(c) 2019 Jacques Deguest
6             ## Author: Jacques Deguest <jack@deguest.jp>
7             ## Created 2019/05/29
8             ## Modified 2020/05/20
9             ## All rights reserved.
10             ##
11             ## This program is free software; you can redistribute it and/or modify it
12             ## under the same terms as Perl itself.
13             ##----------------------------------------------------------------------------
14             package Net::API::Telegram::Game;
15             BEGIN
16             {
17 1     1   885 use strict;
  1         2  
  1         30  
18 1     1   4 use parent qw( Net::API::Telegram::Generic );
  1         3  
  1         4  
19 1     1   184 our( $VERSION ) = '0.1';
20             };
21              
22 0     0 1   sub animation { return( shift->_set_get_object( 'animation', 'Net::API::Telegram::Animation', @_ ) ); }
23              
24 0     0 1   sub description { return( shift->_set_get_scalar( 'description', @_ ) ); }
25              
26 0     0 1   sub photo { return( shift->_set_get_object_array( 'photo', 'Net::API::Telegram::PhotoSize', @_ ) ); }
27              
28 0     0 1   sub text { return( shift->_set_get_scalar( 'text', @_ ) ); }
29              
30 0     0 1   sub text_entities { return( shift->_set_get_object_array( 'text_entities', 'Net::API::Telegram::MessageEntity', @_ ) ); }
31              
32 0     0 1   sub title { return( shift->_set_get_scalar( 'title', @_ ) ); }
33              
34             1;
35              
36             __END__
37              
38             =encoding utf-8
39              
40             =head1 NAME
41              
42             Net::API::Telegram::Game - A game
43              
44             =head1 SYNOPSIS
45              
46             my $msg = Net::API::Telegram::Game->new( %data ) ||
47             die( Net::API::Telegram::Game->error, "\n" );
48              
49             =head1 DESCRIPTION
50              
51             L<Net::API::Telegram::Game> is a Telegram Message Object as defined here L<https://core.telegram.org/bots/api#game>
52              
53             This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.
54              
55             =head1 METHODS
56              
57             =over 4
58              
59             =item B<new>( {INIT HASH REF}, %PARAMETERS )
60              
61             B<new>() will create a new object for the package, pass any argument it might receive
62             to the special standard routine B<init> that I<must> exist.
63             Then it returns what returns B<init>().
64              
65             The valid parameters are as follow. Methods available here are also parameters to the B<new> method.
66              
67             =over 8
68              
69             =item * I<verbose>
70              
71             =item * I<debug>
72              
73             =back
74              
75             =item B<animation>( L<Net::API::Telegram::Animation> )
76              
77             Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
78              
79             =item B<description>( String )
80              
81             Description of the game
82              
83             =item B<photo>( Array of PhotoSize )
84              
85             Photo that will be displayed in the game message in chats.
86              
87             =item B<text>( String )
88              
89             Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
90              
91             =item B<text_entities>( Array of MessageEntity )
92              
93             Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
94              
95             =item B<title>( String )
96              
97             Title of the game
98              
99             =back
100              
101             =head1 COPYRIGHT
102              
103             Copyright (c) 2000-2019 DEGUEST Pte. Ltd.
104              
105             =head1 AUTHOR
106              
107             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
108              
109             =head1 SEE ALSO
110              
111             L<Net::API::Telegram>
112              
113             =head1 COPYRIGHT & LICENSE
114              
115             Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
116              
117             You can use, copy, modify and redistribute this package and associated
118             files under the same terms as Perl itself.
119              
120             =cut
121