Layer 220
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 |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Peer | InputPeer | Peer that owns the collection. |
| CollectionId | int | Collection ID. |
| Title | flags.0?string | Title of the collection, to rename the collection. |
| DeleteStargift | Vector<InputSavedStarGift> | Can contain a list of gifts to remove from the collection. |
| AddStargift | Vector<InputSavedStarGift> | Can contain a list of gifts to add to the collection. |
| Order | Vector<InputSavedStarGift> | Can contain the new gift order. |
Returns
StarGiftCollectionPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Gogram Example
// PaymentsUpdateStarGiftCollection - using Params struct result, err := client.PaymentsUpdateStarGiftCollection(&tg.PaymentsUpdateStarGiftCollectionParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, CollectionId: 0, // Optional fields: // Title: "...", // DeleteStargift: []tg.InputSavedStarGift{&tg.InputSavedStarGift{}}, // AddStargift: []tg.InputSavedStarGift{&tg.InputSavedStarGift{}}, // Order: []tg.InputSavedStarGift{&tg.InputSavedStarGift{}}, }) if err != nil { // handle error } // result is *tg.StarGiftCollection