public MatrixAPI(string URL, IMatrixAPIBackend backend) { if (!Uri.IsWellFormedUriString(URL, UriKind.Absolute)) { throw new MatrixException("URL is not valid"); } IsAS = true; mbackend = backend; BaseURL = URL; rng = new Random(DateTime.Now.Millisecond); event_converter = new JSONEventConverter(); }
public MatrixAPI(string URL, string application_token, string user_id) { if (!Uri.IsWellFormedUriString(URL, UriKind.Absolute)) { throw new MatrixException("URL is not valid"); } IsAS = true; mbackend = new HttpBackend(URL, user_id); mbackend.SetAccessToken(application_token); this.user_id = user_id; BaseURL = URL; rng = new Random(DateTime.Now.Millisecond); event_converter = new JSONEventConverter(); }