NameGenAPI
REST API fuer zufaellig generierte Namen und Bezeichnungen.
Basis-URL lokal: http://localhost:8080
Parameter fuer alle Name-Endpoints: count von 1 bis 20.
Zusatz fuer /api/normal: country (ISO-3166 Code oder Landname), Standard ist DE.
Verfuegbare Typen
normalcharguildcitytechplanet
Endpoints
| Pfad | Beschreibung | Beispiel |
|---|---|---|
/api/types |
Zeigt verfügbare Typen + maxCount | /api/types |
/api/countries |
Zeigt alle verfügbaren Länder für normal (ISO-3166) | /api/countries |
/api/normal |
Normale Namen (optional country, Standard DE) | /api/normal?count=3&country=JP |
/api/char |
Mystische Character-Namen | /api/char?count=3 |
/api/guild |
Fraktions- und Gruppennamen | /api/guild?count=3 |
/api/city |
Stadt- und Ortsnamen | /api/city?count=3 |
/api/tech |
Technische Produkt-/Projektnamen | /api/tech?count=3 |
/api/planet |
Planetennamen | /api/planet?count=3 |
/api/{type} |
Dynamischer Zugriff über Typ (normal,char,guild,city,tech,planet) | /api/normal?count=2&country=US |
Beispielantwort
{
"type": "normal",
"country": "JP",
"count": 2,
"names": ["Haruto Sato", "Rin Tanaka"]
}
cURL Beispiele
-
curl "http://localhost:8080/api/normal" -
curl "http://localhost:8080/api/normal?country=RU&count=3" -
curl "http://localhost:8080/api/normal?country=KZ&count=3" -
curl "http://localhost:8080/api/normal?country=JP&count=3" -
curl "http://localhost:8080/api/char?count=3" -
curl "http://localhost:8080/api/planet?count=3" -
curl "http://localhost:8080/api/tech?count=5" -
curl "http://localhost:8080/api/countries" -
curl "http://localhost:8080/api/types"
Debian 13 Deploy (kurz)
- Lokal Paket bauen:
./deploy/build-package.sh - Ordner
deploy/packageauf den Server kopieren - Auf dem Server starten/aktualisieren:
sudo ./update.sh - Konfiguration bleibt erhalten (ohne
--force-env/--force-service) - Service pruefen:
sudo systemctl status namegenapi