peyk.platforms.rubika.types.button

Classes

Button([id, type, button_text, ...])

A single button.

class peyk.platforms.rubika.types.button.Button(id: str = '', type: str = 'Simple', button_text: str = '', button_selection: ButtonSelection | None = None, button_calendar: ButtonCalendar | None = None, button_number_picker: ButtonNumberPicker | None = None, button_string_picker: ButtonStringPicker | None = None, button_location: ButtonLocation | None = None, button_textbox: ButtonTextbox | None = None)[source]

Bases: object

A single button.

Structure per the official docs: base fields (id, type, button_text) plus exactly one nested button_* object whose name depends on the type.

id: str = ''
type: str = 'Simple'
button_text: str = ''
button_selection: ButtonSelection | None = None
button_calendar: ButtonCalendar | None = None
button_number_picker: ButtonNumberPicker | None = None
button_string_picker: ButtonStringPicker | None = None
button_location: ButtonLocation | None = None
button_textbox: ButtonTextbox | None = None
classmethod from_dict(data: dict | None) Button | None[source]

Performs the from dict operation for the Rubika client.

Parameters:

data – Value used by this operation.

Returns:

Result produced by the Rubika operation.

to_dict() Dict[str, object][source]

Performs the to dict operation for the Rubika client.

Returns:

Result produced by the Rubika operation.