TG

Développeurs

Documentation API

Intégrez Spotlight dans vos outils, bots Discord ou dashboards personnalisés.

GET/api/servers/list

Liste publique des serveurs avec stats (votes, joueurs, statut).

curl https://51-255-45-113.sslip.io/api/servers/list
POST/api/votes

Vote web pour un serveur. Body: { serverId, fingerprint?, honeypot? }

curl -X POST https://51-255-45-113.sslip.io/api/votes -H "Content-Type: application/json" -d '{"serverId":"..."}'
GET/api/vote?token=TOKEN

Vote in-game FiveM. Token unique par serveur (dashboard).

curl "https://51-255-45-113.sslip.io/api/vote?token=VOTE_TOKEN"
GET/api/stats?serverId=ID

Graphique votes 30 jours + total mensuel pour un serveur.

curl "https://51-255-45-113.sslip.io/api/stats?serverId=..."
GET/api/export/votes?serverId=ID

Export CSV des votes (propriétaire connecté).

curl -b cookie "https://51-255-45-113.sslip.io/api/export/votes?serverId=..."
GET/api/monitoring

Cron monitoring FiveM (info.json + players.json). Header: Authorization: Bearer CRON_SECRET

curl -H "Authorization: Bearer $CRON_SECRET" https://51-255-45-113.sslip.io/api/monitoring
POST/api/stripe/checkout

Créer session Stripe. Body: { type, serverId, slot?, hours? }

curl -X POST https://51-255-45-113.sslip.io/api/stripe/checkout -H "Content-Type: application/json" -d '{"type":"showcase","serverId":"...","slot":1,"hours":12}'
Resource FiveM : incluse dans le repo fivem-resource/topgta-vote/. Configurez topgta_api et topgta_token dans votre server.cfg.