Link Search Menu Expand Document

Constructor: starGiftUnique

Back to constructors index

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:

NameTypeRequiredDescription
require_premiumBoolOptionalThis gift can only be bought by users with a Premium subscription.
resale_ton_onlyBoolOptionalWhether the gift can be bought only using Toncoins.
theme_availableBoolOptionalA chat theme associated to this gift is available, see here » for more info on how to use it.
idlongYesIdentifier of the collectible gift.
gift_idlongYesUnique ID of the gift.
titlestringYesCollectible title.
slugstringYesSlug that can be used to create a collectible gift deep link », or elsewhere in the API where a collectible slug is accepted.
numintYesUnique identifier of this collectible gift among all (already upgraded) collectible gifts of the same type.
owner_idPeerOptionalThe owner of the gift.
owner_namestringOptionalThe name of the owner if neither owner_id nor owner_address are set.
owner_addressstringOptionalFor 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).
attributesArray of StarGiftAttributeYesCollectible attributes
availability_issuedintYesTotal number of gifts of the same type that were upgraded to a collectible gift.
availability_totalintYesTotal number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift.
gift_addressstringOptionalFor 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_amountArray of StarsAmountOptionalResale price of the gift.
released_byPeerOptionalThis gift was released by the specified peer.
value_amountlongOptionalPrice of the gift.
value_currencystringOptionalCurrency for the gift’s price.
theme_peerPeerOptionalThe 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_colorPeerColorOptional
host_idPeerOptional

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];