woob.capabilities.chat

exception ChatException[source]

Bases: UserError

Exception raised when there is a problem with the chat.

class ChatMessage(id_from, id_to, message, date=None, url=None)[source]

Bases: BaseObject

Message on the chat.

Variables:
  • url – (str) url

  • id_from – (str) ID of sender

  • id_to – (str) ID of recipient

  • message – (str) Content of message

  • date – (date, datetime) Date when the message has been sent

class CapChat[source]

Bases: Capability

Websites with a chat system.

iter_chat_messages(_id=None)[source]

Iter messages.

Parameters:

_id (str) – optional parameter to only get messages (default: None) from a given contact.

Return type:

iter[ChatMessage]

send_chat_message(_id, message)[source]

Send a message to a contact.

Parameters:
  • _id (str) – ID of recipient

  • message (str) – message to send

Raises:

ChatException