File Coverage

blib/lib/Net/API/Telegram/InputMediaAudio.pm
Criterion Covered Total %
statement 7 14 50.0
branch n/a
condition n/a
subroutine 3 10 30.0
pod 7 7 100.0
total 17 31 54.8


line stmt bran cond sub pod time code
1             # -*- perl -*-
2             ##----------------------------------------------------------------------------
3             ## Telegram API - ~/lib/Net/API/Telegram/InputMediaAudio.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 2019/11/01
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::InputMediaAudio;
15             BEGIN
16             {
17 1     1   1054 use strict;
  1         3  
  1         36  
18 1     1   6 use parent qw( Net::API::Telegram::Generic );
  1         2  
  1         5  
19 1     1   308 our( $VERSION ) = '0.1';
20             };
21              
22 0     0 1   sub caption { return( shift->_set_get_scalar( 'caption', @_ ) ); }
23              
24 0     0 1   sub duration { return( shift->_set_get_number( 'duration', @_ ) ); }
25              
26 0     0 1   sub media { return( shift->_set_get_scalar( 'media', @_ ) ); }
27              
28 0     0 1   sub parse_mode { return( shift->_set_get_scalar( 'parse_mode', @_ ) ); }
29              
30 0     0 1   sub performer { return( shift->_set_get_scalar( 'performer', @_ ) ); }
31              
32 0     0 1   sub title { return( shift->_set_get_scalar( 'title', @_ ) ); }
33              
34 0     0 1   sub type { return( shift->_set_get_scalar( 'type', @_ ) ); }
35              
36             1;
37              
38             __END__
39              
40             =encoding utf-8
41              
42             =head1 NAME
43              
44             Net::API::Telegram::InputMediaAudio - An audio file to be treated as music to be sent
45              
46             =head1 SYNOPSIS
47              
48             my $msg = Net::API::Telegram::InputMediaAudio->new( %data ) ||
49             die( Net::API::Telegram::InputMediaAudio->error, "\n" );
50              
51             =head1 DESCRIPTION
52              
53             L<Net::API::Telegram::InputMediaAudio> is a Telegram Message Object as defined here L<https://core.telegram.org/bots/api#inputmediaaudio>
54              
55             This module has been automatically generated from Telegram API documentation by the script scripts/telegram-doc2perl-methods.pl.
56              
57             =head1 METHODS
58              
59             =over 4
60              
61             =item B<new>( {INIT HASH REF}, %PARAMETERS )
62              
63             B<new>() will create a new object for the package, pass any argument it might receive
64             to the special standard routine B<init> that I<must> exist.
65             Then it returns what returns B<init>().
66              
67             The valid parameters are as follow. Methods available here are also parameters to the B<new> method.
68              
69             =over 8
70              
71             =item * I<verbose>
72              
73             =item * I<debug>
74              
75             =back
76              
77             =item B<caption>( String )
78              
79             Optional. Caption of the audio to be sent, 0-1024 characters
80              
81             =item B<duration>( Integer )
82              
83             Optional. Duration of the audio in seconds
84              
85             =item B<media>( String )
86              
87             File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass I<attach://<file_attach_name>> to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
88              
89             =item B<parse_mode>( String )
90              
91             Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
92              
93             =item B<performer>( String )
94              
95             Optional. Performer of the audio
96              
97             =item B<thumb>( InputFile or String )
98              
99             Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass I<attach://<file_attach_name>> if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
100              
101             =item B<title>( String )
102              
103             Optional. Title of the audio
104              
105             =item B<type>( String )
106              
107             Type of the result, must be audio
108              
109             =back
110              
111             =head1 COPYRIGHT
112              
113             Copyright (c) 2000-2019 DEGUEST Pte. Ltd.
114              
115             =head1 AUTHOR
116              
117             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
118              
119             =head1 SEE ALSO
120              
121             L<Net::API::Telegram>
122              
123             =head1 COPYRIGHT & LICENSE
124              
125             Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
126              
127             You can use, copy, modify and redistribute this package and associated
128             files under the same terms as Perl itself.
129              
130             =cut
131