Telegram/LoginUrl.pm

filter: Statementstmt 61.5% 8 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 37.5% 3 / 8 Podpod 100% 4 / 4 totaltotal 60.0% 15 / 25 SCAR 0.6
CC
1
Cov
62%
bot_username
2.0
forward_text
2.0
request_write_access
2.0
CRAP 1.1
« Telegram/VideoNote.pm ↑ Summary Telegram/Poll.pm »
1 # -*- perl -*-
2 ##----------------------------------------------------------------------------
3 ## Net/API/Telegram/LoginUrl.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::LoginUrl;
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 bot_username { return( shift->_set_get_scalar( 'bot_username', @_ ) ); }
Subroutine bot_username: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub forward_text { return( shift->_set_get_scalar( 'forward_text', @_ ) ); }
Subroutine forward_text: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub request_write_access { return( shift->_set_get_scalar( 'request_write_access', @_ ) ); }
Subroutine request_write_access: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub url { return( shift->_set_get_scalar( 'url', @_ ) ); }
Subroutine url: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub _is_boolean { return( grep( /^$_[1]$/, qw( request_write_access ) ) ); }
Subroutine _is_boolean: not called CC=1 SCAR=6.9
31  
32 1 1;
33  
34 __END__
35  
36 =encoding utf-8
37  
38 =head1 NAME
39  
40 Net::API::Telegram::LoginUrl - A parameter of the inline keyboard button used to automatically authorize a user
41  
42 =head1 SYNOPSIS
43  
44 my $msg = Net::API::Telegram::LoginUrl->new( %data ) ||
45 die( Net::API::Telegram::LoginUrl->error, "\n" );
46  
47 =head1 DESCRIPTION
48  
49 L<Net::API::Telegram::LoginUrl> is a Telegram Message Object as defined here L<https://core.telegram.org/bots/api#loginurl>
50  
51 This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.
52  
53 =head1 METHODS
54  
55 =over 4
56  
57 =item B<new>( {INIT HASH REF}, %PARAMETERS )
58  
59 B<new>() will create a new object for the package, pass any argument it might receive
60 to the special standard routine B<init> that I<must> exist.
61 Then it returns what returns B<init>().
62  
63 The valid parameters are as follow. Methods available here are also parameters to the B<new> method.
64  
65 =over 8
66  
67 =item * I<verbose>
68  
69 =item * I<debug>
70  
71 =back
72  
73 =item B<bot_username>( String )
74  
75 Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
76  
77 =item B<forward_text>( String )
78  
79 Optional. New text of the button in forwarded messages.
80  
81 =item B<request_write_access>( Boolean )
82  
83 Optional. Pass True to request the permission for your bot to send messages to the user.
84  
85 =item B<url>( String )
86  
87 An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
88  
89 =back
90  
91 =head1 COPYRIGHT
92  
93 Copyright (c) 2000-2019 DEGUEST Pte. Ltd.
94  
95 =head1 AUTHOR
96  
97 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
98  
99 =head1 SEE ALSO
100  
101 L<Net::API::Telegram>
102  
103 =head1 COPYRIGHT & LICENSE
104  
105 Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
106  
107 You can use, copy, modify and redistribute this package and associated
108 files under the same terms as Perl itself.
109  
110 =cut
111  
« Telegram/VideoNote.pm ↑ Summary Telegram/Poll.pm »