peyk.platforms.rubika.methods¶
Rubika client methods, one module per method.
- async peyk.platforms.rubika.methods.close(self) None[source]¶
Performs the close operation for the Rubika client.
- async peyk.platforms.rubika.methods.get_me(self) Bot[source]¶
Retrieves me from the Rubika API.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.send_message(self, chat_id: str, text: str, *, metadata: Metadata | Dict[str, object] | None = None, chat_keypad: Keypad | Dict[str, object] | None = None, inline_keypad: Keypad | Dict[str, object] | None = None, chat_keypad_type: str | None = None, reply_to_message_id: str | None = None, disable_notification: bool | None = None) Message[source]¶
Sends message through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
text – Text content supplied to the operation.
metadata – Value used by this operation.
chat_keypad – Value used by this operation.
inline_keypad – Value used by this operation.
chat_keypad_type – Value used by this operation.
reply_to_message_id – Value used by this operation.
disable_notification – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.send_poll(self, chat_id: str, question: str, options: List[str]) Message[source]¶
Sends poll through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
question – Value used by this operation.
options – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.send_location(self, chat_id: str, latitude: str, longitude: str, *, chat_keypad: Keypad | Dict[str, object] | None = None, inline_keypad: Keypad | Dict[str, object] | None = None, chat_keypad_type: str | None = None, reply_to_message_id: str | None = None, disable_notification: bool | None = None) Message[source]¶
Sends location through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
latitude – Value used by this operation.
longitude – Value used by this operation.
chat_keypad – Value used by this operation.
inline_keypad – Value used by this operation.
chat_keypad_type – Value used by this operation.
reply_to_message_id – Value used by this operation.
disable_notification – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.send_contact(self, chat_id: str, first_name: str, last_name: str, phone_number: str, *, chat_keypad: Keypad | Dict[str, object] | None = None, inline_keypad: Keypad | Dict[str, object] | None = None, chat_keypad_type: str | None = None, reply_to_message_id: str | None = None, disable_notification: bool | None = None) Message[source]¶
Sends contact through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
first_name – Value used by this operation.
last_name – Value used by this operation.
phone_number – Value used by this operation.
chat_keypad – Value used by this operation.
inline_keypad – Value used by this operation.
chat_keypad_type – Value used by this operation.
reply_to_message_id – Value used by this operation.
disable_notification – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.get_chat(self, chat_id: str) Chat[source]¶
Retrieves chat from the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.get_updates(self, *, offset_id: str | None = None, limit: int | None = None) Tuple[List[Update], str | None][source]¶
Retrieves updates from the Rubika API.
- Parameters:
offset_id – Value used by this operation.
limit – Maximum number of results requested.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.forward_message(self, from_chat_id: str, message_id: str, to_chat_id: str, *, disable_notification: bool | None = None) str[source]¶
Performs the forward message operation for the Rubika client.
- Parameters:
from_chat_id – Value used by this operation.
message_id – Identifier of the target message.
to_chat_id – Value used by this operation.
disable_notification – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.edit_message_text(self, chat_id: str, message_id: str, text: str) bool[source]¶
Edits message text through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
message_id – Identifier of the target message.
text – Text content supplied to the operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.edit_message_keypad(self, chat_id: str, message_id: str, inline_keypad: Keypad | Dict[str, object]) bool[source]¶
Edits message keypad through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
message_id – Identifier of the target message.
inline_keypad – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.delete_message(self, chat_id: str, message_id: str) bool[source]¶
Removes message through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
message_id – Identifier of the target message.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.set_commands(self, commands: List[BotCommand | Dict[str, object]]) bool[source]¶
Updates commands through the Rubika API.
- Parameters:
commands – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.update_bot_endpoints(self, url: str, type: str = UpdateEndpointTypeEnum.RECEIVE_UPDATE) bool[source]¶
Performs the update bot endpoints operation for the Rubika client.
- Parameters:
url – Target URL.
type – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.edit_chat_keypad(self, chat_id: str, chat_keypad: Keypad | Dict[str, object] | None = None, *, chat_keypad_type: str = ChatKeypadTypeEnum.NEW) bool[source]¶
Edits chat keypad through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
chat_keypad – Value used by this operation.
chat_keypad_type – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.remove_chat_keypad(self, chat_id: str) bool[source]¶
Removes chat keypad through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.get_file(self, file_id: str) str[source]¶
Retrieves file from the Rubika API.
- Parameters:
file_id – Identifier of the file.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.send_file(self, chat_id: str, file_id: str, *, text: str | None = None, chat_keypad: Keypad | Dict[str, object] | None = None, inline_keypad: Keypad | Dict[str, object] | None = None, chat_keypad_type: str | None = None, reply_to_message_id: str | None = None, disable_notification: bool | None = None) Message[source]¶
Sends file through the Rubika API.
- Parameters:
chat_id – Identifier of the target chat.
file_id – Identifier of the file.
text – Text content supplied to the operation.
chat_keypad – Value used by this operation.
inline_keypad – Value used by this operation.
chat_keypad_type – Value used by this operation.
reply_to_message_id – Value used by this operation.
disable_notification – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.request_send_file(self, type: str = FileTypeEnum.FILE) str[source]¶
Performs the request send file operation for the Rubika client.
- Parameters:
type – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.upload_file(self, upload_url: str, file_bytes: bytes, *, filename: str = 'file', content_type: str = 'application/octet-stream') str[source]¶
Performs the upload file operation for the Rubika client.
- Parameters:
upload_url – Value used by this operation.
file_bytes – Value used by this operation.
filename – Value used by this operation.
content_type – Value used by this operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.upload_and_send_file(self, chat_id: str, file_bytes: bytes, *, file_type: str = FileTypeEnum.FILE, filename: str = 'file', content_type: str = 'application/octet-stream', text: str | None = None, **send_kwargs: object) Message[source]¶
Performs the upload and send file operation for the Rubika client.
- Parameters:
chat_id – Identifier of the target chat.
file_bytes – Value used by this operation.
file_type – Value used by this operation.
filename – Value used by this operation.
content_type – Value used by this operation.
text – Text content supplied to the operation.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.ban_chat_member(self, chat_id: str, user_id: str) bool[source]¶
Performs the ban chat member operation for the Rubika client.
- Parameters:
chat_id – Identifier of the target chat.
user_id – Identifier of the target user.
- Returns:
Result produced by the Rubika operation.
- async peyk.platforms.rubika.methods.unban_chat_member(self, chat_id: str, user_id: str) bool[source]¶
Performs the unban chat member operation for the Rubika client.
- Parameters:
chat_id – Identifier of the target chat.
user_id – Identifier of the target user.
- Returns:
Result produced by the Rubika operation.
Modules
|
Performs the ban chat member operation for the Rubika client. |
|
Performs the close operation for the Rubika client. |
|
Removes message through the Rubika API. |
|
Edits chat keypad through the Rubika API. |
|
Edits message keypad through the Rubika API. |
|
Edits message text through the Rubika API. |
|
Performs the forward message operation for the Rubika client. |
|
Retrieves chat from the Rubika API. |
|
Retrieves file from the Rubika API. |
|
Retrieves me from the Rubika API. |
|
Retrieves updates from the Rubika API. |
|
Removes chat keypad through the Rubika API. |
|
Performs the request send file operation for the Rubika client. |
|
Sends contact through the Rubika API. |
|
Sends file through the Rubika API. |
|
Sends location through the Rubika API. |
|
Sends message through the Rubika API. |
|
Sends poll through the Rubika API. |
|
Updates commands through the Rubika API. |
|
Performs the unban chat member operation for the Rubika client. |
|
Performs the update bot endpoints operation for the Rubika client. |
|
Performs the upload and send file operation for the Rubika client. |
|
Performs the upload file operation for the Rubika client. |