GuiStracini.HolidayAPI
3.3.584
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package GuiStracini.HolidayAPI --version 3.3.584
NuGet\Install-Package GuiStracini.HolidayAPI -Version 3.3.584
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="GuiStracini.HolidayAPI" Version="3.3.584" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GuiStracini.HolidayAPI --version 3.3.584
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GuiStracini.HolidayAPI, 3.3.584"
#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 GuiStracini.HolidayAPI as a Cake Addin #addin nuget:?package=GuiStracini.HolidayAPI&version=3.3.584 // Install GuiStracini.HolidayAPI as a Cake Tool #tool nuget:?package=GuiStracini.HolidayAPI&version=3.3.584
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GuiStracini.HolidayAPI
A client wrapper of the Holiday API for .NET projects (both Core & Framewok).
CI/CD
Build status | Last commit | Tests | Coverage | Code Smells | LoC |
---|---|---|---|---|---|
Code Quality
Installation
Github Releases
Download the latest zip file from the Release page.
Nuget package manager
Package | Version | Downloads |
---|---|---|
GuiStracini.HolidayAPI |
Features
Implements all features of Holiday API available at HolidayAPI docs
- Get holidays list (country code and year required)
- Get filtered holidays (day, month, public, upcoming, previous, subdivisions, switch response language, search parameter)
- Get countries list
- Get filtered countries (search parameter)
- Get languages list
- Get filtered languages (search parameter)
- Get workday
- Get workdays
Usage
Get your API key at Holiday API site.
//Http Client - you should use your DI container for it
var client = HttpClientFactory.Create();
client.BaseAddress = new Uri("https://holidayapi.com/");
client.DefaultRequestHeaders.ExpectContinue = false;
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
//Use your API key
var myKey = "00000000-0000-0000-0000-000000000000";
//Instantiate a holidayApi client with your API key (GUID/UUID)
var holidayClient = new HolidayApiClient(myKey, client);
//Getting all holidays in Brazil for the year 2019:
var holidays = await holidayClient.GetHolidaysAsync("BR", 2019, CancellationToken.None);
foreach(var holiday in holidays)
Console.WriteLine("Holiday: {0} | Date: {1}", holiday.Name, holiday.Date);
//Getting all available countries
var countries = await holidayClient.GetCountriesAsync(CancellationToken.None);
foreach(var country in countries)
Console.WriteLine("Country: {0} | Code: {1} | Flag: {2}", country.Name, country.Code, country.Flag);
//Getting all available languages
var languages = await holidayClient.GetLanguagesAsync(CancellationToken.None);
foreach(var language in languages)
Console.WriteLine("Code: {0} | Name: {1}", language.Code, language.Name);
//Getting workday
var workday = await holidayClient.GetWorkdayAsync("BR", "2019-06-23", 10, CancellationToken.None);
Console.WriteLine("Workday: {0}", workday.Date);
//Getting workdays between two dates
var workdays = await holidayClient.GetWorkdaysAsync("BR", "2021-01-01", "2021-06-01", CancellationToken.None);
Console.WriteLine("Workdays: {0}". workdays.Days);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. 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.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
.NETStandard 2.1
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net6.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net8.0
- Microsoft.AspNet.WebApi.Client (>= 6.0.0)
- System.Threading.Tasks.Extensions (>= 4.5.4)
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 |
---|---|---|
3.3.653 | 99 | 10/28/2024 |
3.3.650 | 132 | 10/14/2024 |
3.3.647 | 78 | 10/14/2024 |
3.3.644 | 85 | 10/3/2024 |
3.3.641 | 71 | 10/3/2024 |
3.3.636 | 109 | 9/23/2024 |
3.3.633 | 116 | 9/16/2024 |
3.3.630 | 121 | 9/9/2024 |
3.3.627 | 125 | 8/27/2024 |
3.3.619 | 88 | 8/27/2024 |
3.3.614 | 97 | 8/27/2024 |
3.3.609 | 95 | 8/27/2024 |
3.3.602 | 111 | 8/26/2024 |
3.3.592 | 229 | 7/15/2024 |
3.3.589 | 86 | 7/15/2024 |
3.3.584 | 90 | 7/11/2024 |
3.3.574 | 852 | 5/28/2024 |
3.3.571 | 85 | 5/28/2024 |
3.3.566 | 90 | 5/28/2024 |
3.3.559 | 88 | 5/19/2024 |
3.3.553 | 101 | 4/29/2024 |
3.3.550 | 93 | 4/29/2024 |
3.3.545 | 95 | 4/29/2024 |
3.3.538 | 125 | 4/22/2024 |
3.3.535 | 102 | 4/22/2024 |
3.3.530 | 116 | 4/15/2024 |
3.3.527 | 108 | 4/15/2024 |
3.3.522 | 130 | 4/8/2024 |
3.3.519 | 128 | 3/18/2024 |
3.3.516 | 109 | 3/18/2024 |
3.3.511 | 115 | 2/26/2024 |
3.3.508 | 111 | 2/26/2024 |
3.3.503 | 115 | 2/26/2024 |
3.3.499 | 126 | 2/19/2024 |
3.3.494 | 111 | 2/19/2024 |
3.3.487 | 122 | 2/14/2024 |
3.3.484 | 102 | 2/14/2024 |
3.3.478 | 108 | 2/12/2024 |
3.3.475 | 145 | 1/30/2024 |
3.3.470 | 92 | 1/29/2024 |
3.3.464 | 735 | 1/22/2024 |
3.3.461 | 106 | 1/22/2024 |
3.3.456 | 146 | 1/16/2024 |
3.3.453 | 111 | 1/16/2024 |
3.3.448 | 149 | 1/8/2024 |
3.3.445 | 155 | 12/25/2023 |
3.3.442 | 137 | 12/25/2023 |
3.3.437 | 146 | 12/18/2023 |
3.3.422 | 151 | 12/14/2023 |
3.3.417 | 167 | 12/11/2023 |
3.3.414 | 128 | 12/11/2023 |
3.3.409 | 151 | 12/11/2023 |
3.3.406 | 154 | 12/11/2023 |
3.3.397 | 164 | 12/4/2023 |
3.3.394 | 161 | 11/27/2023 |
3.3.391 | 185 | 11/21/2023 |
3.3.388 | 160 | 11/21/2023 |
3.3.383 | 148 | 11/20/2023 |
3.3.376 | 150 | 11/20/2023 |
3.3.367 | 144 | 11/20/2023 |
3.3.356 | 161 | 11/14/2023 |
3.3.353 | 146 | 11/14/2023 |
3.3.348 | 140 | 11/14/2023 |
3.3.339 | 135 | 11/10/2023 |
3.3.332 | 150 | 11/7/2023 |
3.3.328 | 135 | 11/6/2023 |
3.3.325 | 192 | 10/25/2023 |
3.3.322 | 160 | 10/25/2023 |
3.3.315 | 159 | 10/25/2023 |
3.3.307 | 141 | 10/23/2023 |
3.3.304 | 159 | 10/18/2023 |
3.3.301 | 138 | 10/18/2023 |
3.3.292 | 144 | 10/18/2023 |
3.3.283 | 184 | 9/19/2023 |
3.3.280 | 146 | 9/19/2023 |
3.3.271 | 165 | 9/13/2023 |
3.3.268 | 198 | 9/4/2023 |
3.3.265 | 686 | 8/24/2023 |
3.3.262 | 207 | 8/9/2023 |
3.3.259 | 217 | 7/29/2023 |
3.3.257 | 169 | 7/29/2023 |
3.3.249 | 174 | 7/19/2023 |
3.3.246 | 191 | 7/17/2023 |
3.3.243 | 193 | 7/12/2023 |
3.3.240 | 159 | 7/12/2023 |
3.3.231 | 288 | 6/15/2023 |
3.3.228 | 187 | 6/7/2023 |
3.3.224 | 310 | 6/5/2023 |
3.3.219 | 356 | 5/24/2023 |
3.3.216 | 180 | 5/24/2023 |
3.3.211 | 205 | 5/23/2023 |
3.3.200 | 224 | 5/4/2023 |
3.3.199 | 476 | 4/21/2023 |
3.3.198 | 257 | 4/20/2023 |
3.3.194 | 235 | 4/9/2023 |
3.3.186 | 237 | 4/4/2023 |
3.3.182 | 248 | 4/3/2023 |
3.3.178 | 236 | 4/3/2023 |
3.3.169 | 267 | 3/26/2023 |
3.3.166 | 298 | 3/8/2023 |
3.3.162 | 291 | 2/27/2023 |
3.3.159 | 359 | 1/28/2023 |
3.3.156 | 345 | 1/28/2023 |
3.3.151 | 355 | 1/28/2023 |
3.3.144 | 346 | 1/28/2023 |
3.3.135 | 333 | 1/28/2023 |
3.3.124 | 364 | 1/28/2023 |
3.3.113 | 349 | 1/28/2023 |
3.3.98 | 359 | 1/28/2023 |
3.3.81 | 369 | 1/28/2023 |
3.3.56 | 347 | 1/28/2023 |
3.3.53 | 348 | 1/28/2023 |
3.3.25 | 334 | 1/28/2023 |
3.3.4 | 333 | 1/28/2023 |
3.2.86 | 7,410 | 3/10/2022 |
3.2.59 | 482 | 3/2/2022 |
3.2.52 | 496 | 3/2/2022 |
3.2.43 | 1,156 | 1/5/2022 |
3.2.35 | 319 | 1/5/2022 |
3.2.10 | 691 | 6/21/2021 |
3.1.102 | 936 | 6/23/2020 |
3.0.90 | 579 | 4/19/2020 |
3.0.83 | 572 | 4/19/2020 |
3.0.72 | 550 | 4/18/2020 |
3.0.71 | 572 | 4/18/2020 |
3.0.69 | 543 | 4/18/2020 |
3.0.68 | 552 | 4/7/2020 |
3.0.60 | 591 | 3/30/2020 |
3.0.52 | 551 | 3/30/2020 |
3.0.45 | 608 | 3/30/2020 |
2.0.34 | 674 | 1/5/2020 |
2.0.27 | 603 | 1/5/2020 |
2.0.24 | 606 | 1/5/2020 |
1.0.8 | 655 | 1/4/2020 |
1.0.7 | 631 | 1/4/2020 |
1.0.6 | 938 | 8/18/2018 |
1.0.5 | 887 | 8/18/2018 |
1.0.4 | 892 | 8/17/2018 |
1.0.3 | 967 | 12/18/2017 |
1.0.2 | 947 | 12/18/2017 |
1.0.1 | 938 | 12/18/2017 |