@lol-inspector/sdk
v1.0.5
Published
SDK for connecting to LoL Inspector Telemetry Ingest Server
Maintainers
Readme
@lol-inspector/sdk
This is the official Node.js SDK for connecting to the LoL Inspector Telemetry Ingest Server. You can use this SDK to build Twitch Extensions, custom overlays, Discord bots, and external analytical tools powered by real-time League of Legends telemetry.
Installation
npm install @lol-inspector/sdkUsage
const { LolInspectorClient } = require('@lol-inspector/sdk');
// Initialize the client. Provide a generated clientId to remember the device after approval.
const client = new LolInspectorClient({
url: 'https://lol-ingest.7u.pl', // or your local ingest ws://localhost:20651
roomId: '123456', // The Pairing PIN or exact Room ID from the Master UI
clientType: 'UI - My Custom Twitch Widget',
clientId: 'my-custom-persistent-id' // Used to bypass approval queue on reconnects
});
client.onConnect(() => {
console.log('Connected to server!');
});
client.onPendingApproval(() => {
console.log('Please accept the connection on your LoL Inspector Master UI...');
});
// Real-time Match Telemetry (Economy, Kills, Dragons, Player Stats)
client.onGameData((data) => {
console.log('Live Game Data Update:', data);
});
// Real-time Champion Select Data (Intent, Bans, Picks)
client.onLobbyState((data) => {
console.log('Lobby State Update:', data);
});
// Connect to the WebSocket ingest!
client.connect();How It Works
- Pairing: Enter the 6-digit PIN from your LoL Inspector "Connect" modal as the
roomId. - Approval: The Master UI will show an "INCOMING CONNECTION" prompt. Once you click Approve, you're in!
- Persistence: If you pass the same
clientIdagain later, the Master UI doesn't need to approve you again for that same room.
