Telegram/Chat.pm

filter: Statementstmt 36.3% 8 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 17.6% 3 / 17 Podpod 100% 13 / 13 totaltotal 46.1% 24 / 52 SCAR 2.3
CC
1
Cov
36%
can_set_sticker_set
2.0
description
2.0
first_name
2.0
CRAP 1.3
« Telegram/ChatMember.pm ↑ Summary Telegram/InlineQueryResultVideo.pm »
1 # -*- perl -*-
2 ##----------------------------------------------------------------------------
3 ## Net/API/Telegram/Chat.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::Chat;
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_set_sticker_set { return( shift->_set_get_scalar( 'can_set_sticker_set', @_ ) ); }
Subroutine can_set_sticker_set: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub description { return( shift->_set_get_scalar( 'description', @_ ) ); }
Subroutine description: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub first_name { return( shift->_set_get_scalar( 'first_name', @_ ) ); }
Subroutine first_name: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub id { return( shift->_set_get_number( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub invite_link { return( shift->_set_get_scalar( 'invite_link', @_ ) ); }
Subroutine invite_link: not called CC=1 SCAR=6.9
Pod documented
31  
32 0 ▶sub last_name { return( shift->_set_get_scalar( 'last_name', @_ ) ); }
Subroutine last_name: not called CC=1 SCAR=6.9
Pod documented
33  
34 0 ▶sub permissions { return( shift->_set_get_object( 'permissions', 'Net::API::Telegram::ChatPermissions', @_ ) ); }
Subroutine permissions: not called CC=1 SCAR=6.9
Pod documented
35  
36 0 ▶sub photo { return( shift->_set_get_object( 'photo', 'Net::API::Telegram::ChatPhoto', @_ ) ); }
Subroutine photo: not called CC=1 SCAR=6.9
Pod documented
37  
38 0 ▶sub pinned_message { return( shift->_set_get_object( 'pinned_message', 'Net::API::Telegram::Message', @_ ) ); }
Subroutine pinned_message: not called CC=1 SCAR=6.9
Pod documented
39  
40 0 ▶sub sticker_set_name { return( shift->_set_get_scalar( 'sticker_set_name', @_ ) ); }
Subroutine sticker_set_name: not called CC=1 SCAR=6.9
Pod documented
41  
42 0 ▶sub title { return( shift->_set_get_scalar( 'title', @_ ) ); }
Subroutine title: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub type { return( shift->_set_get_scalar( 'type', @_ ) ); }
Subroutine type: not called CC=1 SCAR=6.9
Pod documented
45  
46 0 ▶sub username { return( shift->_set_get_scalar( 'username', @_ ) ); }
Subroutine username: not called CC=1 SCAR=6.9
Pod documented
47  
48 0 ▶sub _is_boolean { return( grep( /^$_[1]$/, qw( can_set_sticker_set ) ) ); }
Subroutine _is_boolean: not called CC=1 SCAR=6.9
49  
50 1 1;
51  
52 __END__
53  
54 =encoding utf-8
55  
56 =head1 NAME
57  
58 Net::API::Telegram::Chat - A chat
59  
60 =head1 SYNOPSIS
61  
62 my $msg = Net::API::Telegram::Chat->new( %data ) ||
63 die( Net::API::Telegram::Chat->error, "\n" );
64  
65 =head1 DESCRIPTION
66  
67 L<Net::API::Telegram::Chat> is a Telegram Message Object as defined here L<https://core.telegram.org/bots/api#chat>
68  
69 This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.
70  
71 =head1 METHODS
72  
73 =over 4
74  
75 =item B<new>( {INIT HASH REF}, %PARAMETERS )
76  
77 B<new>() will create a new object for the package, pass any argument it might receive
78 to the special standard routine B<init> that I<must> exist.
79 Then it returns what returns B<init>().
80  
81 The valid parameters are as follow. Methods available here are also parameters to the B<new> method.
82  
83 =over 8
84  
85 =item * I<verbose>
86  
87 =item * I<debug>
88  
89 =back
90  
91 =item B<can_set_sticker_set>( Boolean )
92  
93 Optional. True, if the bot can change the group sticker set. Returned only in getChat.
94  
95 =item B<description>( String )
96  
97 Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
98  
99 =item B<first_name>( String )
100  
101 Optional. First name of the other party in a private chat
102  
103 =item B<id>( Integer )
104  
105 Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
106  
107 =item B<invite_link>( String )
108  
109 Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.
110  
111 =item B<last_name>( String )
112  
113 Optional. Last name of the other party in a private chat
114  
115 =item B<permissions>( L<Net::API::Telegram::ChatPermissions> )
116  
117 Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
118  
119 =item B<photo>( L<Net::API::Telegram::ChatPhoto> )
120  
121 Optional. Chat photo. Returned only in getChat.
122  
123 =item B<pinned_message>( L<Net::API::Telegram::Message> )
124  
125 Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
126  
127 =item B<sticker_set_name>( String )
128  
129 Optional. For supergroups, name of group sticker set. Returned only in getChat.
130  
131 =item B<title>( String )
132  
133 Optional. Title, for supergroups, channels and group chats
134  
135 =item B<type>( String )
136  
137 Type of chat, can be either I<private>, I<group>, I<supergroup> or I<channel>
138  
139 =item B<username>( String )
140  
141 Optional. Username, for private chats, supergroups and channels if available
142  
143 =back
144  
145 =head1 COPYRIGHT
146  
147 Copyright (c) 2000-2019 DEGUEST Pte. Ltd.
148  
149 =head1 AUTHOR
150  
151 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
152  
153 =head1 SEE ALSO
154  
155 L<Net::API::Telegram>
156  
157 =head1 COPYRIGHT & LICENSE
158  
159 Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
160  
161 You can use, copy, modify and redistribute this package and associated
162 files under the same terms as Perl itself.
163  
164 =cut
165  
« Telegram/ChatMember.pm ↑ Summary Telegram/InlineQueryResultVideo.pm »