Subscribe to Planet Events
Receive
Server
Subscribe to real-time events for a specific planet
Real-time events related to specific planets. Subscribe to get notified about:
- Planet creation and updates
- Atmospheric changes
- Discovery of new satellites
- Cosmic events (explosions, collisions, etc.)
- Image uploads and media updates
header
AuthorizationBearer <JWT>JWT Bearer token authentication for WebSocket connections
planetId*stringThe ID of the planet
includeHistory?booleanInclude historical events
Default
falseeventTypes?array<string>Filter by specific event types
const socket = new WebSocket("wss://galaxy.scalar.com/planets/{planetId}/events?api_key=YOUR_API_KEY");
socket.addEventListener("message", (event) => {
console.log(event.data);
});