/CloudFlare.Client

.NET client for communication with the CloudFlare service API.

Primary LanguageC#OtherNOASSERTION

CloudFlare.Client

Donate Nuget Nuget Libraries.io GitHub issues Licence

Codacy Badge Build Status Azure DevOps coverage Azure DevOps tests

Info: The library currently targets .Net Core 2.1, .Net Core 2.2, .Net Core 3.0 and .NET Standard 2.1 because of the missing functions in the older frameworks. For example coz of PatchAsync in HTTPClient.

Installation

    PM> Install-Package CloudFlare.Client -Version 1.1.11

Usage

    using (var client = new CloudFlareClient("address@example.com", "globalApiKeyFromCF"))
    {
        var zonesQueryResult = client.GetZonesAsync().Result;

        foreach (var zone in zonesQueryResult.Result)
        {
            var dnsRecordQueryResult = client.GetDnsRecordsAsync(zone.Id).Result;
            foreach (var dnsRecord in dnsRecordQueryResult.Result)
            {
                Console.WriteLine(dnsRecord.Name);
            }

            Console.WriteLine(zone.Name);
        }
    }

Implemented functionality

Check the implemented functionality wiki page.