Skip to main content

payments.getSavedStarGift

Fetch info about specific gifts owned by a peer we control. Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned to the profile).

func (c *Client) PaymentsGetSavedStarGift(ctx context.Context, stargift []InputSavedStarGiftClass) (*PaymentsSavedStarGifts, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsGetSavedStarGift(ctx, stargift)
if err != nil {
return err
}
_ = res // *PaymentsSavedStarGifts
return nil
})

Parameters

NameTypeRequiredDescription
Stargift[]InputSavedStarGiftClassyesList of gifts to fetch info about.

Returns

*PaymentsSavedStarGifts

Possible errors

CodeTypeDescription
400SAVED_ID_EMPTYThe passed inputSavedStarGiftChat.saved_id is empty.
400STARGIFT_OWNER_INVALIDYou cannot transfer or sell a gift owned by another user.
400STARGIFT_SLUG_INVALIDThe specified gift slug is invalid.

References