Photo

class pyrogram.raw.types.Photo

Photo

Constructor of Photo.

Details:
  • Layer: 223

  • ID: FB197A65

Parameters:
  • id (int 64-bit) – ID

  • access_hash (int 64-bit) – Access hash

  • file_reference (bytes) – file reference

  • date (int 32-bit) – Date of upload

  • sizes (List of PhotoSize) – Available sizes for download

  • dc_id (int 32-bit) – DC ID to use for download

  • has_stickers (bool, optional) – Whether the photo has mask stickers attached to it

  • video_sizes (List of VideoSize, optional) – For animated profiles, the MPEG4 videos

TL Schema

photo#fb197a65
flags:#
has_stickers:flags.0?true
id:long
access_hash:long
file_reference:bytes
date:int
sizes:Vector<PhotoSize>
video_sizes:flags.1?Vector<VideoSize>
dc_id:int

= Photo

Parameter Tree

Photo
├── has_stickerstrue (optional)
├── idlong
├── access_hashlong
├── file_referencebytes
├── dateint
├── sizesVector < PhotoSize >
│ ├── PhotoSizeEmpty
│ │ └── typestring
│ ├── PhotoSize
│ │ ├── typestring
│ │ ├── wint
│ │ ├── hint
│ │ └── sizeint
│ ├── PhotoCachedSize
│ │ ├── typestring
│ │ ├── wint
│ │ ├── hint
│ │ └── bytesbytes
│ ├── PhotoStrippedSize
│ │ ├── typestring
│ │ └── bytesbytes
│ ├── PhotoSizeProgressive
│ │ ├── typestring
│ │ ├── wint
│ │ ├── hint
│ │ └── sizesVector < int >
│ └── PhotoPathSize
│ ├── typestring
│ └── bytesbytes
├── video_sizesVector < VideoSize > (optional)
│ ├── VideoSize
│ │ ├── typestring
│ │ ├── wint
│ │ ├── hint
│ │ ├── sizeint
│ │ └── video_start_tsdouble (optional)
│ ├── VideoSizeEmojiMarkup
│ │ ├── emoji_idlong
│ │ └── background_colorsVector < int >
│ ├── stickersetInputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ │ ├── idlong
│ │ │ └── access_hashlong
│ │ ├── InputStickerSetShortName
│ │ │ └── short_namestring
│ │ ├── InputStickerSetDice
│ │ │ └── emoticonstring
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ ├── sticker_idlong
│ └── background_colorsVector < int >
└── dc_idint

Example

Photo(
    id=0,
    access_hash=0,
    file_reference=b"data",
    date=0,
    sizes=[
            PhotoSizeEmpty(type="text")
        ],
    dc_id=0,
)