🔌 REST API
Kimlik Doğrulama
Tüm endpoint'ler X-API-Key header ile korunur. Sadece /api/status auth gerektirmez.
Endpoint Listesi
| Yöntem | Endpoint | Açıklama |
|---|---|---|
GET | /api/status | Genel durum (auth gerektirmez) |
GET | /api/club/{id} | Kulüp bilgileri + standings |
GET | /api/club/{id}/players | Kulüp oyuncuları (34 nitelik) |
GET | /api/standings/{leagueId} | Lig puan durumu |
GET | /api/fixtures/{leagueId} | Sezon fikstürleri |
GET | /api/tactics/{clubId} | Aktif taktik + atamalar |
POST | /api/tactics | Taktik kaydet (JSON body) |
GET | /api/transfers | Açık transfer ilanları |
POST | /api/transfers/bid | Teklif ver (JSON body) |
GET | /api/cup/{seasonId} | Kupa bracket |
Örnek Kullanım
# Genel durum
curl -H "X-API-Key: your_key" http://localhost/api/status
# Kulüp detayı
curl -H "X-API-Key: your_key" http://localhost/api/club/1
# Taktik kaydet
curl -X POST -H "X-API-Key: your_key" -H "Content-Type: application/json" \
-d '{"club_id":1,"formation":"4-3-3","style":"balanced"}' \
http://localhost/api/tactics
Response Formatı
{
"status": "success",
"data": { ... },
"code": 200
}