Skip to content

Commit 54c1cdc

Browse files
add BotApi @param CURLStringFile
1 parent 56309db commit 54c1cdc

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

src/BotApi.php

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace TelegramBot\Api;
44

55
use CURLFile;
6+
use CURLStringFile;
67
use TelegramBot\Api\Types\ArrayOfBotCommand;
78
use TelegramBot\Api\Types\ArrayOfChatMemberEntity;
89
use TelegramBot\Api\Types\ArrayOfMessageEntity;
@@ -494,7 +495,7 @@ public function getUserProfilePhotos($userId, $offset = 0, $limit = 100)
494495
* In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
495496
*
496497
* @param string $url HTTPS url to send updates to. Use an empty string to remove webhook integration.
497-
* @param CURLFile|string $certificate Upload your public key certificate so that the root certificate in use can be checked.
498+
* @param CURLFile|CURLStringFile|string $certificate Upload your public key certificate so that the root certificate in use can be checked.
498499
* @param array $allowedUpdates A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.
499500
*
500501
* @return string
@@ -725,7 +726,7 @@ public function sendVenue(
725726
* Use this method to send .webp stickers. On success, the sent Message is returned.
726727
*
727728
* @param int|string $chatId chat_id or @channel_name
728-
* @param CURLFile|string $sticker
729+
* @param CURLFile|CURLStringFile|string $sticker
729730
* @param int|null $messageThreadId
730731
* @param int|null $replyToMessageId
731732
* @param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|
@@ -776,7 +777,7 @@ public function getCustomEmojiStickers($customEmojiIds)
776777
/**
777778
* Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploadede File on success
778779
* @param integer $userId User identifier of sticker file owner
779-
* @param CURLFile $pngSticker PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height mush be exactly 512 px.
780+
* @param CURLFile|CURLStringFile $pngSticker PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height mush be exactly 512 px.
780781
*/
781782
public function uploadStickerFile($userId, $pngSticker)
782783
{
@@ -788,9 +789,9 @@ public function uploadStickerFile($userId, $pngSticker)
788789
* @param integer $userId User identifier of created sticker set owner
789790
* @param string $name Short name og sticker set
790791
* @param string $title Sticker set title, 1-64 characters
791-
* @param CURLFile|string $pngSticker PNG image with the sticker
792-
* @param CURLFile $tgsSticker TGS animation with the sticker
793-
* @param CURLFile $webmSticker WEBM video with the sticker
792+
* @param CURLFile|CURLStringFile|string $pngSticker PNG image with the sticker
793+
* @param CURLFile|CURLStringFile $tgsSticker TGS animation with the sticker
794+
* @param CURLFile|CURLStringFile $webmSticker WEBM video with the sticker
794795
* @param string $stickerType Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default a regular sticker set is created
795796
* @param string $emojis One or more emoji corresponding to the sticker
796797
* @param MaskPosition $maskPosition A JSON-Serialized object for position where the mask should be placed on faces
@@ -824,9 +825,9 @@ public function createNewStickerSet(
824825
* @param integer $userId User identifier of sticker set owner
825826
* @param string $name Sticker set name
826827
* @param string $emojis One or more emoji corresponding to the sticker
827-
* @param CURLFile|string $pngSticker PNG image with the sticker
828-
* @param CURLFile $tgsSticker TGS animation with the sticker
829-
* @param CURLFILE $webmSticker WEBM video with the sticker
828+
* @param CURLFile|CURLStringFile|string $pngSticker PNG image with the sticker
829+
* @param CURLFile|CURLStringFile $tgsSticker TGS animation with the sticker
830+
* @param CURLFILE|CURLStringFile $webmSticker WEBM video with the sticker
830831
* @param MaskPosition $maskPosition A JSON-Serialized object for position where the mask should be placed on faces
831832
*/
832833
public function addStickerToSet(
@@ -875,7 +876,7 @@ public function deleteStickerFromSet($sticker)
875876
* Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.
876877
* @param string $name Sticker set name
877878
* @param integer $userId User identifier of the sticker set owner
878-
* @param CURLFile|string $thumb A PNG image with the thumbnail or a TGS animation or a WEBM video
879+
* @param CURLFile|CURLStringFile|string $thumb A PNG image with the thumbnail or a TGS animation or a WEBM video
879880
*/
880881
public function setStickerSetThumb($name, $userId, $thumb = null)
881882
{
@@ -889,12 +890,12 @@ public function setStickerSetThumb($name, $userId, $thumb = null)
889890
* Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
890891
*
891892
* @param int|string $chatId chat_id or @channel_name
892-
* @param CURLFile|string $video Video to send
893+
* @param CURLFile|CURLStringFile|string $video Video to send
893894
* @param int|null $messageThreadId Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
894895
* @param int|null $duration Duration of sent video in seconds
895896
* @param int|null $width Video width
896897
* @param int|null $height Video height
897-
* @param CURLFile|string|null $thumb 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 “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »
898+
* @param CURLFile|CURLStringFile|string|null $thumb 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 “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »
898899
* @param string|null $caption Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
899900
* @param string|null $parseMode Mode for parsing entities in the video caption.
900901
* @param ArrayOfMessageEntity|null $captionEntities A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
@@ -956,12 +957,12 @@ public function sendVideo(
956957
* Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
957958
*
958959
* @param int|string $chatId chat_id or @channel_name
959-
* @param CURLFile|string $animation
960+
* @param CURLFile|CURLStringFile|string $animation
960961
* @param int|null $messageThreadId
961962
* @param int|null $duration
962963
* @param int|null $width Animation width
963964
* @param int|null $height Animation height
964-
* @param CURLFile|string|null $thumb TThumbnail 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 “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>»
965+
* @param CURLFile|CURLStringFile|string|null $thumb TThumbnail 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 “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>»
965966
* @param string|null $caption Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
966967
* @param string|null $parseMode Mode for parsing entities in the animation caption. See formatting options for more details.
967968
* @param ArrayOfMessageEntity|null $captionEntities A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
@@ -1023,7 +1024,7 @@ public function sendAnimation(
10231024
* Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
10241025
*
10251026
* @param int|string $chatId chat_id or @channel_name
1026-
* @param CURLFile|string $voice
1027+
* @param CURLFile|CURLStringFile|string $voice
10271028
* @param int|null $messageThreadId
10281029
* @param string $caption Voice message caption, 0-1024 characters after entities parsing
10291030
* @param int|null $duration
@@ -1102,7 +1103,7 @@ public function forwardMessage($chatId, $fromChatId, $messageId, $messageThreadI
11021103
* This behavior will be phased out in the future. For sending voice messages, use the sendVoice method instead.
11031104
*
11041105
* @param int|string $chatId chat_id or @channel_name
1105-
* @param CURLFile|string $audio
1106+
* @param CURLFile|CURLStringFile|string $audio
11061107
* @param int|null $messageThreadId
11071108
* @param int|null $duration
11081109
* @param string|null $performer
@@ -1151,7 +1152,7 @@ public function sendAudio(
11511152
* Use this method to send photos. On success, the sent Message is returned.
11521153
*
11531154
* @param int|string $chatId chat_id or @channel_name
1154-
* @param CURLFile|string $photo Photo to send.
1155+
* @param CURLFile|CURLStringFile|string $photo Photo to send.
11551156
* @param int|null $messageThreadId Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
11561157
* @param string|null $caption Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
11571158
* @param string|null $parseMode Mode for parsing entities in the photo caption.
@@ -1202,7 +1203,7 @@ public function sendPhoto(
12021203
* Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
12031204
*
12041205
* @param int|string $chatId chat_id or @channel_name
1205-
* @param CURLFile|string $document
1206+
* @param CURLFile|CURLStringFile|string $document
12061207
* @param int|null $messageThreadId
12071208
* @param string|null $caption
12081209
* @param int|null $replyToMessageId
@@ -1885,7 +1886,7 @@ public function exportChatInviteLink($chatId)
18851886
*
18861887
* @param string|int $chatId Unique identifier for the target chat or username of the target channel
18871888
* (in the format @channelusername)
1888-
* @param CURLFile|string $photo New chat photo, uploaded using multipart/form-data
1889+
* @param CURLFile|CURLStringFile|string $photo New chat photo, uploaded using multipart/form-data
18891890
*
18901891
* @return bool
18911892
*/
@@ -2280,7 +2281,7 @@ public function getChatAdministrators($chatId)
22802281
* On success, the sent Message is returned.
22812282
*
22822283
* @param int|string $chatId chat_id or @channel_name
2283-
* @param CURLFile|string $videoNote
2284+
* @param CURLFile|CURLStringFile|string $videoNote
22842285
* @param int|null $messageThreadId
22852286
* @param int|null $duration
22862287
* @param int|null $length

0 commit comments

Comments
 (0)