payments.GetSavedStarGifts

class pyrogram.raw.functions.payments.GetSavedStarGifts

Fetch the full list of gifts owned by a peer.

Details:
  • Layer: 223

  • ID: A319E569

Parameters:
  • peer (InputPeer) – Fetch only gifts owned by the specified peer, such as: a user, with peer=inputPeerUser; a channel, with peer=inputPeerChannel; a connected business user (when executing the method as a bot, over the business connection), with peer=inputPeerUser.

  • offset (str) – Offset for pagination.

  • limit (int 32-bit) – Maximum number of results to return, see pagination

  • exclude_unsaved (bool, optional) – Exclude gifts not pinned on the profile.

  • exclude_saved (bool, optional) – Exclude gifts pinned on the profile.

  • exclude_unlimited (bool, optional) – Exclude gifts that do not have the starGift.limited flag set.

  • exclude_unique (bool, optional) – Exclude collectible gifts ».

  • sort_by_value (bool, optional) – If set, sorts the gifts by price instead of reception date.

  • exclude_upgradable (bool, optional) – Exclude gifts that can be upgraded to collectible gifts ».

  • exclude_unupgradable (bool, optional) – Exclude gifts that cannot be upgraded to collectible gifts ».

  • peer_color_available (bool, optional)

  • exclude_hosted (bool, optional)

  • collection_id (int 32-bit, optional) – Only returns gifts within the specified collection ».

Returns:

payments.SavedStarGifts

TL Schema

payments.getSavedStarGifts#a319e569
flags:#
exclude_unsaved:flags.0?true
exclude_saved:flags.1?true
exclude_unlimited:flags.2?true
exclude_unique:flags.4?true
sort_by_value:flags.5?true
exclude_upgradable:flags.7?true
exclude_unupgradable:flags.8?true
peer_color_available:flags.9?true
exclude_hosted:flags.10?true
peer:InputPeer
collection_id:flags.6?int
offset:string
limit:int

= payments.SavedStarGifts

Parameter Tree

GetSavedStarGifts
├── exclude_unsavedtrue (optional)
├── exclude_savedtrue (optional)
├── exclude_unlimitedtrue (optional)
├── exclude_uniquetrue (optional)
├── sort_by_valuetrue (optional)
├── exclude_upgradabletrue (optional)
├── exclude_unupgradabletrue (optional)
├── peer_color_availabletrue (optional)
├── exclude_hostedtrue (optional)
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── collection_idint (optional)
├── offsetstring
└── limitint

Example

await app.invoke(
    GetSavedStarGifts(
        exclude_unsaved=None,
        exclude_saved=None,
        exclude_unlimited=None,
        exclude_unique=None,
        sort_by_value=None,
        exclude_upgradable=None,
        exclude_unupgradable=None,
        peer_color_available=None,
        exclude_hosted=None,
        peer=await app.resolve_peer(chat_id),
        collection_id=0,
        offset="text",
        limit=0,
    )
)