payments.GetSavedStarGifts

class pyrogram.raw.functions.payments.GetSavedStarGifts

Fetch the full list of gifts owned by a peer.

Details:
  • Layer: 227

  • 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_unsaved → true (optional)
├── exclude_saved → true (optional)
├── exclude_unlimited → true (optional)
├── exclude_unique → true (optional)
├── sort_by_value → true (optional)
├── exclude_upgradable → true (optional)
├── exclude_unupgradable → true (optional)
├── peer_color_available → true (optional)
├── exclude_hosted → true (optional)
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── collection_id → int (optional)
├── offset → string
└── limit → int

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,
    )
)