Add GetStickerSet method
This commit is contained in:
parent
ea6fe91d9d
commit
a5b472794d
2 changed files with 41 additions and 0 deletions
38
src/TgBotLib/Objects/GetStickerSet.php
Normal file
38
src/TgBotLib/Objects/GetStickerSet.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Objects;
|
||||
|
||||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Objects\Stickers\StickerSet;
|
||||
|
||||
class GetStickerSet extends Method
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): StickerSet
|
||||
{
|
||||
return StickerSet::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_STICKER_SET->value, $parameters)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return [
|
||||
'name'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue