peyk.platforms.rubika.types¶
Rubika API types, one public type per module.
- class peyk.platforms.rubika.types.File(file_id: str = '', file_name: str | None = None, size: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Filetype.The class preserves the existing public fields and wire-format behavior.
- file_id: str = ''¶
- file_name: str | None = None¶
- classmethod from_dict(data: dict | None) File | 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.
- size: str | None = None¶
- class peyk.platforms.rubika.types.Location(latitude: str | None = None, longitude: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Locationtype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) Location | 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.
- latitude: str | None = None¶
- longitude: str | None = None¶
- class peyk.platforms.rubika.types.Chat(chat_id: str = '', chat_type: str = '', user_id: str | None = None, first_name: str | None = None, last_name: str | None = None, title: str | None = None, username: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Chattype.The class preserves the existing public fields and wire-format behavior.
- chat_id: str = ''¶
- chat_type: str = ''¶
- first_name: str | None = None¶
- classmethod from_dict(data: dict | None) Chat | 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.
- last_name: str | None = None¶
- title: str | None = None¶
- user_id: str | None = None¶
- username: str | None = None¶
- class peyk.platforms.rubika.types.Bot(bot_id: str = '', bot_title: str = '', avatar: File | None = None, description: str | None = None, username: str | None = None, start_message: str | None = None, share_url: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Bottype.The class preserves the existing public fields and wire-format behavior.
- bot_id: str = ''¶
- bot_title: str = ''¶
- description: str | None = None¶
- classmethod from_dict(data: dict | None) Bot | 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.
- start_message: str | None = None¶
- username: str | None = None¶
- class peyk.platforms.rubika.types.BotCommand(command: str = '', description: str = '')[source]¶
Bases:
objectRepresent the Rubika Bot API
BotCommandtype.The class preserves the existing public fields and wire-format behavior.
- command: str = ''¶
- description: str = ''¶
- classmethod from_dict(data: dict | None) BotCommand | 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.
- class peyk.platforms.rubika.types.Sticker(sticker_id: str = '', file: File | None = None, emoji_character: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Stickertype.The class preserves the existing public fields and wire-format behavior.
- emoji_character: str | None = None¶
- classmethod from_dict(data: dict | None) Sticker | 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.
- sticker_id: str = ''¶
- class peyk.platforms.rubika.types.ContactMessage(phone_number: str | None = None, first_name: str | None = None, last_name: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ContactMessagetype.The class preserves the existing public fields and wire-format behavior.
- first_name: str | None = None¶
- classmethod from_dict(data: dict | None) ContactMessage | 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.
- last_name: str | None = None¶
- phone_number: str | None = None¶
- class peyk.platforms.rubika.types.PollStatus(state: str = 'Open', selection_index: int = -1, percent_vote_options: List[int] | None = None, total_vote: int = 0, show_total_votes: bool = False)[source]¶
Bases:
objectRepresent the Rubika Bot API
PollStatustype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) PollStatus | 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.
- percent_vote_options: List[int] | None = None¶
- selection_index: int = -1¶
- show_total_votes: bool = False¶
- state: str = 'Open'¶
- total_vote: int = 0¶
- class peyk.platforms.rubika.types.Poll(question: str = '', options: List[str] | None = None, poll_status: PollStatus | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Polltype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) Poll | 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.
- options: List[str] | None = None¶
- poll_status: PollStatus | None = None¶
- question: str = ''¶
- class peyk.platforms.rubika.types.ForwardedFrom(type_from: str | None = None, message_id: str | None = None, from_chat_id: str | None = None, from_sender_id: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ForwardedFromtype.The class preserves the existing public fields and wire-format behavior.
- from_chat_id: str | None = None¶
- classmethod from_dict(data: dict | None) ForwardedFrom | 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.
- from_sender_id: str | None = None¶
- message_id: str | None = None¶
- type_from: str | None = None¶
- class peyk.platforms.rubika.types.AuxData(start_id: str | None = None, button_id: str | None = None)[source]¶
Bases:
objectCallback data – carries the button that was pressed.
Confirmed from the docs’
receiveUpdate/receiveInlineMessageexample bodies.- button_id: str | None = None¶
- classmethod from_dict(data: dict | None) AuxData | 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.
- start_id: str | None = None¶
- class peyk.platforms.rubika.types.MetadataPart(type: str = '', from_index: int = 0, length: int = 0, link_url: str | None = None, mention_text_user_id: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
MetadataParttype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) MetadataPart | 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.
- from_index: int = 0¶
- length: int = 0¶
- link_url: str | None = None¶
- mention_text_user_id: str | None = None¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- type: str = ''¶
- class peyk.platforms.rubika.types.Metadata(meta_data_parts: List[MetadataPart] = <factory>)[source]¶
Bases:
objectRepresent the Rubika Bot API
Metadatatype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) Metadata | 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.
- meta_data_parts: List[MetadataPart]¶
- class peyk.platforms.rubika.types.ButtonSelectionItem(text: str = '', image_url: str | None = None, type: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonSelectionItemtype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) ButtonSelectionItem | 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.
- image_url: str | None = None¶
- text: str = ''¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- type: str | None = None¶
- class peyk.platforms.rubika.types.ButtonSelection(selection_id: str = '', search_type: str = 'None', get_type: str = 'Local', items: List[ButtonSelectionItem] = <factory>, is_multi_selection: bool = False, columns_count: str = '1', title: Optional[str] = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonSelectiontype.The class preserves the existing public fields and wire-format behavior.
- columns_count: str = '1'¶
- classmethod from_dict(data: dict | None) ButtonSelection | 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.
- get_type: str = 'Local'¶
- is_multi_selection: bool = False¶
- search_type: str = 'None'¶
- selection_id: str = ''¶
- title: str | None = None¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- items: List[ButtonSelectionItem]¶
- class peyk.platforms.rubika.types.ButtonCalendar(default_value: str | None = None, type: str = 'DatePersian', min_year: str = '1300', max_year: str = '1450', title: str = '')[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonCalendartype.The class preserves the existing public fields and wire-format behavior.
- default_value: str | None = None¶
- classmethod from_dict(data: dict | None) ButtonCalendar | 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.
- max_year: str = '1450'¶
- min_year: str = '1300'¶
- title: str = ''¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- type: str = 'DatePersian'¶
- class peyk.platforms.rubika.types.ButtonNumberPicker(min_value: str = '0', max_value: str = '100', default_value: str | None = None, title: str = '')[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonNumberPickertype.The class preserves the existing public fields and wire-format behavior.
- default_value: str | None = None¶
- classmethod from_dict(data: dict | None) ButtonNumberPicker | 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.
- max_value: str = '100'¶
- min_value: str = '0'¶
- title: str = ''¶
- class peyk.platforms.rubika.types.ButtonStringPicker(items: ~typing.List[str] = <factory>, default_value: str | None = None, title: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonStringPickertype.The class preserves the existing public fields and wire-format behavior.
- default_value: str | None = None¶
- classmethod from_dict(data: dict | None) ButtonStringPicker | 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.
- title: str | None = None¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- items: List[str]¶
- class peyk.platforms.rubika.types.ButtonTextbox(type_line: str = 'SingleLine', type_keypad: str = 'String', place_holder: str | None = None, title: str | None = None, default_value: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonTextboxtype.The class preserves the existing public fields and wire-format behavior.
- default_value: str | None = None¶
- classmethod from_dict(data: dict | None) ButtonTextbox | 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.
- place_holder: str | None = None¶
- title: str | None = None¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- type_keypad: str = 'String'¶
- type_line: str = 'SingleLine'¶
- class peyk.platforms.rubika.types.ButtonLocation(default_pointer_location: Location | None = None, default_map_location: Location | None = None, type: str = 'Picker', title: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
ButtonLocationtype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) ButtonLocation | 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.
- title: str | None = None¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- type: str = 'Picker'¶
- class peyk.platforms.rubika.types.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:
objectA single button.
Structure per the official docs: base fields (id, type, button_text) plus exactly one nested
button_*object whose name depends on thetype.- button_calendar: ButtonCalendar | None = None¶
- button_location: ButtonLocation | None = None¶
- button_number_picker: ButtonNumberPicker | None = None¶
- button_selection: ButtonSelection | None = None¶
- button_string_picker: ButtonStringPicker | None = None¶
- button_text: str = ''¶
- 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.
- id: str = ''¶
- to_dict() Dict[str, object][source]¶
Performs the to dict operation for the Rubika client.
- Returns:
Result produced by the Rubika operation.
- type: str = 'Simple'¶
- class peyk.platforms.rubika.types.KeypadRow(buttons: List[Button] = <factory>)[source]¶
Bases:
objectRepresent the Rubika Bot API
KeypadRowtype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) KeypadRow | 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.
- class peyk.platforms.rubika.types.Keypad(rows: List[KeypadRow] = <factory>, resize_keyboard: Optional[bool] = None, one_time_keyboard: Optional[bool] = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Keypadtype.The class preserves the existing public fields and wire-format behavior.
- classmethod from_dict(data: dict | None) Keypad | 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.
- one_time_keyboard: bool | None = None¶
- resize_keyboard: bool | None = None¶
- class peyk.platforms.rubika.types.Message(message_id: str = '', text: str | None = None, time: int | None = None, is_edited: bool = False, sender_type: str | None = None, sender_id: str | None = None, aux_data: AuxData | None = None, file: File | None = None, reply_to_message_id: str | None = None, forwarded_from: ForwardedFrom | None = None, forwarded_no_link: str | None = None, location: Location | None = None, sticker: Sticker | None = None, contact_message: ContactMessage | None = None, poll: Poll | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Messagetype.The class preserves the existing public fields and wire-format behavior.
- contact_message: ContactMessage | None = None¶
- forwarded_from: ForwardedFrom | None = None¶
- forwarded_no_link: str | None = None¶
- classmethod from_dict(data: dict | None) Message | 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.
- is_edited: bool = False¶
- message_id: str = ''¶
- reply_to_message_id: str | None = None¶
- sender_id: str | None = None¶
- sender_type: str | None = None¶
- text: str | None = None¶
- time: int | None = None¶
- class peyk.platforms.rubika.types.Event(type: str | None = None, access_list: List[str] | None = None, join_type: str | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Eventtype.The class preserves the existing public fields and wire-format behavior.
- access_list: List[str] | None = None¶
- classmethod from_dict(data: dict | None) Event | 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.
- join_type: str | None = None¶
- type: str | None = None¶
- class peyk.platforms.rubika.types.Update(type: str | None = None, chat_id: str | None = None, removed_message_id: str | None = None, new_message: Message | None = None, updated_message: Message | None = None, event_data: Event | None = None)[source]¶
Bases:
objectRepresent the Rubika Bot API
Updatetype.The class preserves the existing public fields and wire-format behavior.
- chat_id: str | None = None¶
- classmethod from_dict(data: dict | None) Update | 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.
- removed_message_id: str | None = None¶
- type: str | None = None¶
- class peyk.platforms.rubika.types.InlineMessage(sender_id: str = '', text: str | None = None, file: File | None = None, location: Location | None = None, aux_data: AuxData | None = None, message_id: str = '', chat_id: str = '')[source]¶
Bases:
objectRepresent the Rubika Bot API
InlineMessagetype.The class preserves the existing public fields and wire-format behavior.
- chat_id: str = ''¶
- classmethod from_dict(data: dict | None) InlineMessage | 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.
- message_id: str = ''¶
- sender_id: str = ''¶
- text: str | None = None¶
- class peyk.platforms.rubika.types.GetUpdatesResult(updates: List[Update] = <factory>, next_offset_id: Optional[str] = None)[source]¶
Bases:
objectWrapper for the getUpdates response payload.
Confirmed from the official docs: the
datafield carries bothupdates(list) andnext_offset_id(the offset to pass on the next call).- classmethod from_data(data: object) GetUpdatesResult[source]¶
Performs the from data operation for the Rubika client.
- Parameters:
data – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- next_offset_id: str | None = None¶
Modules