Layer 220
constructor

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
RequirePremium flags.6?true This gift can only be bought by users with a Premium subscription.
ResaleTonOnly flags.7?true Whether the gift can be bought only using Toncoins.
ThemeAvailable flags.9?true A chat theme associated to this gift is available, see here for more info on how to use it.
Id long Identifier of the collectible gift.
GiftId long Unique ID of the gift.
Title string Collectible title.
Slug string 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 Unique identifier of this collectible gift among all (already upgraded) collectible gifts of the same type.
OwnerId flags.0?Peer The owner of the gift.
OwnerName flags.1?string The name of the owner if neither owner_id nor owner_address are set.
OwnerAddress flags.2?string 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 Vector<StarGiftAttribute> Collectible attributes
AvailabilityIssued int Total number of gifts of the same type that were upgraded to a collectible gift.
AvailabilityTotal int Total number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift.
GiftAddress flags.3?string 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).
ResellAmount Vector<StarsAmount> Resale price of the gift.
ReleasedBy flags.5?Peer This gift was released by the specified peer.
ValueAmount flags.8?long Price of the gift.
ValueCurrency flags.8?string Currency for the gift's price.
ThemePeer flags.10?Peer 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).

Returns

StarGift

Gogram Example

// Creating StarGiftUnique constructor
obj := &tg.StarGiftUnique{
    Id: int64(0),
    GiftId: int64(0),
    Title: "...",
    Slug: "...",
    Num: 0,
    Attributes: []tg.StarGiftAttribute{&tg.StarGiftAttribute{}},
    // ... more required fields

    // Optional fields:
    // RequirePremium: true,
    // ResaleTonOnly: true,
    // ThemeAvailable: true,
    // OwnerId: &tg.Peer{},
    // ... more optional fields
}