Skip to main content

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

NameTypeRequiredDescription
PeerInputPeerClassyesPeer that owns the collection.
CollectionIDintyesCollection ID.
TitlestringTitle of the collection, to rename the collection.
DeleteStargift[]InputSavedStarGiftClassCan contain a list of gifts to remove from the collection.
AddStargift[]InputSavedStarGiftClassCan contain a list of gifts to add to the collection.
Order[]InputSavedStarGiftClassCan contain the new gift order.

Returns

*StarGiftCollection

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References