Skip to main content

payments.getStarGiftCollections

Fetches all star gift collections » of a peer.

func (c *Client) PaymentsGetStarGiftCollections(ctx context.Context, request *PaymentsGetStarGiftCollectionsRequest) (PaymentsStarGiftCollectionsClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsGetStarGiftCollections(ctx, &tg.PaymentsGetStarGiftCollectionsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // PaymentsStarGiftCollectionsClass
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesThe peer.
Hashint64yesHash (generated as specified here ») using the starGiftCollection.hash field (not the collection_id field) of all collections returned by a previous method call, to avoid refetching the result if it hasn't changed.

Returns

PaymentsStarGiftCollectionsClass

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References