slidge.plugins.whatsapp.generated.whatsapp
#
Module Contents#
Classes#
handle=A Go-side object is always initialized with an explicit handle=arg |
|
handle=A Go-side object is always initialized with an explicit handle=arg |
|
handle=A Go-side object is always initialized with an explicit handle=arg |
|
handle=A Go-side object is always initialized with an explicit handle=arg |
|
handle=A Go-side object is always initialized with an explicit handle=arg |
|
CallState represents the state of the call to synchronize with. |
|
ChatStateKind represents the different kinds of chat-states possible in WhatsApp. |
|
EventKind represents all event types recognized by the Python session adapter, as emitted by the |
|
GroupAffiliation represents the set of privilidges given to a specific participant in a group. |
|
GroupParticipantAction represents the distinct set of actions that can be taken when encountering |
|
A ErrorLevel is a value representing the severity of a log message being handled. |
|
MessageKind represents all concrete message types (plain-text messages, edit messages, reactions) |
|
ReceiptKind represents the different types of delivery receipts possible in WhatsApp. |
|
A Message represents one of many kinds of bidirectional communication payloads, for example, a |
|
A ChatState represents the activity of a contact within a certain discussion, for instance, |
|
EventPayload represents the collected payloads for all event types handled by the overarching |
|
Precence represents a contact's general state of activity, and is periodically updated as |
|
A Avatar represents a small image representing a Contact or Group. |
|
A Contact represents any entity that be communicated with directly in WhatsApp. This typically |
|
A Gateway represents a persistent process for establishing individual sessions between linked |
|
A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not |
|
A GroupSubject represents the user-defined group description and attached metadata thereof, for a |
|
A Preview represents a short description for a URL provided in a message body, as usually derived |
|
A Receipt represents a notice of delivery or presentation for [Message] instances sent or |
|
A Session represents a connection (active or not) between a linked device and WhatsApp. Active |
|
A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside |
|
A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for |
|
A Group represents a named, many-to-many chat space which may be joined or left at will. All |
|
A GroupParticipant represents a contact who is currently joined in a given group. Participants in |
Functions#
NewGateway() object |
|
GenerateMessageID() str |
Attributes#
- class slidge.plugins.whatsapp.generated.whatsapp.Slice_whatsapp_Attachment(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from
- class slidge.plugins.whatsapp.generated.whatsapp.Slice_whatsapp_Contact(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from
- class slidge.plugins.whatsapp.generated.whatsapp.Slice_whatsapp_Group(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from
- class slidge.plugins.whatsapp.generated.whatsapp.Slice_whatsapp_GroupParticipant(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from
- class slidge.plugins.whatsapp.generated.whatsapp.Slice_interface_(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from
- class slidge.plugins.whatsapp.generated.whatsapp.CallState[source]#
Bases:
enum.Enum
CallState represents the state of the call to synchronize with.
- class slidge.plugins.whatsapp.generated.whatsapp.ChatStateKind[source]#
Bases:
enum.Enum
ChatStateKind represents the different kinds of chat-states possible in WhatsApp.
- class slidge.plugins.whatsapp.generated.whatsapp.EventKind[source]#
Bases:
enum.Enum
EventKind represents all event types recognized by the Python session adapter, as emitted by the Go session adapter.
- class slidge.plugins.whatsapp.generated.whatsapp.GroupAffiliation[source]#
Bases:
enum.Enum
GroupAffiliation represents the set of privilidges given to a specific participant in a group.
- class slidge.plugins.whatsapp.generated.whatsapp.GroupParticipantAction[source]#
Bases:
enum.Enum
GroupParticipantAction represents the distinct set of actions that can be taken when encountering a group participant, typically to add or remove.
- class slidge.plugins.whatsapp.generated.whatsapp.ErrorLevel[source]#
Bases:
enum.Enum
A ErrorLevel is a value representing the severity of a log message being handled.
- class slidge.plugins.whatsapp.generated.whatsapp.MessageKind[source]#
Bases:
enum.Enum
MessageKind represents all concrete message types (plain-text messages, edit messages, reactions) recognized by the Python session adapter.
- class slidge.plugins.whatsapp.generated.whatsapp.ReceiptKind[source]#
Bases:
enum.Enum
ReceiptKind represents the different types of delivery receipts possible in WhatsApp.
- class slidge.plugins.whatsapp.generated.whatsapp.Message(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Message represents one of many kinds of bidirectional communication payloads, for example, a text message, a file (image, video) attachment, an emoji reaction, etc. Messages of different kinds are denoted as such, and re-use fields where the semantics overlap.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.ChatState(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A ChatState represents the activity of a contact within a certain discussion, for instance, whether the contact is currently composing a message. This is separate to the concept of a Presence, which is the contact’s general state across all discussions.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.EventPayload(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
EventPayload represents the collected payloads for all event types handled by the overarching session adapter handler. Only specific fields will be populated in events emitted by internal handlers, see documentation for specific types for more information.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Presence(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
Precence represents a contact’s general state of activity, and is periodically updated as contacts start or stop paying attention to their client of choice.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Avatar(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Avatar represents a small image representing a Contact or Group.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Contact(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Contact represents any entity that be communicated with directly in WhatsApp. This typically represents people, but may represent a business or bot as well, but not a group-chat.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Gateway(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Gateway represents a persistent process for establishing individual sessions between linked devices and WhatsApp.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- NewSession(device)[source]#
NewSession(object device) object
NewSession returns a new for the LinkedDevice given. If the linked device does not have a valid ID, a pair operation will be required, as described in [Session.Login].
- CleanupSession(device)[source]#
CleanupSession(object device) str
CleanupSession will remove all invalid and obsolete references to the given device, and should be used when pairing a new device or unregistering from the Gateway.
- class slidge.plugins.whatsapp.generated.whatsapp.LinkedDevice(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not unique to the underlying “main” device (or phone number), as multiple linked devices may be paired with any main device.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.GroupSubject(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A GroupSubject represents the user-defined group description and attached metadata thereof, for a given [Group].
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Preview(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Preview represents a short description for a URL provided in a message body, as usually derived from the content of the page pointed at.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Receipt(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Receipt represents a notice of delivery or presentation for [Message] instances sent or received. Receipts can be delivered for many messages at once, but are generally all delivered under one specific state at a time.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Session(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Session represents a connection (active or not) between a linked device and WhatsApp. Active sessions need to be established by logging in, after which incoming events will be forwarded to the adapter event handler, and outgoing events will be forwarded to WhatsApp.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- Login()[source]#
Login() str
Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached or by initiating a pairing session for a new linked device. Callers are expected to have set an event handler in order to receive any incoming events from the underlying WhatsApp session.
- Logout()[source]#
Logout() str
Logout disconnects and removes the current linked device locally and initiates a logout remotely.
- Disconnect()[source]#
Disconnect() str
Disconnects detaches the current connection to WhatsApp without removing any linked device state.
- SendMessage(message)[source]#
SendMessage(object message) str
SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID specified within. In general, different message kinds require different fields to be set; see the documentation for the [Message] type for more information.
- SendChatState(state)[source]#
SendChatState(object state) str
SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the contact specified within.
- SendReceipt(receipt)[source]#
SendReceipt(object receipt) str
SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
- GetContacts(refresh)[source]#
GetContacts(bool refresh) []object, str
GetContacts subscribes to the WhatsApp roster currently stored in the Session’s internal state. If refresh is true, FetchRoster will pull application state from the remote service and synchronize any contacts found with the adapter.
- GetGroups()[source]#
GetGroups() []object, str
GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional information on present participants.
- GetAvatar(resourceID, avatarID)[source]#
GetAvatar(str resourceID, str avatarID) object, str
GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty avatarID is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state for the given ID has not changed.
- SetEventHandler(h, goRun=False)[source]#
SetEventHandler(callable h)
SetEventHandler assigns the given handler function for propagating internal events into the Python gateway. Note that the event handler function is not entirely safe to use directly, and all calls should instead be made via the [propagateEvent] function.
- class slidge.plugins.whatsapp.generated.whatsapp.Attachment(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside a message, for display or storage on the recepient client.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Call(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for calls is currently not implemented, and this structure contains the bare minimum data required for notifying on missed calls.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.Group(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A Group represents a named, many-to-many chat space which may be joined or left at will. All fields apart from the group JID, are considered to be optional, and may not be set in cases where group information is being updated against previous assumed state. Groups in WhatsApp are generally invited to out-of-band with respect to overarching adaptor; see the documentation for [Session.GetGroups] for more information.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first
- class slidge.plugins.whatsapp.generated.whatsapp.GroupParticipant(*args, **kwargs)[source]#
Bases:
slidge.plugins.whatsapp.generated.go.GoClass
A GroupParticipant represents a contact who is currently joined in a given group. Participants in WhatsApp can always be derived back to their individual [Contact]; there are no anonymous groups in WhatsApp.
handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameters can be unnamed in order of field names or named fields in which case a new Go object is constructed first