ex_matrix_api v0.1.0 ExMatrixApi.Synapse
API level to make requests to Matrix Synapse.
Link to this section Summary
Functions
Read config settings.
Create new room for user's conversation.
Decline invite to join room.
Get authorization token by login / password.
Check if synapse allowing to register specific username.
Join room by accepting invite.
Leave room.
Register new user on Matrix synapse.
Get secure room id from it's alias.
Get list of messages in a specific room.
Get full room state.
Get list of room names.
Send new text message in a specific room.
Mark room events as read.
Get major user data in scope synapse.
Convert mxc URI into http URL for display.
Change room state, by executing state event.
Update specific field of user's data, currently supported only for display name and avatar.
Update display name, avatar or password.
Upload file and return mxc:// URI of the uploaded asset.
Link to this section Types
invites()
Specs
invites() :: %{ required(String.t()) => ExMatrixApi.Synapse.Rooms.InviteState.t() }
timelines()
Specs
timelines() :: %{required(String.t()) => ExMatrixApi.Synapse.Rooms.Timeline.t()}
Link to this section Functions
config!(key)
Specs
Read config settings.
create_room(token, payload)
Specs
Create new room for user's conversation.
forget_invited_room(token, room_uid)
Specs
Decline invite to join room.
get_token(user, password)
Specs
Get authorization token by login / password.
is_username_available?(username)
Specs
Check if synapse allowing to register specific username.
join_invited_room(token, room_uid)
Specs
Join room by accepting invite.
leave_room(token, room_uid)
Specs
Leave room.
register(username, password, params \\ %{})
Specs
register(String.t(), String.t(), map()) :: {:ok, ExMatrixApi.Synapse.RegisteredUser.t()} | {:error, any()}
Register new user on Matrix synapse.
room_id_by_alias(token, room_alias)
Specs
Get secure room id from it's alias.
room_messages(token, room_id, from, limit \\ 20, dir \\ "b")
Specs
room_messages(Sring.t(), String.t(), String.t(), integer(), String.t()) :: {:ok, {[map()], String.t(), String.t()}} | {:error, any()}
Get list of messages in a specific room.
room_state(token, room_id)
Specs
room_state(String.t(), String.t()) :: {:ok, [ExMatrixApi.Synapse.Rooms.Event.t()]} | {:error, any()}
Get full room state.
rooms(token)
Specs
Get list of room names.
send_text_message(token, room, text)
Specs
send_text_message(String.t(), String.t(), String.t()) :: {:ok, ExMatrixApi.Synapse.Rooms.Event.t()} | {:error, any()}
Send new text message in a specific room.
set_read_marker(token, room, to_event_id)
Specs
Mark room events as read.
sync(token, params \\ %{})
Specs
Get major user data in scope synapse.
thumbnail(arg1, width, height)
Specs
Convert mxc URI into http URL for display.
update_room_state(token, room_id, event_type, payload \\ %{}, state_key \\ "")
Specs
update_room_state(String.t(), String.t(), String.t(), map(), String.t()) :: {:ok, String.t()} | {:error, any()}
Change room state, by executing state event.
update_user(token, user_id, atom, new_name)
Specs
Update specific field of user's data, currently supported only for display name and avatar.
update_user(token, atom, user_id, old_password, new_password)
Specs
Update display name, avatar or password.
upload_media(token, content_type, bin, filename \\ nil)
Specs
upload_media(String.t(), String.t(), binary(), String.t() | nil) :: {:ok, String.t()} | {:error, any()}
Upload file and return mxc:// URI of the uploaded asset.