Implementation of client-server matrix API in haxe using HaxeHttpClient.
Endes 7704de3d41 A lot o fixes | 6 éve | |
---|---|---|
src | 6 éve | |
test | 6 éve | |
.gitignore | 7 éve | |
LICENSE | 7 éve | |
README.md | 6 éve | |
build-test.hxml | 6 éve | |
haxelib.json | 6 éve |
Implementation of client-server matrix API in haxe using akifox-asynchttp. Because of it, tecnically only works on CPP/NEKO/JAVA/FLASH and not in JAVASCRIPT because JAVASCRIPT only support POST and Get Methods. But, is only tested on neko platform, if you test in other, let me know.
Importing:
import beartek.matrix_im.client.Conection;
Login in:
var con = new Conection(server);
con.on_error = function( e : Dynamic ) : Void {
throw 'Error: ' + e;
}
con.session.login_with_pass(user, password, device_name, function( respose : Dynamic ) : Void {
trace(respose.access_token); //The access_token will be actumaticaly stored for future request until you logout.
});
Log out:
con.session.logout(function() : Void {
//Loged out
});
For more examples see the Test_client
class in test/beartek/matrix_im/client and for more info see Matrix Client-Server API docs (This library does not implement the API equal than described in the matrix docs).
by NetaLabTek