| @@ 17-73 (lines=57) @@ | ||
| 14 | use Teebot\Api\Traits\File; |
|
| 15 | use Teebot\Api\Entity\InputFile; |
|
| 16 | ||
| 17 | class SendAudio extends AbstractMethod |
|
| 18 | { |
|
| 19 | use File; |
|
| 20 | ||
| 21 | const NAME = 'sendAudio'; |
|
| 22 | ||
| 23 | const RETURN_ENTITY = Message::class; |
|
| 24 | ||
| 25 | const FILE_SIZE_LIMIT_MB = 50; |
|
| 26 | ||
| 27 | protected $chat_id; |
|
| 28 | ||
| 29 | protected $audio; |
|
| 30 | ||
| 31 | protected $duration; |
|
| 32 | ||
| 33 | protected $performer; |
|
| 34 | ||
| 35 | protected $title; |
|
| 36 | ||
| 37 | protected $disable_notification; |
|
| 38 | ||
| 39 | protected $reply_to_message_id; |
|
| 40 | ||
| 41 | protected $reply_markup; |
|
| 42 | ||
| 43 | protected $supportedProperties = [ |
|
| 44 | 'chat_id' => true, |
|
| 45 | 'audio' => true, |
|
| 46 | 'duration' => false, |
|
| 47 | 'performer' => false, |
|
| 48 | 'title' => false, |
|
| 49 | 'disable_notification' => false, |
|
| 50 | 'reply_to_message_id' => false, |
|
| 51 | 'reply_markup' => false |
|
| 52 | ]; |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @return \CURLFile|string |
|
| 56 | */ |
|
| 57 | public function getAudio() |
|
| 58 | { |
|
| 59 | return $this->audio; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @param string $audio |
|
| 64 | * |
|
| 65 | * @return $this |
|
| 66 | */ |
|
| 67 | public function setAudio($audio) |
|
| 68 | { |
|
| 69 | $this->audio = $this->initInputFile($audio); |
|
| 70 | ||
| 71 | return $this; |
|
| 72 | } |
|
| 73 | } |
|
| 74 | ||
| @@ 17-74 (lines=58) @@ | ||
| 14 | use Teebot\Api\Entity\InputFile; |
|
| 15 | use Teebot\Api\Traits\File; |
|
| 16 | ||
| 17 | class SendVideo extends AbstractMethod |
|
| 18 | { |
|
| 19 | use File; |
|
| 20 | ||
| 21 | const NAME = 'sendVideo'; |
|
| 22 | ||
| 23 | const RETURN_ENTITY = Message::class; |
|
| 24 | ||
| 25 | protected $chat_id; |
|
| 26 | ||
| 27 | protected $video; |
|
| 28 | ||
| 29 | protected $duration; |
|
| 30 | ||
| 31 | protected $width; |
|
| 32 | ||
| 33 | protected $height; |
|
| 34 | ||
| 35 | protected $caption; |
|
| 36 | ||
| 37 | protected $disable_notification; |
|
| 38 | ||
| 39 | protected $reply_to_message_id; |
|
| 40 | ||
| 41 | protected $reply_markup; |
|
| 42 | ||
| 43 | protected $supportedProperties = [ |
|
| 44 | 'chat_id' => true, |
|
| 45 | 'video' => true, |
|
| 46 | 'duration' => false, |
|
| 47 | 'width' => false, |
|
| 48 | 'height' => false, |
|
| 49 | 'caption' => false, |
|
| 50 | 'disable_notification' => false, |
|
| 51 | 'reply_to_message_id' => false, |
|
| 52 | 'reply_markup' => false |
|
| 53 | ]; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @return \CURLFile|string |
|
| 57 | */ |
|
| 58 | public function getVideo() |
|
| 59 | { |
|
| 60 | return $this->video; |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @param string $video |
|
| 65 | * |
|
| 66 | * @return $this |
|
| 67 | */ |
|
| 68 | public function setVideo($video) |
|
| 69 | { |
|
| 70 | $this->video = $this->initInputFile($video); |
|
| 71 | ||
| 72 | return $this; |
|
| 73 | } |
|
| 74 | } |
|
| 75 | ||