Constructor: starGiftUnique
Represents a collectible star gift, see here » for more info.
The sticker that represents the gift is contained in a starGiftAttributeModel object in attributes.
Attributes:
| Name | Type | Required | Description |
|---|---|---|---|
| require_premium | Bool | Optional | This gift can only be bought by users with a Premium subscription. |
| resale_ton_only | Bool | Optional | Whether the gift can be bought only using Toncoins. |
| theme_available | Bool | Optional | A chat theme associated to this gift is available, see here » for more info on how to use it. |
| id | long | Yes | Identifier of the collectible gift. |
| gift_id | long | Yes | Unique ID of the gift. |
| title | string | Yes | Collectible title. |
| slug | string | Yes | Slug that can be used to create a collectible gift deep link », or elsewhere in the API where a collectible slug is accepted. |
| num | int | Yes | Unique identifier of this collectible gift among all (already upgraded) collectible gifts of the same type. |
| owner_id | Peer | Optional | The owner of the gift. |
| owner_name | string | Optional | The name of the owner if neither owner_id nor owner_address are set. |
| owner_address | string | Optional | For NFTs on the TON blockchain, contains the address of the owner (append it to the ton_blockchain_explorer_url client configuration value » to obtain a link with information about the address). |
| attributes | Array of StarGiftAttribute | Yes | Collectible attributes |
| availability_issued | int | Yes | Total number of gifts of the same type that were upgraded to a collectible gift. |
| availability_total | int | Yes | Total number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift. |
| gift_address | string | Optional | For NFTs on the TON blockchain, contains the address of the NFT (append it to the ton_blockchain_explorer_url client configuration value » to obtain a link with information about the address). |
| resell_amount | Array of StarsAmount | Optional | Resale price of the gift. |
| released_by | Peer | Optional | This gift was released by the specified peer. |
| value_amount | long | Optional | Price of the gift. |
| value_currency | string | Optional | Currency for the gift’s price. |
| theme_peer | Peer | Optional | The current chat where the associated chat theme is installed, if any (gift-based themes can only be installed in one chat at a time). |
| peer_color | PeerColor | Optional | |
| host_id | Peer | Optional |
Type: StarGift
Example:
$starGiftUnique = ['_' => 'starGiftUnique', 'require_premium' => Bool, 'resale_ton_only' => Bool, 'theme_available' => Bool, 'id' => long, 'gift_id' => long, 'title' => 'string', 'slug' => 'string', 'num' => int, 'owner_id' => Peer, 'owner_name' => 'string', 'owner_address' => 'string', 'attributes' => [StarGiftAttribute, StarGiftAttribute], 'availability_issued' => int, 'availability_total' => int, 'gift_address' => 'string', 'resell_amount' => [StarsAmount, StarsAmount], 'released_by' => Peer, 'value_amount' => long, 'value_currency' => 'string', 'theme_peer' => Peer, 'peer_color' => PeerColor, 'host_id' => Peer];