コード例 #1
0
        public static void TestGetAccountDetailsAsync()
        {
            using (var client = new CloudFlareClient(Credentials.Credentials.Authentication))
            {
                var accounts       = client.GetAccountsAsync().Result;
                var accountDetails = client.GetAccountDetailsAsync(accounts.Result.First().Id).Result;

                Assert.NotNull(accountDetails);
                Assert.Empty(accountDetails.Errors);
                Assert.True(accountDetails.Success);
            }
        }
コード例 #2
0
        public async Task TestGetAccountDetailsAsync()
        {
            using var client = new CloudFlareClient(Credentials.Credentials.Authentication);
            var accounts = await client.GetAccountsAsync();

            var accountDetails = await client.GetAccountDetailsAsync(accounts.Result.First().Id);

            Assert.NotNull(accountDetails);
            Assert.True(accountDetails.Success);
            if (accountDetails.Errors != null)
            {
                Assert.Empty(accountDetails.Errors);
            }
        }