payments.updateStarGiftCollection
Add or remove gifts from a star gift collection », or rename the collection.
func (c *Client) PaymentsUpdateStarGiftCollection(ctx context.Context, request *PaymentsUpdateStarGiftCollectionRequest) (*StarGiftCollection, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsUpdateStarGiftCollection(ctx, &tg.PaymentsUpdateStarGiftCollectionRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StarGiftCollection
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Peer that owns the collection. |
CollectionID | int | yes | Collection ID. |
Title | string | — | Title of the collection, to rename the collection. |
DeleteStargift | []InputSavedStarGiftClass | — | Can contain a list of gifts to remove from the collection. |
AddStargift | []InputSavedStarGiftClass | — | Can contain a list of gifts to add to the collection. |
Order | []InputSavedStarGiftClass | — | Can contain the new gift order. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.updateStarGiftCollection#4fddbee7