Polyjuice Client v0.2.1 Polyjuice.Client View Source

Matrix client functions.

The struct in this module, or any struct that implements the Polyjuice.Client.API protocol, can be used to connect to a Matrix server using the functions from submodules.

To sync with the homeserver, start a process using the child spec returned by Polyjuice.Client.API.sync_child_spec/3.

Link to this section Summary

Types

t()

Matrix client data.

Functions

The r0 client URL prefix

The unstable client URL prefix

Link to this section Types

Link to this type

t()

View Source
t() :: %Polyjuice.Client{
  access_token: String.t(),
  base_url: String.t(),
  storage: Polyjuice.Client.Storage.t(),
  user_id: String.t()
}

Matrix client data.

  • base_url (string): Required. The base URL for the homeserver.
  • access_token (string): Required to call endpoints that require an authenticated user. The user's access token.
  • user_id (string): Required for some endpoints and for sync. The user's Matrix ID.
  • storage (Polyjuice.Client.Storage): Required for some endpoints and for sync. Storage for the client.

Link to this section Functions

The r0 client URL prefix

The unstable client URL prefix