payments.getStarGiftUpgradePreview
Obtain a preview of the possible attributes (chosen randomly) a gift » can receive after upgrading it to a collectible gift », see here » for more info.
func (c *Client) PaymentsGetStarGiftUpgradePreview(ctx context.Context, giftid int64) (*PaymentsStarGiftUpgradePreview, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsGetStarGiftUpgradePreview(ctx, giftid)
if err != nil {
return err
}
_ = res // *PaymentsStarGiftUpgradePreview
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
GiftID | int64 | yes | The gift to upgrade. |
Returns
*PaymentsStarGiftUpgradePreview
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | STARGIFT_INVALID | The passed gift is invalid. |
| 400 | STARGIFT_UPGRADE_UNAVAILABLE | A received gift can only be upgraded to a collectible gift if the messageActionStarGift/savedStarGift.can_upgrade flag is set. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getStarGiftUpgradePreview#9c9abcb1