| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * This file is part of the TelegramBot package. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * (c) Avtandil Kikabidze aka LONGMAN <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * For the full copyright and license information, please view the LICENSE | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  * file that was distributed with this source code. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  | namespace Longman\TelegramBot\Entities\InputMedia; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | use Longman\TelegramBot\Entities\ChatLocation; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | use Longman\TelegramBot\Entities\Entity; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  * Class InputMediaAudio | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  * @link https://core.telegram.org/bots/api#inputmediaaudio | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |  * <code> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  * $data = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  *   'media'      => '123abc', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  *   'thumb'      => '456def', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  *   'caption'    => '*Audio* caption', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  *   'parse_mode' => 'markdown', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |  *   'duration'   => 42, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  *   'performer'  => 'John Doe', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  *   'title'      => 'The Song', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |  * ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |  * </code> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |  * @method string          getType()            Type of the result, must be audio | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  * @method string          getMedia()           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 "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |  * @method string          getThumb()           Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. 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 “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files » | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |  * @method string          getCaption()         Optional. Caption of the audio to be sent, 0-200 characters | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |  * @method string          getParseMode()       Optional. Mode for parsing entities in the audio caption | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  * @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |  * @method int             getDuration()        Optional. Duration of the audio in seconds | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  * @method string          getPerformer()       Optional. Performer of the audio | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |  * @method string          getTitle()           Optional. Title of the audio | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  * @method $this setMedia(string $media)                     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 "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |  * @method $this setThumb(string $thumb)                     Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. 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 “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files » | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |  * @method $this setCaption(string $caption)                 Optional. Caption of the audio to be sent, 0-200 characters | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |  * @method $this setParseMode(string $parse_mode)            Optional. Mode for parsing entities in the audio caption | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |  * @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |  * @method $this setDuration(int $duration)                  Optional. Duration of the audio in seconds | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |  * @method $this setPerformer(string $performer)             Optional. Performer of the audio | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |  * @method $this setTitle(string $title)                     Optional. Title of the audio | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 52 |  |  |  */ | 
            
                                                                        
                            
            
                                    
            
            
                | 53 |  |  | class InputMediaAudio extends Entity implements InputMedia | 
            
                                                                        
                            
            
                                    
            
            
                | 54 |  |  | { | 
            
                                                                        
                            
            
                                    
            
            
                | 55 |  |  |     /** | 
            
                                                                        
                            
            
                                    
            
            
                | 56 |  |  |      * InputMediaAudio constructor | 
            
                                                                        
                            
            
                                    
            
            
                | 57 |  |  |      * | 
            
                                                                        
                            
            
                                    
            
            
                | 58 |  |  |      * @param array $data | 
            
                                                                        
                            
            
                                    
            
            
                | 59 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |     public function __construct(array $data = []) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |         $data['type'] = 'audio'; | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 63 |  |  |         parent::__construct($data); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 65 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 66 |  |  |  |