Access and download OpenDNS statistics from your C# code. This project provides managed .NET API to OpenDNS dashboard.
Also published as nuget package.
- StatsLoader - API class. Wrapper of OpenDNS dashboard
- UserNetworkDescriptor - descriptor of user networks
- enum StatsType - types of available OpenDns statistics
- See example Downloader project.
// Load todays TopDomain statistics
using (var loader = new StatsLoader(NETWORK_ID))
{
loader.Login(USER_NAME, PASSWORD);
var csv = loader.LoadCsv(DateTime.Today);
// ... use loaded csv rows
}
// Get all user networks
using (var loader = new StatsLoader(null))
{
loader.Login(USER_NAME, PASSWORD);
var networks = loader.LoadAllUserNetworks();
// ... use networks list
}
NOTE: this library is improved C# port of opendns-fetchstats project.