FootballData.Loader 1.0.4

dotnet add package FootballData.Loader --version 1.0.4
NuGet\Install-Package FootballData.Loader -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FootballData.Loader" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FootballData.Loader --version 1.0.4
#r "nuget: FootballData.Loader, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FootballData.Loader as a Cake Addin
#addin nuget:?package=FootballData.Loader&version=1.0.4

// Install FootballData.Loader as a Cake Tool
#tool nuget:?package=FootballData.Loader&version=1.0.4

FootballData.Loader

It's a .Net library that allows you to download and parse the CSV files hosted on football-data.co.uk or to load the files from a local path.

How to download historical data files?

You can download the CSV files by creating an instance of the HttpClient class, injecting it into the FootballDataHttpLoader class and calling the DownloadStatsAsync method.

var client = HttpLoader
    .Create()
    .WithBrowserName("your-browser")
    .Build();  	
	
var downloader = new FootballDataHttpLoader(client);

var result = await downloader.DownloadStatsAsync();

The DownloadStatsAsync method accepts a FootballDataHttpParams class to allow filtering the files by country, division and year.

var param = new FootballDataHttpParams()
{
    Country = Country.Argentina,
    Division = Division.LigaProfesional,
    FromYear = 2012,
    ToYear = 2012
};

You can also specify the location where to download the files by assigning it to the FilePath property. Notice that the file names are in the format Y1Y2-DIV (i.e, 1314-I1)

Notice that when an instance of FootballDataHttpParams is not passed as a parameter all files are downloaded.

How to load historical data files?

You can load the CSV files by injecting a rootpath it into the FootballDataFileLoader class and call the LoadStatsAsync method.

var rootpath = "my-rootpath";
	
var loader = new FootballDataFileLoader(rootpath);

var result = await loader.LoadStatsAsync();

Similar to DownloadStatsAsync the method LoadStatsAsync accepts a FootballDataFileParams class to allow filtering the files by country, league and year.

How to download the features file?

The method to download the features is DownloadFeaturesAsync which accepts an instance of FootballDataHttpParams.

How to load the features file?

The method to load the features is LoadFeaturesAsync which accepts an instance of FootballDataFileParams.

How can I check the status of the request?

All methods return a FootballDataResult object, by default the propert Success is set to True and the Message to OK, when an error occurs Success is set to False and details of the error can be found in Message property.

Notes

For a full reference of all the FootballDataEntry propeties please visit football-data.co.uk notes

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 66 4/24/2024