mautrix.client
- class mautrix.client.Client
Bases:
mautrix.client.EncryptingAPI
,mautrix.client.Syncer
Client is a high-level wrapper around the client API.
- __init__(*args, sync_store=None, state_store=None, **kwargs)
Initialize a ClientAPI. You must either provide the
api
parameter with an existingmautrix.api.HTTPAPI
instance, or provide thebase_url
and other arguments for creating it as kwargs.- Parameters
mxid – The Matrix ID of the user. This is used for things like setting profile metadata. Additionally, the homeserver domain is extracted from this string and used for setting aliases and such. This can be changed later using set_mxid.
device_id – The device ID corresponding to the access token used.
api – The
mautrix.api.HTTPAPI
instance to use. You can also pass thekwargs
to create a HTTPAPI instance rather than creating the instance yourself.kwargs – If
api
is not specified, then the arguments to pass when creating a HTTPAPI.sync_store (Optional[mautrix.client.SyncStore]) –
state_store (Optional[mautrix.client.StateStore]) –
- Return type