A simple REST wrapper for Matrix.org for Erlang development.
Early development. Essentially a "hello world" library at the moment.
Hello Matrix!
matrix:helloMatrix("https://myhomeserv.er:port", "myusername", "mypassword", "#someroom:myhomeserv.er").
Initiate:
Homeserver = "http://theserver.domain:port"
matrix:init().
Log in with password:
{ok, AccessToken} = matrix:login("username", "password", Homeserver).
Join room:
{ok, RoomID} = matrix:joinRoom("#room:domain.asd", AccessToken, Homeserver).
Leave room:
matrix:partRoom("#room:domain.asd", AccessToken, Homeserver).
Send a message:
matrix:sendTextMessage("The message", RoomID, AccessToken, Homeserver).
Listen for text messages (runs forever, will not terminate!)
matrix:listen(RoomID, AccessToken, Homeserver).
Depends on Jiffy (https://github.com/davisp/jiffy) for JSON-handling. Install with rebar get-deps or apt-get install erlang-jiffy.