Endpoints
| Méthode | Endpoint | Rôle |
|---|---|---|
| POST | /api/v1/me/runtime/stats | Stats + heartbeat + shards. |
| POST | /api/v1/me/runtime/heartbeat | Heartbeat seul. |
| POST | /api/v1/me/runtime/commands | Commandes slash globales. |
| POST | /api/v1/me/runtime/profile | Nom, avatar, bannière. |
| GET | /api/v1/me/runtime | État live, source et vérification Discord. |
JavaScript
| Méthode | Retour | Description |
|---|---|---|
| postStats(stats?) | Promise<StatsData> | Envoie immédiatement les statistiques. |
| postHeartbeat() | Promise<HeartbeatData> | Signal de vie sans modifier les compteurs. |
| postCommands(commands?) | Promise<CommandsData> | Envoie les commandes globales. |
| postProfile(profile?) | Promise<ProfileData> | Envoie le profil. |
| start() | this | Démarre la boucle automatique. |
| stop() | this | Arrête la boucle. |
| setStatsProvider(fn) | this | Fournit les compteurs à chaque tick. |
| attachDiscord(client) | this | Branche un client discord.js. |
Python
| Méthode | Description |
|---|---|
| post_stats(...) | Envoie les statistiques. |
| post_heartbeat() | Signal de vie. |
| post_commands(commands) | Envoie les commandes. |
| post_profile(...) | Envoie le profil. |
| set_stats_provider(fn) | Fonction appelée à chaque tick. |
| start() / stop() | Démarre/arrête le thread. |
Corps des requêtes
| Endpoint | Corps |
|---|---|
| /stats | server_count ou guild_count, shard_count, shards, user_count |
| /heartbeat | {} |
| /commands | { "commands": [...] } |
| /profile | { name?, avatar_url?, banner_url? } |