https://github.com/voiceapiai/ralertsinua
Rust async API wrapper (reqwest) & TUI (ratatui) for Air Raid Alert Map of Ukraine
https://github.com/voiceapiai/ralertsinua
api api-client cli geojson maps openstreetmap rust terminal-based tui
Last synced: about 1 year ago
JSON representation
Rust async API wrapper (reqwest) & TUI (ratatui) for Air Raid Alert Map of Ukraine
- Host: GitHub
- URL: https://github.com/voiceapiai/ralertsinua
- Owner: voiceapiai
- License: mit
- Created: 2024-04-01T14:37:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T19:13:41.000Z (almost 2 years ago)
- Last Synced: 2025-05-08T12:04:10.575Z (about 1 year ago)
- Topics: api, api-client, cli, geojson, maps, openstreetmap, rust, terminal-based, tui
- Language: Rust
- Homepage: https://voiceapiai.github.io/ralertsinua/
- Size: 6.83 MB
- Stars: 75
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://sonarcloud.io/summary/new_code?id=voiceapiai_alertsinua-cli) [](https://coveralls.io/github/voiceapiai/ralertsinua)    [](https://stand-with-ukraine.pp.ua)
[](https://stand-with-ukraine.pp.ua)
# ralertsinua
Rust async API wrapper (reqwest) & TUI (ratatui) for alerts.in.ua

## Introduction
The Alerts.in.ua API Client is a Rust library that simplifies access to the alerts.in.ua API service. It provides real-time information about air raid alerts and other potential threats.
## Installation
### Install prebuilt binaries via shell script
```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/voiceapiai/ralertsinua/releases/download/v0.5.0/ralertsinua-installer.sh | sh
```
### Download prebuilt binaries from the [releases page](https://github.com/voiceapiai/ralertsinua/releases/latest)
## Usage
⚠️ Before you can use this library, you need to obtain an API token by submitting an [API request form](https://alerts.in.ua/api-request).
⚠️ Provide token via environment variable `ALERTSINUA_TOKEN` or via `--token` flag. If empty, the library will try to ask you interactively one time.
```bash
export ALERTSINUA_TOKEN="your_token"; ralertsinua
# or
ralertsinua --token "your_token"
```
Default polling interval is 30 seconds. You can change it via `ALERTSINUA_POLLING_INTERVAL_SEC` env or `--interval` flag.
```bash
export ALERTSINUA_POLLING_INTERVAL_SEC=60; ralertsinua
# or
ralertsinua --interval 60
```
## License
MIT 2024
## Inspitation & Credits & Thanks
- ratatui's [async template](https://github.com/ratatui-org/templates/blob/main/component/README.md#async-template)
- rspotify [rsotify](https://github.com/ramsayleung/rspotify)
- echomap [echomap](https://github.com/pjsier/echomap)
- alerts_in_ua Python client [alerts-in-ua](https://github.com/alerts-ua/alerts-in-ua-py)
## History
---
*[TUI]: Terminal User Interface