Layer 227
PaymentsUpdateStarGiftCollection
Add or remove gifts from a star gift collection, or rename the collection.
method
Users
payments.updateStarGiftCollection#4fddbee7 flags:# peer:InputPeer collection_id:int title:flags.0?string delete_stargift:flags.1?Vector<InputSavedStarGift> add_stargift:flags.2?Vector<InputSavedStarGift> order:flags.3?Vector<InputSavedStarGift> = StarGiftCollection;
Parameters
| Name | Type | Description |
|---|---|---|
| Peer | InputPeer | Peer that owns the collection. |
| CollectionId | int | Collection ID. |
| Title | flags .0? string | Title of the collection, to rename the collection. |
| DeleteStargift | flags .1? Vector < InputSavedStarGift > | Can contain a list of gifts to remove from the collection. |
| AddStargift | flags .2? Vector < InputSavedStarGift > | Can contain a list of gifts to add to the collection. |
| Order | flags .3? Vector < InputSavedStarGift > | Can contain the new gift order. |
Returns
StarGiftCollectionGogram Example
// PaymentsUpdateStarGiftCollection - using Params struct result, err := client.PaymentsUpdateStarGiftCollection(&tg.PaymentsUpdateStarGiftCollectionParams{ Peer: &tg.InputPeerUser{UserID: int64(777000)}, CollectionId: 42, Title: "Hello, World!", DeleteStargift: nil, AddStargift: nil, Order: nil, }) if err != nil { // handle error } // result is *tg.StarGiftCollection
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |