Add 'GetUserProfilePhotos' method support
This commit is contained in:
parent
ee2dff1e31
commit
44260ccaee
2 changed files with 43 additions and 0 deletions
40
src/TgBotLib/Methods/GetUserProfilePhotos.php
Normal file
40
src/TgBotLib/Methods/GetUserProfilePhotos.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Methods;
|
||||
|
||||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Objects\UserProfilePhotos;
|
||||
|
||||
class GetUserProfilePhotos extends Method
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): UserProfilePhotos
|
||||
{
|
||||
return $bot->sendRequest(Methods::GET_USER_PROFILE_PHOTOS->value, $parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return [
|
||||
'user_id'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return [
|
||||
'offset',
|
||||
'limit'
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue