Skip to main content

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

NameTypeRequiredDescription
GiftIDint64yesThe gift to upgrade.

Returns

*PaymentsStarGiftUpgradePreview

Possible errors

CodeTypeDescription
400STARGIFT_INVALIDThe passed gift is invalid.
400STARGIFT_UPGRADE_UNAVAILABLEA received gift can only be upgraded to a collectible gift if the messageActionStarGift/savedStarGift.can_upgrade flag is set.

References