Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Enum0x539 authored Jun 19, 2021
1 parent c045a48 commit d454c68
Showing 1 changed file with 34 additions and 6 deletions.
40 changes: 34 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ Implementation of Israel Home Front Command's (AKA "Pikud Ha Oref") public API,

## About the library
RedAlert is a library that synchronizing with Israel Home Front Command's API to get the alerts in real-time,
the library interface is user-friendly and have lots of features which are described below.
the library interface is user-friendly and has lots of features which are described below.

## Features
* Get red-alerts in real-time.
* Get red alerts in real-time.

* Fetches location data from alerts codes (coordinates, city names, city zones, time to run for safe-zone)

* Supports 4 languages: Hebrew, Arabic, Russian and English.

* Generates random coordinates within the given coordinates.

* Gets the picture of Israel with markers over the alerts location with path lines.
* Gets the picture of Israel with markers over the alert's location with path lines.

## Example code
```cs
Expand All @@ -29,7 +29,7 @@ static void Main()

private static void Alerts_OnAlertReceived(List<AlertCityData> cities)
{
//With every new alert, this function will gets to execute.
//With every new alert, this function will get to execute.
//Converting the time to the universal time and adds 3 hours to get the current time in Israel.
DateTime occurence = cities[0].Timestamp;
Expand Down Expand Up @@ -65,8 +65,36 @@ private static void Alerts_OnAlertReceived(List<AlertCityData> cities)
Console.WriteLine($"New Alert! [{occurence.ToShortDateString()}] {occurence.ToShortTimeString()}:\n" + string.Join("\n\n", result));
}
```

## Short documentation
| Function | Parameters | Description | Returns |
| ----------- | ----------- | ----------- | ----------- |
| GetMapPhoto() | PathColorHex, Coordinates | Retrieves the bytes of the given coordinates image from Google Maps API with a path-line from Gaza-strip. | byte array |
| RandomCoordinates() | Coordinates | Generates random coordinates within the given coordinates. | Coordinates |

---
**AlertCityData**: <br>
Name_he - returns the name of the alert city in Hebrew. <br>
Name_en - returns the name of the alert city in English. <br>
Name_ru - returns the name of the alert city in Russian. <br>
Name_ar - returns the name of the alert city in Arabic. <br>
<br>
Zone_he - returns the name of the alert zone in Hebrew. <br>
Zone_en - returns the name of the alert zone in English. <br>
Zone_ru - returns the name of the alert zone in Russian. <br>
Zone_ar - returns the name of the alert zone in Arabic. <br>
<br>
Countdown - returns the time to ran to into safe-zone. <br>
Time_he - returns the time to ran to into safe-zone in Hebrew. <br>
Time_en - returns the time to ran to into safe-zone in English. <br>
Time_ru - returns the time to ran to into safe-zone in Russian. <br>
Time_ar - returns the time to ran to into safe-zone in Arabic. <br>
<br>
Timestamp - returns the timestamp of the alert in "Israel Standard Time". <br>
Coordinates - returns the coordinates of the alert.

## Information
1) This library will only work for people which their locations is in Israel, because Israel Home Front Command (Pikud Ha Oref) accepts only the requests from Israel.<br>
1) This library will only work for people whose locations is in Israel because Israel Home Front Command (Pikud Ha Oref) accepts only the requests from Israel.<br>
2) The enemy cannot exploit or use this library for bad usage because it does not contain any private sensitive information, we use the public API of Israel Home Front Command (Pikud Ha Oref) <br>
3) This library is very simple to use and have very good performance

Expand All @@ -76,7 +104,7 @@ private static void Alerts_OnAlertReceived(List<AlertCityData> cities)

## This project is under Berkeley Software Distribution (BSD) license.
* The source code doesn’t need to be public when a distribution of the software is made.
* Modifications to the software can be release under any license.
* Modifications to the software can be released under any license.
* Changes made to the source code may not be documented.
* It offers no explicit position on patent usage.
* The license and copyright notice must be included in the documentation of the compiled version of the source code (as opposed to only in the source code).
Expand Down

0 comments on commit d454c68

Please sign in to comment.