-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update code to reflect latest changes to the API documentation
- Loading branch information
Showing
7 changed files
with
168 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* This file is auto-generated. | ||
*/ | ||
|
||
namespace Telepath\Telegram; | ||
|
||
use Telepath\Types\Type; | ||
|
||
/** | ||
* This object represents the bot's name. | ||
*/ | ||
class BotName extends Type | ||
{ | ||
/** The bot's name */ | ||
public string $name; | ||
|
||
/** | ||
* @param string $name The bot's name | ||
*/ | ||
public static function make(string $name): static | ||
{ | ||
return new static([ | ||
'name' => $name, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/** | ||
* This file is auto-generated. | ||
*/ | ||
|
||
namespace Telepath\Telegram; | ||
|
||
use Telepath\Types\Type; | ||
|
||
/** | ||
* This object represents a button to be shown above inline query results. You must use exactly one of the optional fields. | ||
*/ | ||
class InlineQueryResultsButton extends Type | ||
{ | ||
/** Label text on the button */ | ||
public string $text; | ||
|
||
/** Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method web_app_switch_inline_query inside the Web App. */ | ||
public ?WebAppInfo $web_app = null; | ||
|
||
/** Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. */ | ||
public ?string $start_parameter = null; | ||
|
||
/** | ||
* @param string $text Label text on the button | ||
* @param WebAppInfo $web_app Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method web_app_switch_inline_query inside the Web App. | ||
* @param string $start_parameter Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. | ||
*/ | ||
public static function make(string $text, ?WebAppInfo $web_app = null, ?string $start_parameter = null): static | ||
{ | ||
return new static([ | ||
'text' => $text, | ||
'web_app' => $web_app, | ||
'start_parameter' => $start_parameter, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/** | ||
* This file is auto-generated. | ||
*/ | ||
|
||
namespace Telepath\Telegram; | ||
|
||
use Telepath\Types\Type; | ||
|
||
/** | ||
* This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. | ||
*/ | ||
class SwitchInlineQueryChosenChat extends Type | ||
{ | ||
/** Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted */ | ||
public ?string $query = null; | ||
|
||
/** Optional. True, if private chats with users can be chosen */ | ||
public ?bool $allow_user_chats = null; | ||
|
||
/** Optional. True, if private chats with bots can be chosen */ | ||
public ?bool $allow_bot_chats = null; | ||
|
||
/** Optional. True, if group and supergroup chats can be chosen */ | ||
public ?bool $allow_group_chats = null; | ||
|
||
/** Optional. True, if channel chats can be chosen */ | ||
public ?bool $allow_channel_chats = null; | ||
|
||
/** | ||
* @param string $query Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted | ||
* @param bool $allow_user_chats Optional. True, if private chats with users can be chosen | ||
* @param bool $allow_bot_chats Optional. True, if private chats with bots can be chosen | ||
* @param bool $allow_group_chats Optional. True, if group and supergroup chats can be chosen | ||
* @param bool $allow_channel_chats Optional. True, if channel chats can be chosen | ||
*/ | ||
public static function make( | ||
?string $query = null, | ||
?bool $allow_user_chats = null, | ||
?bool $allow_bot_chats = null, | ||
?bool $allow_group_chats = null, | ||
?bool $allow_channel_chats = null, | ||
): static { | ||
return new static([ | ||
'query' => $query, | ||
'allow_user_chats' => $allow_user_chats, | ||
'allow_bot_chats' => $allow_bot_chats, | ||
'allow_group_chats' => $allow_group_chats, | ||
'allow_channel_chats' => $allow_channel_chats, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters