HomeFrontCommand 5.0.2

dotnet add package HomeFrontCommand --version 5.0.2
                    
NuGet\Install-Package HomeFrontCommand -Version 5.0.2
                    
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="HomeFrontCommand" Version="5.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HomeFrontCommand" Version="5.0.2" />
                    
Directory.Packages.props
<PackageReference Include="HomeFrontCommand" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HomeFrontCommand --version 5.0.2
                    
#r "nuget: HomeFrontCommand, 5.0.2"
                    
#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.
#:package HomeFrontCommand@5.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HomeFrontCommand&version=5.0.2
                    
Install as a Cake Addin
#tool nuget:?package=HomeFrontCommand&version=5.0.2
                    
Install as a Cake Tool

HomeFrontCommandLibrary

NuGet Version Target Framework

HomeFrontCommandLibrary is a .NET library for retrieving alerts published by Israel's Home Front Command. It provides access to current alerts, alert history, category metadata, and city metadata with translations in Hebrew, English, Russian, and Arabic.

Installation

dotnet add package HomeFrontCommand --version 5.0.2

Requirements

  • .NET 8.0

Quick Start

using HomeFrontCommandLibrary;

var command = new HomeFrontCommand();

var activeAlert = await command.GetActiveAlert();
if (activeAlert.Category is not null && activeAlert.Cities is not null)
{
    Console.WriteLine($"Category (EN): {activeAlert.Category.Title.English}");
    foreach (var city in activeAlert.Cities)
    {
        Console.WriteLine($"City: {city.Name.English} ({city.ProtectionTime}s)");
    }
}

var history = await command.GetAlertsHistory();
Console.WriteLine($"History records: {history.Count}");

Public API

HomeFrontCommand exposes the following methods:

  • Task<Alert> GetActiveAlert()
  • Task<List<AlertHistory>> GetAlertsHistory()
  • Task<City> GetCityByName(string name)
  • Task<Category> GetCategoryByName(string name)
  • List<City> GetAllCities()
  • Task<Alert> GetActiveAlertExample(string categoryName)

Notes

  • GetActiveAlert() returns an object with Category = null and Cities = null when there is no active alert.
  • GetAllCities() returns the current in-memory cache of cities.
  • City data includes polygon coordinates via City.Polygons.

Data Models

Alert

  • string? Id
  • Category? Category
  • List<City>? Cities
  • DateTime AlertDate

AlertHistory

  • Category Category
  • City City
  • DateTime AlertDate

Category

  • int Id
  • int MatrixId
  • CategoryTitle Title
  • CategoryDescription Description

City

  • int Id
  • int AreaId
  • CityName Name
  • ReshutName Reshut
  • AreaTitle AreaName
  • int ProtectionTime
  • List<List<GeoCoordinate>> Polygons

Multi-language Fields

The following model properties include translations in all supported languages:

  • Category.Title
  • Category.Description
  • City.Name
  • City.Reshut
  • City.AreaName

Supported fields in each translation object:

  • Hebrew
  • English
  • Russian
  • Arabic

Dependencies

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
5.0.2 131 3/28/2026
5.0.1 116 3/27/2026
5.0.0 108 3/19/2026
4.0.0 117 3/8/2026
3.5.0 241 6/24/2025
3.0.0 209 6/23/2025
2.5.0 216 6/22/2025
2.0.0 223 6/18/2025
1.0.0 234 6/15/2025