Telegram/ChatMember.pm

filter: Statementstmt 29.6% 8 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 13.6% 3 / 22 Podpod 100% 18 / 18 totaltotal 43.2% 29 / 67 SCAR 3.0
CC
1
Cov
30%
can_add_web_page_previews
2.0
can_be_edited
2.0
can_change_info
2.0
CRAP 1.3
« Telegram/Message.pm ↑ Summary Telegram/Chat.pm »
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 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶ use parent qw( Net::API::Telegram::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶ our( $VERSION ) = '0.1';
Subroutine BEGIN: called CC=1 SCAR=0.0
20 };
21  
22 0 ▶sub can_add_web_page_previews { return( shift->_set_get_scalar( 'can_add_web_page_previews', @_ ) ); }
Subroutine can_add_web_page_previews: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub can_be_edited { return( shift->_set_get_scalar( 'can_be_edited', @_ ) ); }
Subroutine can_be_edited: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub can_change_info { return( shift->_set_get_scalar( 'can_change_info', @_ ) ); }
Subroutine can_change_info: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub can_delete_messages { return( shift->_set_get_scalar( 'can_delete_messages', @_ ) ); }
Subroutine can_delete_messages: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub can_edit_messages { return( shift->_set_get_scalar( 'can_edit_messages', @_ ) ); }
Subroutine can_edit_messages: not called CC=1 SCAR=6.9
Pod documented
31  
32 0 ▶sub can_invite_users { return( shift->_set_get_scalar( 'can_invite_users', @_ ) ); }
Subroutine can_invite_users: not called CC=1 SCAR=6.9
Pod documented
33  
34 0 ▶sub can_pin_messages { return( shift->_set_get_scalar( 'can_pin_messages', @_ ) ); }
Subroutine can_pin_messages: not called CC=1 SCAR=6.9
Pod documented
35  
36 0 ▶sub can_post_messages { return( shift->_set_get_scalar( 'can_post_messages', @_ ) ); }
Subroutine can_post_messages: not called CC=1 SCAR=6.9
Pod documented
37  
38 0 ▶sub can_promote_members { return( shift->_set_get_scalar( 'can_promote_members', @_ ) ); }
Subroutine can_promote_members: not called CC=1 SCAR=6.9
Pod documented
39  
40 0 ▶sub can_restrict_members { return( shift->_set_get_scalar( 'can_restrict_members', @_ ) ); }
Subroutine can_restrict_members: not called CC=1 SCAR=6.9
Pod documented
41  
42 0 ▶sub can_send_media_messages { return( shift->_set_get_scalar( 'can_send_media_messages', @_ ) ); }
Subroutine can_send_media_messages: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub can_send_messages { return( shift->_set_get_scalar( 'can_send_messages', @_ ) ); }
Subroutine can_send_messages: not called CC=1 SCAR=6.9
Pod documented
45  
46 0 ▶sub can_send_other_messages { return( shift->_set_get_scalar( 'can_send_other_messages', @_ ) ); }
Subroutine can_send_other_messages: not called CC=1 SCAR=6.9
Pod documented
47  
48 0 ▶sub can_send_polls { return( shift->_set_get_scalar( 'can_send_polls', @_ ) ); }
Subroutine can_send_polls: not called CC=1 SCAR=6.9
Pod documented
49  
50 0 ▶sub is_member { return( shift->_set_get_scalar( 'is_member', @_ ) ); }
Subroutine is_member: not called CC=1 SCAR=6.9
Pod documented
51  
52 0 ▶sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
Subroutine status: not called CC=1 SCAR=6.9
Pod documented
53  
54 0 ▶sub until_date { return( shift->_set_get_datetime( 'until_date', @_ ) ); }sub user { return( shift->_set_get_object( 'user', 'Net::API::Telegram::User', @_ ) ); }
Subroutine until_date: not called CC=1 SCAR=6.9
Subroutine user: not called CC=1 SCAR=6.9
Pod documented
Pod documented
55  
56 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 ) ) ); }
Subroutine _is_boolean: not called CC=1 SCAR=6.9
57  
58 1 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  
« Telegram/Message.pm ↑ Summary Telegram/Chat.pm »