Example #1
0
        private IEnumerable <AuthKind> RequestAuthenticationKinds()
        {
            _matrixApi.ThrowIfNotSupported();

            var response = _matrixApi.Backend.
                           Request <AuthResponse>(_apiPath, false);

            // Error testing goes here
            return(response.AuthKinds);
        }
Example #2
0
        public VersionsContext RequestVersions()
        {
            _matrixApi.ThrowIfNotSupported();

            var response = _matrixApi.Backend.Request <VersionsResponse>(_apiPath, false);

            // Error checking goes here
            return(new VersionsContext
            {
                UnstableFeatures = response.UnstableFeatures,
                Versions = response.ApiVersions
            });
        }
        public void Sync(string sinceToken, bool connectionFailureTimeout = false)
        {
            _matrixApi.ThrowIfNotSupported();

            var apiPath = new UriBuilder(_apiPath)
            {
                Query = $@"?timeout={Timeout}{(string.IsNullOrEmpty(sinceToken) ? "" : "&since=")}{sinceToken}"
            };

            var syncResponse = _matrixApi.Backend.Request <SyncResponse>(apiPath.Uri, true);

            //if (syncResponse.ErrorCode == null)
            //    ProcessSync(sync);
        }