コード例 #1
0
        private async Task <bool> IsUserConfirmedAsync(string username)
        {
            Uri     uri  = _api.ApiQuery("list=users&usprop=groups&ususers=" + username);
            XmlNode node = await GetSingleNode(uri, "/api/query/users/user/groups/g[.=\"autoconfirmed\"]");

            return(node != null);
        }
コード例 #2
0
        private async Task <bool> IsUserConfirmedAsync(string username)
        {
            var uri = _api.ApiQuery(new RequestParameters
            {
                { "list", "users" },
                { "usprop", "groups" },
                { "ususers", username },
            });
            var response = await _client.GetStringAsync(uri).ConfigureAwait(false);

            var node = GetSingleNode(response, "/api/query/users/user/groups/g[.=\"autoconfirmed\"]");

            return(node != null);
        }