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(); }
public MatrixAPI(string URL, string token = "") { if (!Uri.IsWellFormedUriString(URL, UriKind.Absolute)) { throw new MatrixException("URL is not valid"); } IsAS = false; mbackend = new HttpBackend(URL); BaseURL = URL; rng = new Random(DateTime.Now.Millisecond); event_converter = new JSONEventConverter(); syncToken = token; if (syncToken == "") { RunningInitialSync = true; } }