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
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The peer. |
Hash | int64 | yes | Hash (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
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getStarGiftCollections#981b91dd