Skip to main content

Media

Class swibots.api.common.models.Media

The Media class represents a media (file, audio, video, etc) that has been uploaded to the server.

Properties

  • id (int): The media's id.
  • caption (str): The media's caption.
  • description (str): The media's description.
  • thumbnail_url (str): The media's thumbnail url.
  • source_id (int): The media's source id.
  • media_type (int): The media's type (1 = Photo, 2 = Video, 3= Audio, 7 = Document).
  • mime_type (str): The media's mime type.
  • file_name (str): The media's file name.
  • file_size (int): The media's file size.
  • url (str): The media's url.

Methods

async def edit(self, caption: str, description: str):

  • caption (str): caption of media.
  • description (str): description of media.