Media

MediaFile

class qpy.MediaFile(mediadict)

Represents qpost’s MediaFile object

id: int

The unique identifier of this MediaFile

sha256: str

The sha256 hash of this MediaFile

url: str

The URL of this MediaFile

type: str

The type of this MediaFile, one of these values; IMAGE / VIDEO / LINK

time_created: str

The timestamp of when this MediaFile was created

MediaBuilder

class qpy.MediaBuilder

A utility class to help you turn image files into base64 string lists

medias: list[str]

List of medias to be sent

add(imgpath: str)

Converts an image file into base64 and appends it to a list ready to be sent

Parameters

imgpath – Path to the image file