Struct glitch_in_the_matrix::MatrixClient [] [src]

pub struct MatrixClient { /* fields omitted */ }

A connection to a Matrix homeserver.

Methods

impl MatrixClient
[src]

Log in to a Matrix homeserver, and return a client object.

Join a room by identifier or alias.

Update our presence status.

Send a read receipt for a given event ID.

Send a message to a room ID.

Wrapper function that sends a Message::Notice with the specified unformatted text to the given room ID. Provided for convenience purposes.

Wrapper function that sends a Message::Notice with the specified HTML-formatted text (and accompanying unformatted text, if given) to the given room ID.

Upload some data (convertible to a Body) of a given ContentType, like an image.

Body is accessible via the http module. See the documentation there for a complete reference of what implements Into<Body> - a quick shortlist: Vec<u8>, &'static [u8] (not &'a [u8], sadly), String, &'static str.

ContentType is accessible via the http module. See the documentation there for more information on how to use it.

Get the client's MXID.

Get a SyncStream, a Stream used to obtain replies to the /sync API.

This SyncStream is independent from the original MatrixClient, and does not borrow from it in any way.

Sends an arbitrary Request to the Matrix homeserver, like one generated by get_request_for().

Like send_request(), but discards the return value that the Matrix homeserver sends back.

Trait Implementations

impl Drop for MatrixClient
[src]

Invalidates our access token, so we don't have millions of devices. Also sets us as offline.