Add parameter retrieval methods to bot library
This commit is contained in:
parent
e4ff11c005
commit
96797a17bc
5 changed files with 78 additions and 0 deletions
|
@ -15,4 +15,20 @@
|
|||
{
|
||||
return (bool) self::executeCurl(self::buildPost($bot, Methods::CLOSE->value));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -16,4 +16,20 @@
|
|||
{
|
||||
return User::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_ME->value)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -15,4 +15,20 @@
|
|||
{
|
||||
return (bool) self::executeCurl(self::buildPost($bot, Methods::LOGOUT->value));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -27,4 +27,20 @@
|
|||
|
||||
return Message::fromArray(self::executeCurl(self::buildPost($bot, Methods::SEND_MESSAGE->value, $parameters)));
|
||||
}
|
||||
|
||||
public static function getRequiredParameters(): ?array
|
||||
{
|
||||
return [
|
||||
'chat_id',
|
||||
'text'
|
||||
];
|
||||
}
|
||||
|
||||
public static function getOptionalParameters(): ?array
|
||||
{
|
||||
return [
|
||||
'business_connection_id',
|
||||
'parse_mode',
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue