Layer 224
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 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.

Gogram Example

// PaymentsUpdateStarGiftCollection - using Params struct
result, err := client.PaymentsUpdateStarGiftCollection(&tg.PaymentsUpdateStarGiftCollectionParams{
    Peer: &tg.InputPeerUser{UserID: int64(777000)},
    CollectionId: 42,

    // Optional fields:
    // Title: "Hello, World!",
    // DeleteStargift: []tg.InputSavedStarGift{&tg.InputSavedStarGift{}},
    // AddStargift: []tg.InputSavedStarGift{&tg.InputSavedStarGift{}},
    // Order: []tg.InputSavedStarGift{&tg.InputSavedStarGift{}},
})
if err != nil {
    // handle error
}
// result is *tg.StarGiftCollection

Possible Errors

Code Type Description
400 PEER_ID_INVALID The provided peer id is invalid.