Telegram/ChatPermissions.pm

filter: Statementstmt 47.0% 8 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 3 / 12 Podpod 100% 8 / 8 totaltotal 51.3% 19 / 37 SCAR 1.4
CC
1
Cov
47%
can_add_web_page_previews
2.0
can_change_info
2.0
can_invite_users
2.0
CRAP 1.1
« Telegram/InlineQueryResultCachedVideo.pm ↑ Summary Telegram/InlineKeyboardButton.pm »
1 # -*- perl -*-
2 ##----------------------------------------------------------------------------
3 ## Net/API/Telegram/ChatPermissions.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::ChatPermissions;
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_change_info { return( shift->_set_get_scalar( 'can_change_info', @_ ) ); }
Subroutine can_change_info: not called CC=1 SCAR=6.9
Pod documented
25  
26 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
27  
28 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
29  
30 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
31  
32 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
33  
34 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
35  
36 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
37  
38 0 ▶sub _is_boolean { return( grep( /^$_[1]$/, qw( can_add_web_page_previews can_change_info can_invite_users can_pin_messages can_send_media_messages can_send_messages can_send_other_messages can_send_polls ) ) ); }
Subroutine _is_boolean: not called CC=1 SCAR=6.9
39  
40 1 1;
41  
42 __END__
43  
44 =encoding utf-8
45  
46 =head1 NAME
47  
48 Net::API::Telegram::ChatPermissions - Describes actions that a non-administrator user is allowed to take in a chat
49  
50 =head1 SYNOPSIS
51  
52 my $msg = Net::API::Telegram::ChatPermissions->new( %data ) ||
53 die( Net::API::Telegram::ChatPermissions->error, "\n" );
54  
55 =head1 DESCRIPTION
56  
57 L<Net::API::Telegram::ChatPermissions> is a Telegram Message Object as defined here L<https://core.telegram.org/bots/api#chatpermissions>
58  
59 This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.
60  
61 =head1 METHODS
62  
63 =over 4
64  
65 =item B<new>( {INIT HASH REF}, %PARAMETERS )
66  
67 B<new>() will create a new object for the package, pass any argument it might receive
68 to the special standard routine B<init> that I<must> exist.
69 Then it returns what returns B<init>().
70  
71 The valid parameters are as follow. Methods available here are also parameters to the B<new> method.
72  
73 =over 8
74  
75 =item * I<verbose>
76  
77 =item * I<debug>
78  
79 =back
80  
81 =item B<can_add_web_page_previews>( Boolean )
82  
83 Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
84  
85 =item B<can_change_info>( Boolean )
86  
87 Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
88  
89 =item B<can_invite_users>( Boolean )
90  
91 Optional. True, if the user is allowed to invite new users to the chat
92  
93 =item B<can_pin_messages>( Boolean )
94  
95 Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
96  
97 =item B<can_send_media_messages>( Boolean )
98  
99 Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
100  
101 =item B<can_send_messages>( Boolean )
102  
103 Optional. True, if the user is allowed to send text messages, contacts, locations and venues
104  
105 =item B<can_send_other_messages>( Boolean )
106  
107 Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
108  
109 =item B<can_send_polls>( Boolean )
110  
111 Optional. True, if the user is allowed to send polls, implies can_send_messages
112  
113 =back
114  
115 =head1 COPYRIGHT
116  
117 Copyright (c) 2000-2019 DEGUEST Pte. Ltd.
118  
119 =head1 AUTHOR
120  
121 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
122  
123 =head1 SEE ALSO
124  
125 L<Net::API::Telegram>
126  
127 =head1 COPYRIGHT & LICENSE
128  
129 Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
130  
131 You can use, copy, modify and redistribute this package and associated
132 files under the same terms as Perl itself.
133  
134 =cut
135  
« Telegram/InlineQueryResultCachedVideo.pm ↑ Summary Telegram/InlineKeyboardButton.pm »