File Coverage

blib/lib/Net/API/Telegram/ChatMember.pm
Criterion Covered Total %
statement 7 26 26.9
branch n/a
condition n/a
subroutine 3 22 13.6
pod 18 18 100.0
total 28 66 42.4


line stmt bran cond sub pod time code
1             # -*- perl -*-
2             ##----------------------------------------------------------------------------
3             ## Net/API/Telegram/ChatMember.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::ChatMember;
15             BEGIN
16             {
17 1     1   813 use strict;
  1         3  
  1         27  
18 1     1   22 use parent qw( Net::API::Telegram::Generic );
  1         2  
  1         4  
19 1     1   384 our( $VERSION ) = '0.1';
20             };
21              
22 0     0 1   sub can_add_web_page_previews { return( shift->_set_get_scalar( 'can_add_web_page_previews', @_ ) ); }
23              
24 0     0 1   sub can_be_edited { return( shift->_set_get_scalar( 'can_be_edited', @_ ) ); }
25              
26 0     0 1   sub can_change_info { return( shift->_set_get_scalar( 'can_change_info', @_ ) ); }
27              
28 0     0 1   sub can_delete_messages { return( shift->_set_get_scalar( 'can_delete_messages', @_ ) ); }
29              
30 0     0 1   sub can_edit_messages { return( shift->_set_get_scalar( 'can_edit_messages', @_ ) ); }
31              
32 0     0 1   sub can_invite_users { return( shift->_set_get_scalar( 'can_invite_users', @_ ) ); }
33              
34 0     0 1   sub can_pin_messages { return( shift->_set_get_scalar( 'can_pin_messages', @_ ) ); }
35              
36 0     0 1   sub can_post_messages { return( shift->_set_get_scalar( 'can_post_messages', @_ ) ); }
37              
38 0     0 1   sub can_promote_members { return( shift->_set_get_scalar( 'can_promote_members', @_ ) ); }
39              
40 0     0 1   sub can_restrict_members { return( shift->_set_get_scalar( 'can_restrict_members', @_ ) ); }
41              
42 0     0 1   sub can_send_media_messages { return( shift->_set_get_scalar( 'can_send_media_messages', @_ ) ); }
43              
44 0     0 1   sub can_send_messages { return( shift->_set_get_scalar( 'can_send_messages', @_ ) ); }
45              
46 0     0 1   sub can_send_other_messages { return( shift->_set_get_scalar( 'can_send_other_messages', @_ ) ); }
47              
48 0     0 1   sub can_send_polls { return( shift->_set_get_scalar( 'can_send_polls', @_ ) ); }
49              
50 0     0 1   sub is_member { return( shift->_set_get_scalar( 'is_member', @_ ) ); }
51              
52 0     0 1   sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
53              
54 0     0 1   sub until_date { return( shift->_set_get_datetime( 'until_date', @_ ) ); }sub user { return( shift->_set_get_object( 'user', 'Net::API::Telegram::User', @_ ) ); }
  0     0 1    
55              
56 0     0     sub _is_boolean { return( grep( /^$_[1]$/, qw( can_add_web_page_previews can_be_edited can_change_info can_delete_messages can_edit_messages can_invite_users can_pin_messages can_post_messages can_promote_members can_restrict_members can_send_media_messages can_send_messages can_send_other_messages can_send_polls is_member ) ) ); }
57              
58             1;
59              
60             __END__
61              
62             =encoding utf-8
63              
64             =head1 NAME
65              
66             Net::API::Telegram::ChatMember - Information about one member of a chat
67              
68             =head1 SYNOPSIS
69              
70             my $msg = Net::API::Telegram::ChatMember->new( %data ) ||
71             die( Net::API::Telegram::ChatMember->error, "\n" );
72              
73             =head1 DESCRIPTION
74              
75             L<Net::API::Telegram::ChatMember> is a Telegram Message Object as defined here L<https://core.telegram.org/bots/api#chatmember>
76              
77             This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.
78              
79             =head1 METHODS
80              
81             =over 4
82              
83             =item B<new>( {INIT HASH REF}, %PARAMETERS )
84              
85             B<new>() will create a new object for the package, pass any argument it might receive
86             to the special standard routine B<init> that I<must> exist.
87             Then it returns what returns B<init>().
88              
89             The valid parameters are as follow. Methods available here are also parameters to the B<new> method.
90              
91             =over 8
92              
93             =item * I<verbose>
94              
95             =item * I<debug>
96              
97             =back
98              
99             =item B<can_add_web_page_previews>( Boolean )
100              
101             Optional. Restricted only. True, if the user is allowed to add web page previews to their messages
102              
103             =item B<can_be_edited>( Boolean )
104              
105             Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user
106              
107             =item B<can_change_info>( Boolean )
108              
109             Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings
110              
111             =item B<can_delete_messages>( Boolean )
112              
113             Optional. Administrators only. True, if the administrator can delete messages of other users
114              
115             =item B<can_edit_messages>( Boolean )
116              
117             Optional. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only
118              
119             =item B<can_invite_users>( Boolean )
120              
121             Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat
122              
123             =item B<can_pin_messages>( Boolean )
124              
125             Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only
126              
127             =item B<can_post_messages>( Boolean )
128              
129             Optional. Administrators only. True, if the administrator can post in the channel; channels only
130              
131             =item B<can_promote_members>( Boolean )
132              
133             Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
134              
135             =item B<can_restrict_members>( Boolean )
136              
137             Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members
138              
139             =item B<can_send_media_messages>( Boolean )
140              
141             Optional. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes
142              
143             =item B<can_send_messages>( Boolean )
144              
145             Optional. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues
146              
147             =item B<can_send_other_messages>( Boolean )
148              
149             Optional. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots
150              
151             =item B<can_send_polls>( Boolean )
152              
153             Optional. Restricted only. True, if the user is allowed to send polls
154              
155             =item B<is_member>( Boolean )
156              
157             Optional. Restricted only. True, if the user is a member of the chat at the moment of the request
158              
159             =item B<status>( String )
160              
161             The member's status in the chat. Can be I<creator>, I<administrator>, I<member>, I<restricted>, I<left> or I<kicked>
162              
163             =item B<until_date>( Date )
164              
165             Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time
166              
167             =item B<user>( L<Net::API::Telegram::User> )
168              
169             Information about the user
170              
171             =back
172              
173             =head1 COPYRIGHT
174              
175             Copyright (c) 2000-2019 DEGUEST Pte. Ltd.
176              
177             =head1 AUTHOR
178              
179             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
180              
181             =head1 SEE ALSO
182              
183             L<Net::API::Telegram>
184              
185             =head1 COPYRIGHT & LICENSE
186              
187             Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
188              
189             You can use, copy, modify and redistribute this package and associated
190             files under the same terms as Perl itself.
191              
192             =cut
193