kutana.update module

class kutana.update.Attachment

Bases: kutana.update.AttachmentData

classmethod existing(id, type)

Create an attachment that was already uploaded and you have it’s ID and type.

Return type:kutana.update.Attachment
get_file()

Download file stored in attachments if available. Raises ValueError if contents can’t be downloaded.

Return type:kutana.update.Attachment
classmethod new(file, file_name='image.png', type='image', title='')

Create a new attachment with provided type, file (contents) and file_name. Also accepts title.

Return type:kutana.update.Attachment
uploaded
class kutana.update.AttachmentData(id, type, title, file, file_name, file_getter, raw)

Bases: tuple

file

Alias for field number 3

file_getter

Alias for field number 5

file_name

Alias for field number 4

id

Alias for field number 0

raw

Alias for field number 6

title

Alias for field number 2

type

Alias for field number 1

class kutana.update.Message(raw, type, text, attachments, sender_id, receiver_id, receiver_type, date)

Bases: tuple

attachments

Alias for field number 3

date

Alias for field number 7

raw

Alias for field number 0

receiver_id

Alias for field number 5

receiver_type

Alias for field number 6

sender_id

Alias for field number 4

text

Alias for field number 2

type

Alias for field number 1

class kutana.update.ReceiverType

Bases: enum.Enum

An enumeration.

MULTI = 2
SOLO = 1
UNKNOWN = 3
class kutana.update.Update(raw, type)

Bases: tuple

raw

Alias for field number 0

type

Alias for field number 1

class kutana.update.UpdateType

Bases: enum.Enum

An enumeration.

MSG = 1
UPD = 2