-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new objects / methods of API v8
- Loading branch information
Mirmukhsin Khamroev
committed
Jan 15, 2025
1 parent
e7713e4
commit 071a561
Showing
226 changed files
with
2,276 additions
and
474 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,64 @@ | ||
<?php | ||
|
||
namespace Milly\Laragram\Types; | ||
|
||
/** | ||
* AffiliateInfo | ||
* | ||
*<p>*Optional*. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds</p> | ||
* | ||
* @author Mirmuxsin Khamroev (https://github.com/Mirmuxsin) | ||
* @url https://core.telegram.org/bots/api/#affiliateinfo | ||
*/ | ||
class AffiliateInfo | ||
{ | ||
/** | ||
* <p>*Optional*. The bot or the user that received an affiliate commission if it was received by a bot or a user</p> | ||
* @var User|null | ||
*/ | ||
public ?User $affiliate_user = null; | ||
|
||
/** | ||
* <p>*Optional*. The chat that received an affiliate commission if it was received by a chat</p> | ||
* @var Chat|null | ||
*/ | ||
public ?Chat $affiliate_chat = null; | ||
|
||
/** | ||
* <p>The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users</p> | ||
* @var int | ||
*/ | ||
public int $commission_per_mille; | ||
|
||
/** | ||
* <p>Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds</p> | ||
* @var int | ||
*/ | ||
public int $amount; | ||
|
||
/** | ||
* <p>*Optional*. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds</p> | ||
* @var int|null | ||
*/ | ||
public ?int $nanostar_amount = null; | ||
|
||
|
||
|
||
public function __construct($data) | ||
{ | ||
if (isset($data['affiliate_user'])){ | ||
$this->affiliate_user = new User($data['affiliate_user']); | ||
} | ||
|
||
if (isset($data['affiliate_chat'])){ | ||
$this->affiliate_chat = new Chat($data['affiliate_chat']); | ||
} | ||
|
||
$this->commission_per_mille = $data['commission_per_mille']; | ||
$this->amount = $data['amount']; | ||
if (isset($data['nanostar_amount'])){ | ||
$this->nanostar_amount = $data['nanostar_amount']; | ||
} | ||
|
||
} | ||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace Milly\Laragram\Types; | ||
|
||
/** | ||
* BackgroundFill | ||
* | ||
* | ||
* @author Mirmuxsin Khamroev (https://github.com/Mirmuxsin) | ||
* @url https://core.telegram.org/bots/api/#backgroundfill | ||
*/ | ||
class BackgroundFill | ||
{ | ||
|
||
|
||
public BackgroundFillSolid $backgroundFillSolid; | ||
|
||
public BackgroundFillGradient $backgroundFillGradient; | ||
|
||
public BackgroundFillFreeformGradient $backgroundFillFreeformGradient; | ||
|
||
|
||
|
||
public function __construct($data) | ||
{ | ||
$this->backgroundFillSolid = new BackgroundFillSolid($data); | ||
$this->backgroundFillGradient = new BackgroundFillGradient($data); | ||
$this->backgroundFillFreeformGradient = new BackgroundFillFreeformGradient($data); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundFillFreeformGradient | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundFillGradient | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundFillSolid | ||
* | ||
|
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,33 @@ | ||
<?php | ||
|
||
namespace Milly\Laragram\Types; | ||
|
||
/** | ||
* BackgroundType | ||
* | ||
* | ||
* @author Mirmuxsin Khamroev (https://github.com/Mirmuxsin) | ||
* @url https://core.telegram.org/bots/api/#backgroundtype | ||
*/ | ||
class BackgroundType | ||
{ | ||
|
||
|
||
public BackgroundTypeFill $backgroundTypeFill; | ||
|
||
public BackgroundTypeWallpaper $backgroundTypeWallpaper; | ||
|
||
public BackgroundTypePattern $backgroundTypePattern; | ||
|
||
public BackgroundTypeChatTheme $backgroundTypeChatTheme; | ||
|
||
|
||
|
||
public function __construct($data) | ||
{ | ||
$this->backgroundTypeFill = new BackgroundTypeFill($data); | ||
$this->backgroundTypeWallpaper = new BackgroundTypeWallpaper($data); | ||
$this->backgroundTypePattern = new BackgroundTypePattern($data); | ||
$this->backgroundTypeChatTheme = new BackgroundTypeChatTheme($data); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundTypeChatTheme | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundTypeFill | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundTypePattern | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BackgroundTypeWallpaper | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* Birthdate | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommand | ||
* | ||
|
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,42 @@ | ||
<?php | ||
|
||
namespace Milly\Laragram\Types; | ||
|
||
/** | ||
* BotCommandScope | ||
* | ||
* | ||
* @author Mirmuxsin Khamroev (https://github.com/Mirmuxsin) | ||
* @url https://core.telegram.org/bots/api/#botcommandscope | ||
*/ | ||
class BotCommandScope | ||
{ | ||
|
||
|
||
public BotCommandScopeDefault $botCommandScopeDefault; | ||
|
||
public BotCommandScopeAllPrivateChats $botCommandScopeAllPrivateChats; | ||
|
||
public BotCommandScopeAllGroupChats $botCommandScopeAllGroupChats; | ||
|
||
public BotCommandScopeAllChatAdministrators $botCommandScopeAllChatAdministrators; | ||
|
||
public BotCommandScopeChat $botCommandScopeChat; | ||
|
||
public BotCommandScopeChatAdministrators $botCommandScopeChatAdministrators; | ||
|
||
public BotCommandScopeChatMember $botCommandScopeChatMember; | ||
|
||
|
||
|
||
public function __construct($data) | ||
{ | ||
$this->botCommandScopeDefault = new BotCommandScopeDefault($data); | ||
$this->botCommandScopeAllPrivateChats = new BotCommandScopeAllPrivateChats($data); | ||
$this->botCommandScopeAllGroupChats = new BotCommandScopeAllGroupChats($data); | ||
$this->botCommandScopeAllChatAdministrators = new BotCommandScopeAllChatAdministrators($data); | ||
$this->botCommandScopeChat = new BotCommandScopeChat($data); | ||
$this->botCommandScopeChatAdministrators = new BotCommandScopeChatAdministrators($data); | ||
$this->botCommandScopeChatMember = new BotCommandScopeChatMember($data); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommandScopeAllChatAdministrators | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommandScopeAllGroupChats | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommandScopeAllPrivateChats | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommandScopeChat | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommandScopeChatAdministrators | ||
* | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
namespace Milly\Laragram\Types; | ||
|
||
|
||
/** | ||
* BotCommandScopeChatMember | ||
* | ||
|
Oops, something went wrong.