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
| Name | Type | Required | Description |
|---|---|---|---|
Stargift | []InputSavedStarGiftClass | yes | List of gifts to fetch info about. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | SAVED_ID_EMPTY | The passed inputSavedStarGiftChat.saved_id is empty. |
| 400 | STARGIFT_OWNER_INVALID | You cannot transfer or sell a gift owned by another user. |
| 400 | STARGIFT_SLUG_INVALID | The specified gift slug is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getSavedStarGift#b455a106