AfvalwijzerCalendar 1.1.0
dotnet add package AfvalwijzerCalendar --version 1.1.0
NuGet\Install-Package AfvalwijzerCalendar -Version 1.1.0
<PackageReference Include="AfvalwijzerCalendar" Version="1.1.0" />
paket add AfvalwijzerCalendar --version 1.1.0
#r "nuget: AfvalwijzerCalendar, 1.1.0"
// Install AfvalwijzerCalendar as a Cake Addin #addin nuget:?package=AfvalwijzerCalendar&version=1.1.0 // Install AfvalwijzerCalendar as a Cake Tool #tool nuget:?package=AfvalwijzerCalendar&version=1.1.0
About
AfvalWijzer Calendar is a C# package for reading data from the dutch website https://www.mijnafvalwijzer.nl/. The packages parse the html code, does not use API.
How to use
Setup DI container
public void ConfigureServices(IServiceCollection services)
{
services.AddAfvalwijzerCalendarDependencies();
services.AddScoped<IWasteCalendar, WasteCalendar>();
}
Call the calendar
public class GarbageDayTester
{
private readonly IWasteCalendar _wasteCalendar;
public GarbageDayTester(IWasteCalendar wasteCalendar)
{
_wasteCalendar = wasteCalendar;
}
public async Task<List<string>> GetGarbageDayForToday(string zipCode, string houseNumber, string houseNumberSuffix)
{
var garbageTypes = await _wasteCalendar.GetGarbageTypeForToday(zipCode, houseNumber, houseNumberSuffix);
return garbageTypes;
}
public async Task<List<string>> GetGarbageDay(DateOnly day, string zipCode, string houseNumber, string houseNumberSuffix)
{
var garbageTypes = await _wasteCalendar.GetGarbageType(day, zipCode, houseNumber, houseNumberSuffix);
return garbageTypes;
}
}
Key Features
Get the list of the garbage types for a given day. It returns the dutch name of the garbage types as it is there in the website, without any transformation (e.g.: Papier en karton, Plastic, Metalen en Drankkartons).
Limitations
As it uses the https://www.mijnafvalwijzer.nl/ website as a data source, it can only return the data available at that site. That means that it can only access the data for the current year.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- HtmlAgilityPack (>= 1.11.46)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.